Concept - Lesk Algorithm

Simplified Lesk (s.50): choose the sense with the most word overlap between its gloss (and examples) and the context, not counting stop words.

Worked example (s.50): context “The bank can guarantee deposits will eventually cover future tuition costs because it invests in adjustable-rate mortgage securities.”

  • bank^1 (financial institution): gloss contains deposits; example “that bank holds the mortgage on my home” contains mortgage; both appear in the context -> overlap 2.
  • bank^2 (sloping land): no overlapping words.
  • Result: bank

NLTK (s.51): from nltk.wsd import lesk; lesk(sent, 'bank', 'n') returns the Synset with the highest number of overlapping words between the context and each Synset’s definitions. Slide output for ['I','went','to','the','bank','to','deposit','money','.']: Synset('savings_bank.n.02').

flowchart LR
    C[Context words minus stop words] --> O[Count overlap with each sense gloss+examples]
    O --> M[Pick sense with max overlap]

Concept - Word Sense Disambiguation | Concept - WordNet

Source: 02 Pre-processing - Chunk 02 (s.31-60)