AI Glossary / Natural language and speech / Intermediate

Lesk algorithm

Definition

The Lesk algorithm is a dictionary-based approach to word-sense disambiguation: choosing which meaning of an ambiguous word fits its context. Its central idea is to compare overlapping words in dictionary definitions. Later variants alter what is compared, including the widely used simplified version that compares each candidate definition directly with surrounding text.

What it means

A word such as “bank” can refer to different things. A dictionary separates these meanings into entries or senses, usually with short explanations called glosses. Lesk-style methods use those explanations as evidence.
The original approach compares definitions associated with nearby words and their candidate senses. Simplified Lesk handles a target word by comparing its candidate glosses with the words of its context.
This distinction matters when interpreting examples and software. Calling a method “Lesk” does not fully specify its scoring, preprocessing, sense inventory, or tie-breaking behavior. It identifies an influential family of methods, not one universally identical implementation.

How it works

For a simplified version, collect the candidate senses of the target word from a dictionary. Optionally restrict them using a known part of speech.
Build a context representation and a representation of each gloss. Decide explicitly whether to lowercase, remove punctuation, ignore common function words, or normalize word forms.
Count the overlap between the context and each gloss under the chosen rule. Select the highest-scoring sense, with a documented policy for ties and zero overlap.
More elaborate variants add definitions of related senses or replace exact matching with graded similarity. These additions can supply more evidence, but they change the method and should not be silently described as the original algorithm.

Three practical examples

  • A teaching program shows why a word's dictionary meanings receive different overlap scores in different sentences.
  • A terminology experiment uses domain-specific glosses to choose between competing meanings of a technical word.
  • A research team uses simplified Lesk as an interpretable baseline before testing a more complex disambiguation system on the same sense inventory.

Think of it this way

Think of choosing a labeled drawer by comparing the words on its label with the words in a note describing an object. Shared wording can be a useful clue.
The limitation is that equivalent ideas can use different words, while unrelated statements can share common words. Lesk-style overlap is evidence from wording; it is not a complete test of meaning or real-world truth.

Worked example

Use this original simplified-Lesk illustration with invented gloss signatures, not actual dictionary entries. After preprocessing, the context for “bank” is the set {river, water, eroded, bank}.
The river-edge sense has signature {sloping, land, beside, river, water}. Its intersection with the context is {river, water}, so its score is 2.
The financial sense has signature {institution, money, deposits, loans}. Its intersection is empty, so its score is 0. The river-edge sense wins 2 to 0.
Now replace the context with {shore, collapsed, bank}. Both scores become 0 under this exact-match rule, even though a person may favor the river-edge meaning. A tie policy might return a default sense or abstain; it does not create missing semantic evidence.
Because sets are used here, repeating “river” three times would still contribute one matching word.

Illustrative case study

In a fictional project, Harbor Manuals tests simplified Lesk on ambiguous maintenance vocabulary. A general dictionary contains short glosses, while technicians use abbreviations and specialist expressions.
The team records many zero-overlap cases. It compares a documented terminology resource with the general dictionary and separately tests word-form normalization. It keeps a reviewed evaluation set so that each change can be assessed under the same conditions.
The lesson is to inspect the source of weak evidence before interpreting the selected sense as reliable. This is a fictional evaluation design, with no claimed accuracy gain.

Common misconceptions and mistakes

Do not confuse original and simplified Lesk. Comparing a gloss with raw context differs from comparing candidate glosses with one another.
Do not assume that capitalization, punctuation, inflection, or stop words are handled automatically. Those choices depend on the implementation.
Do not interpret the largest overlap as a calibrated probability of correctness.
Do not treat a zero-overlap winner as strong evidence: it may be only a tie-breaking result.
Do not assume the intended sense is present in the dictionary. No selection rule can choose an absent candidate without some additional mechanism.

Business use

For a business, the method can provide a transparent baseline or a way to inspect how terminology descriptions support interpretation. Its behavior is often easy to explain through the matched words.
Suitability depends on the available sense definitions and the language used in actual inputs. Short, specialized, or informal messages can provide little exact overlap.
Record both the chosen sense and supporting score where useful for review. Evaluate unresolved cases and frequent default choices rather than measuring only whether the system always returns an answer.

People also ask

Does Lesk require labeled training examples?

A basic dictionary-overlap version does not require a sense-labeled training corpus, though evaluation still needs suitable reference decisions.

Is WordNet required?

No. A usable sense inventory with definitions can support a Lesk-style method; WordNet is a common choice rather than the definition of the algorithm.

What happens when scores tie?

That depends on the implementation. It may choose the first candidate, apply another preference, or abstain. The policy should be stated explicitly.

Check your understanding

In the toy example, does repeating “river” increase the set-overlap score from 2 to 4?

Answer: No. A set records whether a word is present, not how many times it occurs. Repetition would matter only under a different scoring rule. The scoring convention is part of the algorithm's specification.

Related terms

  • Word sense disambiguation
  • Lemmatization
  • Semantic similarity
  • Gloss
  • Sense inventory
  • WordNet

Learn next

Manually score three contexts using a small invented sense inventory. Include a clear winner, a tie, and a case whose intended sense is missing.
Then inspect an implementation to identify its exact preprocessing and tie policy. Compare its behavior with its documentation rather than assuming that every function named Lesk implements the same historical variant.

More in Natural language and speech

  • Latent semantic mapping - Latent semantic mapping, or LSM, is a framework for representing discrete items as vectors in a smaller continuous space, using patterns across a collection...
  • Lateral sound - A lateral sound is a speech sound produced with airflow passing around one or both sides of the tongue rather than through an open central channel.
  • Lemma - A lemma is the canonical or dictionary-style form used to represent a set of related word forms.
  • Lexical choice - Lexical choice is the selection of words or lexical expressions to convey an intended message.
  • Lexical density - Lexical density measures how much of a text consists of lexical, or content-bearing, material.
  • Lexical resource - A lexical resource is an organized source of information about words and lexical expressions.

Sources

Basile, Caputo, and Semeraro, original enhanced-Lesk paper, including distinctions among earlier variants: https://aclanthology.org/anthology-files/pdf/C/C14/C14-1151.pdf NLTK implementation source, consulted for actual set-overlap behavior: https://www.nltk.org/_modules/nltk/wsd.html Lesk's 1986 original paper bibliographic reference; full text not accessed: https://doi.org/10.1145/318723.318728 Independent source review: The original enhanced-Lesk paper’s historical distinctions and NLTK’s actual context-set/gloss-intersection code were inspected. Lesk’s 1986 full text remains unaccessed.

Previous: Lernmatrix Next: Level cost

  • Home
  • Daily AI Updates
  • Blog
  • AIFBL Academy
  • AI Glossary
  • Products and Tools
  • Store
  • Free CFO AI Prompt Pack
  • About Shihan Sheriff
  • Privacy Policy
  • Terms of Use
  • Refund Policy
  • Cookie Policy
  • Earnings Disclaimer