Advanced semantic similarity methods
In this section, we'll discover advanced semantic similarity methods for word, phrase, and sentence similarity. We've already learned how to calculate semantic similarity with spaCy's similarity method and obtained some scores. But what do these scores mean? How are they calculated? Before we look at more advanced methods, first, we'll learn how semantic similarity is calculated.
Understanding semantic similarity
When we collect text data (any sort of data), we want to see how some examples are similar, different, or related. We want to measure how similar two pieces of text are by calculating their similarity scores. Here, the term semantic similarity comes into the picture; semantic similarity is a metric that's defined over texts, where the distance between two texts is based on their semantics.
A metric in mathematics is basically a distance function. Every metric induces a topology on the vector space. Word...