I have two sentences:

In the world of big data, database sharding is a useful technique.
In the world of big data, it’s common to shard databases.

How to create a model that can inform that the phrases “database sharding” and “shard databases” are equivalent? Perhaps, dependency parsing can help. Perhaps there’s a method to check if two dependency sub-trees are equivalent.
Another example of equivalent is “migrate from TensorFlow to PyTorch” and “TensorFlow to PyTorch migration”.
Thanks for any suggestions. I am a beginner.