Let’s implement the lesk algorithm in python from scratch in this segment, unlike the previous section where you used NLTK’s implementation of lesk algorithm.
Let’s now choose the sense of the word ‘bank’ that maximally overlaps with the given sentence.
You saw how the Lesk algorithm helps in word sense disambiguation. The word ‘bank ‘can have multiple meanings depending on the surrounding (or the context) words. The lesk algorithm helps in finding the ‘correct’ meaning.