Lexical Semantics and Word Senses › Key Parameters
Language AI HandbookAll chapters Lexical Semantics and Word Senses › Key ParametersSection view · Sections in this chapter8 / 11 ↓
Reading tools Definitions, links & notes
Choose your expertise level to adjust how many terms are explained. Beginners see more tooltips, experts see fewer to maintain reading flow. Hover over underlined terms for instant definitions.
Article links
Make inline references clickable
The key parameters for this Word-Sense Disambiguation implementation are:
- use_hypernyms: Whether to extend each sense gloss with its hypernym definitions. Including hypernyms broadens the evidence for a sense but can introduce noise from related concepts.
- Gloss source (definition, examples, hypernyms): Which parts of a synset are concatenated into the gloss document. Adding examples adds their preprocessed word types to the signature; whether new types or matches appear depends on the existing signature and context.
- STOPWORDS: The stopword set applied before stemming. Changing this set changes which overlap cues survive; evaluate the choice on the intended domain.
- Stemmer: The morphological normalizer (Porter stemmer here). Stemming reconciles inflections but can collapse distinct lexemes.
- TfidfVectorizer(stop_words="english"): The vectorizer configuration for the gloss vector baseline. The stop-word setting and tokenization affect cosine similarities.
- This Lesk implementation sorts by descending overlap count, then by synset name. The TF-IDF example reverses the similarity index order returned by
argsort.
Each parameter is a design choice with tradeoffs. The use_hypernyms flag controls whether the system looks beyond the immediate gloss. Including hypernyms can help when the gloss is short. It can also introduce evidence that is too general. The gloss source determines how much text is available for matching. Definitions are concise. Examples are closer to natural usage. Hypernyms provide broader context. The stopword list controls which words are ignored. A large list can reduce noise but may remove useful words. The stemmer controls morphological normalization. Stemming helps with inflections but can conflate words that should remain distinct. The vectorizer settings control tokenization, weighting, and stopword removal. The tie-breaking order controls what happens when scores are equal. None of these choices is universally correct. They should be tuned for the inventory, the domain, and the evaluation goal.
Comments
Add to the conversation
A question, a correction, or an example from your own work.
No comments yet. Be the first to share your thoughts!