WordNet::Similarity - Measuring the Relatedness of Concepts

Ted PedersenSiddharth PatwardhanJason Michelizzi

article2004NAACL1,855 citations

Presents WordNet::Similarity, an open-source software package that implements nine standard semantic similarity and relatedness measures across WordNet concepts for applications in computational linguistics like word sense disambiguation.

Listen

Automated natural language processing systems require reliable methods to quantify how closely words and concepts relate to one another. While traditional similarity measures evaluate whether two items belong to the same category, real-world language frequently depends on broader relationships that cross grammatical boundaries, such as how an action connects to a tool. The article introduces and demonstrates WordNet::Similarity, an open-source software package designed to compute both semantic similarity and broader concept relatedness using the structured lexical database WordNet.

To achieve this, the software integrates nine distinct measurement algorithms implemented in Perl. It utilizes WordNet version 2.0, which contains 80,000 noun concepts across nine hierarchies and 13,500 verb concepts across 554 hierarchies. The system pairs these hierarchical structures with non-hierarchical relationships, definitions, and external text corpora such as SemCor, the Brown Corpus, the Penn Treebank, and the British National Corpus to calculate statistical and structural relationships between concepts.

The article establishes several key capabilities of the software suite. First, it provides six specialized similarity measures restricted to comparisons within the same part of speech; three calculate shortest path lengths across hierarchies, while three calculate information content derived from text corpora. Second, to overcome the limitation of isolated hierarchies, the package introduces optional hypothetical root nodes that unify all nouns and all verbs into single overarching structures. Third, it provides three broader relatedness measures that evaluate associations across different parts of speech by analyzing directional relationship paths, definition text overlaps, and co-occurrence vector spaces. Finally, the package offers multiple operational modes, including direct programming interfaces, command-line execution, web-based tools, and detailed diagnostic tracing.

These findings demonstrate that organizations can implement standardized, reproducible semantic scoring across diverse computational linguistics applications. The package has already been successfully incorporated into word sense disambiguation tasks through the SenseRelate tool, determining word meanings based on neighboring context. Furthermore, making the software freely available under the Gnu Public License provides a low-cost, flexible foundation for broader enterprise language technologies, including automated text generation systems.

Stakeholders and developers should leverage the software for text-processing workflows requiring semantic disambiguation or lexical selection. When implementing the tool, teams must choose between strict hierarchy-based similarity measures and broader definition-based relatedness measures depending on whether cross-part-of-speech comparisons are required. Ongoing work is currently exploring the integration of these measures to evaluate lexical choice within natural language generation pipelines.

Users should note that standard similarity measures remain strictly bounded by parts of speech and require the use of hypothetical root nodes or broader relatedness algorithms to compare dissimilar grammatical categories. In addition, measures relying on information content depend on the specific text corpus used for statistical weighting. The software is mature and fully accessible via public repositories, offering high confidence for operational deployment within its defined lexical boundaries.

Cover for WordNet::Similarity - Measuring the Relatedness of Concepts

Abstract

WordNet::Similarity is a freely available software package that makes it possible to measure the semantic similarity or relatedness between a pair of concepts (or word senses). It provides six measures of similarity, and three measures of relatedness, all of which are based on the lexical database WordNet. These measures are implemented as Perl modules which take as input two concepts, and return a numeric value that represents the degree to which they are similar or related.

Table of Contents

  • Introduction
  • Similarity Measures
  • Measures of Relatedness
  • Using WordNet::Similarity
  • Acknowledgments
  • References

Knowls

  1. Knowl 1 — WordNet::Similarity Architecture and API

    model/method

    WordNet::Similarity is an open-source Perl software package that calculates semantic similarity and relatedness between pairs of concepts or word senses based on the WordNet lexical database. The library interfaces with WordNet through the WordNet::QueryData module and exposes an object-oriented API. A measurement object is initialized via the new() constructor, after which relatedness or similarity values between two word senses (formatted as word#pos#sense, such as car#n#3) are retrieved using the getRelatedness() method. The package includes nine distinct measures (six similarity measures and three relatedness measures), a standalone command-line interface (similarity.pl), and a web interface.

  2. Knowl 2 — Path-Based Semantic Similarity Measures (lch, wup, path)

    model/method

    WordNet::Similarity provides three path-based measures to evaluate the semantic similarity between two concepts c1c_1 and c2c_2 within WordNet noun or verb is-a hierarchies:

    • path: Computes similarity as the reciprocal of the shortest path length (number of taxonomy edges or nodes) connecting c1c_1 and c2c_2: Simpath(c1,c2)=1length(c1,c2)\text{Sim}_{\text{path}}(c_1, c_2) = \frac{1}{\text{length}(c_1, c_2)}

    • lch (Leacock and Chodorow): Determines the shortest path length between c1c_1 and c2c_2 and scales it relative to the maximum taxonomy depth DD of the hierarchy in which the concepts reside: Simlch(c1,c2)=log(length(c1,c2)2D)\text{Sim}_{\text{lch}}(c_1, c_2) = -\log \left( \frac{\text{length}(c_1, c_2)}{2D} \right)

    • wup (Wu and Palmer): Calculates similarity by finding the path length from the taxonomy root to the least common subsumer (LCS) of c1c_1 and c2c_2, scaled by the sum of the path lengths from each concept to the root: Simwup(c1,c2)=2depth(LCS(c1,c2))depth(c1)+depth(c2)\text{Sim}_{\text{wup}}(c_1, c_2) = \frac{2 \cdot \text{depth}(\text{LCS}(c_1, c_2))}{\text{depth}(c_1) + \text{depth}(c_2)}

  3. Knowl 3 — Information Content-Based Semantic Similarity Measures (res, lin, jcn)

    model/method

    WordNet::Similarity implements three similarity measures that combine taxonomy structure with corpus-derived Information Content (IC), where IC(c)=logp(c)\text{IC}(c) = -\log p(c) measures concept specificity based on sense-tagged or raw corpora:

    • res (Resnik): Evaluates similarity strictly as the information content of the Least Common Subsumer (LCS) of the two concepts: Simres(c1,c2)=IC(LCS(c1,c2))\text{Sim}_{\text{res}}(c_1, c_2) = \text{IC}(\text{LCS}(c_1, c_2))

    • lin (Lin): Normalizes the information content of the LCS by the sum of the individual concepts' information content: Simlin(c1,c2)=2IC(LCS(c1,c2))IC(c1)+IC(c2)\text{Sim}_{\text{lin}}(c_1, c_2) = \frac{2 \cdot \text{IC}(\text{LCS}(c_1, c_2))}{\text{IC}(c_1) + \text{IC}(c_2)}

    • jcn (Jiang and Conrath): Measures the distance between concepts by subtracting twice the LCS information content from the sum of the individual information contents, and converts this distance into a similarity value via its inverse: Distjcn(c1,c2)=IC(c1)+IC(c2)2IC(LCS(c1,c2))\text{Dist}_{\text{jcn}}(c_1, c_2) = \text{IC}(c_1) + \text{IC}(c_2) - 2 \cdot \text{IC}(\text{LCS}(c_1, c_2)) Simjcn(c1,c2)=1Distjcn(c1,c2)\text{Sim}_{\text{jcn}}(c_1, c_2) = \frac{1}{\text{Dist}_{\text{jcn}}(c_1, c_2)}

    Information content frequencies are derived by default from the sense-tagged SemCor corpus, with utility tools provided to generate frequency counts from plain-text corpora including the Brown Corpus, Penn Treebank, and the British National Corpus.

  4. Knowl 4 — Context Vector-Based Semantic Relatedness Measure (vector)

    model/method

    The vector measure evaluates semantic relatedness between concepts across any part of speech by constructing co-occurrence vectors from WordNet definitions (glosses):

    1. A co-occurrence matrix is generated over a corpus composed of all WordNet glosses, assigning each content word a high-dimensional context vector.
    2. For a concept cc, a gloss vector vc\mathbf{v}_c is constructed by averaging the context vectors of all content words occurring in the gloss of cc.
    3. The semantic relatedness between two concepts c1c_1 and c2c_2 is computed as the cosine similarity between their gloss vectors vc1\mathbf{v}_{c_1} and vc2\mathbf{v}_{c_2}: Relvector(c1,c2)=vc1vc2vc1vc2\text{Rel}_{\text{vector}}(c_1, c_2) = \frac{\mathbf{v}_{c_1} \cdot \mathbf{v}_{c_2}}{\|\mathbf{v}_{c_1}\| \|\mathbf{v}_{c_2}\|}
  5. Knowl 5 — Extended Gloss Overlap Relatedness Measure (lesk)

    model/method

    The lesk measure calculates semantic relatedness between arbitrary concept pairs across parts of speech by comparing the textual glosses of WordNet synsets. Unlike the standard Lesk algorithm which only compares the direct definitions of two target senses, the extended measure calculates overlap scores between the glosses of the target concepts as well as the glosses of their immediate relations (such as hypernyms, hyponyms, meronyms, and troponyms) in WordNet.

  6. Knowl 6 — Directional Path-Based Relatedness Measure (hso)

    model/method

    The hso (Hirst and St-Onge) measure evaluates semantic relatedness across various WordNet relation types by treating links as directed edges:

    • WordNet relations are categorized by direction: is-a relations point upward (generalization) or downward (specialization), while part-whole relations (has-part, is-part-of) and attribute relations are classified as horizontal.
    • The measure computes relatedness by discovering paths between two concept nodes that satisfy specific structural constraints: paths must not exceed a maximum allowable edge length and must not alter directional patterns excessively.
  7. Knowl 7 — Hypothetical Root Nodes for Cross-Hierarchy WordNet Similarity

    model/method

    WordNet organizes concepts into multiple separate is-a trees (such as 9 noun hierarchies and 554 verb hierarchies in WordNet 2.0). Because path-length and information-content similarity measures require concepts to share an ancestor, WordNet::Similarity implements optional hypothetical root nodes. When activated, one hypothetical root subsumes all noun hierarchies and a second hypothetical root subsumes all verb hierarchies. This configuration enables similarity computations between any noun-noun or verb-verb pair, whereas disabling the hypothetical roots restricts evaluations strictly to concepts within the same subtree.

  8. Knowl 8 — Diagnostic Tracing in WordNet::Similarity

    model/method

    WordNet::Similarity provides diagnostic tracing routines that reveal intermediate representations for each measure type:

    • Path measures (lch, wup, path): Trace outputs list all discovered taxonomic paths connecting the two concept nodes.
    • Information content measures (res, lin, jcn): Trace outputs show the identified Least Common Subsumer (LCS) node along with the paths connecting both concepts to that LCS.
    • Directional path measure (hso): Trace outputs display the full directional path trajectories through WordNet relations.
    • Gloss overlap measure (lesk): Trace outputs enumerate the exact word overlap matches between the primary and expanded relational glosses.
    • Context vector measure (vector): Trace outputs display the individual word context vectors used to compute each synset's gloss centroid.

Coverage note — None omitted; all core similarity and relatedness measures, taxonomic root extensions, software interfaces, and tracing mechanisms contributed by the paper are represented.

References

  1. 1.Banerjee, S., and Pedersen, T. 2003. Extended gloss overlaps as a measure of semantic relatedness. In Proceedings of the Eighteenth International Joint Conference on Artificial Intelligence, 805–810.
  2. 2.Hirst, G., and St-Onge, D. 1998. Lexical chains as representations of context for the detection and correction of malapropisms. In Fellbaum, C., ed., WordNet: An electronic lexical database. MIT Press. 305–332.
  3. 3.Jiang, J., and Conrath, D. 1997. Semantic similarity based on corpus statistics and lexical taxonomy. In Proceedings on International Conference on Research in Computational Linguistics, 19–33.
  4. 4.Leacock, C., and Chodorow, M. 1998. Combining local context and WordNet similarity for word sense identification. In Fellbaum, C., ed., WordNet: An electronic lexical database. MIT Press. 265–283.
  5. 5.Lin, D. 1998. An information-theoretic definition of similarity. In Proceedings of the International Conference on Machine Learning.
  6. 6.Patwardhan, S.; Banerjee, S.; and Pedersen, T. 2003. Using measures of semantic relatedness for word sense disambiguation. In Proceedings of the Fourth International Conference on Intelligent Text Processing and Computational Linguistics, 241–257.
  7. 7.Patwardhan, S. 2003. Incorporating dictionary and corpus information into a context vector measure of semantic relatedness. Master’s thesis, Univ. of Minnesota, Duluth.
  8. 8.Rennie, J. 2000. WordNet::QueryData: a Perl module for accessing the WordNet database. http://search.cpan.org/dist/WordNet-QueryData.
  9. 9.Resnik, P. 1995. Using information content to evaluate semantic similarity in a taxonomy. In Proceedings of the 14th International Joint Conference on Artificial Intelligence, 448–453.
  10. 10.Wu, Z., and Palmer, M. 1994. Verb semantics and lexical selection. In 32nd Annual Meeting of the Association for Computational Linguistics, 133–138.

Citation

MLA
Pedersen, T., et al. “WordNet::Similarity”. Demonstration Papers at HLT-NAACL 2004 on XX - HLT-NAACL '04, 2004, pp. 38–41, https://doi.org/10.3115/1614025.1614037.
APA
Pedersen, T., Patwardhan, S., & Michelizzi, J. (2004). WordNet::Similarity. Demonstration Papers at HLT-NAACL 2004 on XX - HLT-NAACL '04, 38–41. https://doi.org/10.3115/1614025.1614037
Chicago
Pedersen, T., S. Patwardhan, and J. Michelizzi. 2004. “WordNet::Similarity”. Demonstration Papers at HLT-NAACL 2004 on XX - HLT-NAACL '04, 38–41. https://doi.org/10.3115/1614025.1614037.
Harvard
Pedersen, T., Patwardhan, S. and Michelizzi, J. (2004) “WordNet::Similarity”, Demonstration Papers at HLT-NAACL 2004 on XX - HLT-NAACL '04. Association for Computational Linguistics, pp. 38–41. Available at: https://doi.org/10.3115/1614025.1614037.
Vancouver
1. Pedersen T, Patwardhan S, Michelizzi J (2004) WordNet::Similarity. In: Demonstration Papers at HLT-NAACL 2004 on XX - HLT-NAACL '04. Association for Computational Linguistics, pp 38–41

BibTeX

@inproceedings{Pedersen_2004, series={HLT-NAACL ’04}, title={WordNet::Similarity: measuring the relatedness of concepts}, url={http://dx.doi.org/10.3115/1614025.1614037}, DOI={10.3115/1614025.1614037}, booktitle={Demonstration Papers at HLT-NAACL 2004 on XX - HLT-NAACL ’04}, publisher={Association for Computational Linguistics}, author={Pedersen, Ted and Patwardhan, Siddharth and Michelizzi, Jason}, year={2004}, pages={38–41}, collection={HLT-NAACL ’04} }
Metadata:Crossref

Access the Paper

This paper is available from its original source. Click below to access the PDF.

Open PDF

License: https://creativecommons.org/licenses/by-nc-sa/4.0/