Introduction
In the early days of Natural Language Processing (NLP), determining if two sentences meant the same thing usually came down to a simple game of "count the matching words." If two sentences shared many words, they were similar; if not, they weren't. However, human language is nuanced: "I own a dog" and "I have an animal" are semantically very close, despite sharing almost no vocabulary.
In their 2005 paper, "Measuring the Semantic Similarity of Texts," Courtney Corley and Rada Mihalcea from the University of North Texas proposed a method to bridge this gap. By combining word-level semantic metrics with statistical importance, they moved NLP closer to "understanding" meaning rather than just matching strings.
Methodology
The authors introduce a method that calculates text similarity by aggregating word-to-word semantic scores and weighting them by word specificity. This approach significantly outperforms traditional lexical matching and provides a more transparent, knowledge-based alternative to "black-box" methods like Latent Semantic Analysis (LSA).
The algorithm follows a multi-step pipeline to compare two text segments ($T_i$ and $T_j$):
- Preprocessing: Text is tokenized and Part-of-Speech (POS) tagged. Words are grouped into sets based on their class: nouns, verbs, adjectives, adverbs, and cardinals.
- Word-to-Word Similarity: For every noun and verb in $T_i$, the algorithm finds the word in $T_j$ that has the highest semantic similarity score. They tested six different metrics for this, most notably Wu & Palmer and Lin, which use the WordNet taxonomy to calculate distance between concepts.
- Specificity Weighting: Not all words are created equal. Matching a rare word like "collie" is more significant than matching a common verb like "go." The authors used Inverse Document Frequency (IDF), calculated from the British National Corpus, to give higher weight to more specific, "discriminatory" words.
- Directional and Bidirectional Scoring: They first calculate how similar $T_i$ is to $T_j$ (directional), then vice versa, and finally average the two scores to get a final bidirectional similarity value between 0 and 1.
Datasets and Evaluation
The researchers evaluated their method on two primary benchmarks:
- Microsoft Paraphrase Corpus: 4,076 training and 1,725 test pairs of sentences. The goal was to identify if one sentence was a paraphrase of the other.
- PASCAL Corpus (Textual Entailment): 1,380 pairs focused on directional entailment (determining if the truth of one text segment follows from another).
Key Insights
- The Power of Specificity: One of the most important contributions is the integration of IDF. By weighting semantic matches by their information content, the algorithm avoids being "distracted" by frequent but low-meaning words.
- Knowledge over Statistics: Unlike LSA, which relies on co-occurrence statistics in large corpora, this method uses WordNet—a human-curated graph of linguistic relationships. This makes the results more grounded in actual semantics.
- Combining Metrics: The authors found that while individual word-similarity metrics (like Jiang & Conrath) performed well, a "Combined" approach (averaging multiple metrics) often yielded the most robust results.
Experimental Results
The semantic method consistently outperformed baselines across both datasets.
Paraphrase Identification
In an unsupervised setting using a simple threshold of 0.5, the "Combined" semantic metric achieved 68.8% accuracy, outperforming the lexical matching baseline (66.1%) and the vectorial (cosine similarity) baseline (65.4%). When using a learning algorithm to find the optimal threshold (supervised), accuracy rose to 71.5%.
Textual Entailment
The semantic approach achieved 58.3% accuracy in an unsupervised setting, which was competitive with the best results of the PASCAL challenge at the time.
Conclusion and Future Work
While effective, the authors acknowledge the "Bag-of-Words" limitation: their method treats sentences as collections of words and ignores syntax. It doesn't account for word order or dependencies (e.g., "The dog bit the man" vs. "The man bit the dog" would look very similar to this algorithm). Future work should explore more sophisticated representations, such as semantic parse trees or predicate logic, to capture the structural relationships between words.
Summary updated