Word Sense Disambiguation
Words have many meanings. A ‘bank’ can refer to a financial institution, the ‘bank’ of a river, or to ‘bank’ a plane. When the word is placed in context, the meaning becomes obvious. Computers have a hard time reading the context of an ambiguous word and determining the which meaning was intended. The specific meaning is referred to as the “sense” of the word. Some words have 20 or more meanings; these words are said to be ‘highly polysemous’ (a fancy way of saying ‘many meanings’). Each meaning (or sense) is identified in the dictionary as a sub-entry for the word.
WordNet
Legendary AI uses a project out of Princeton called, Wordnet as our dictionary (or lexicon). This dictionary has pro’s and con’s. The primary downside is that it was developed decades ago and lacks many new words. Because of it’s comprehensive nature, it can be complicated to use, especially for beginners. The upside of this dictionary is that it’s free, extremely accurate and placed significant emphasis on word senses and their relations.
Word Sense Keys
WordNet uses a specific format to distinguish one word sense from another. This is called the “sense key”. It works like this:
- Example word: ball%1:06:01
- the word is ‘ball’
- the part of speech, where a number maps to the PoS, in this case, ‘1’ refers to nouns.
- the lexical file or grouping; in this case, ‘06’ refers to an ‘Artifact’, (nouns denoting man-made objects)
- and the final ‘01’ is just an incrementer used to ensure uniqueness of the senses. Note that the sense numbers start with ‘00’.
- the ‘%’ and ‘:’ are just used as separators to help make it easy to read.
WSD
Word Sense Disambiguation (WSD) is the name of the task in NLP where a computer tries to determine which sense of a word is being used given some context. For example, if the sentence was,
- The pilot banked the plane toward the east. The computer would look at clue words around it: ‘pilot’, ‘plane’, ‘east’, and determine that the context was about flying and maneuvering. Alternatively, if the sentence was,
- He went to the bank to deposit his check. The computer would look at clues like: ‘went’ (implies a location), ‘deposit’, ‘check’, and determine that the context was doing business with a financial institution.
Our job is to give the computer enough clues to disambiguate the word senses (hence, word sense disambiguation).
Open and Closed Class Words
A common way to classify a word is by the part of speech. Some parts of speech are considered ‘open class’ because their membership is extremely large, and they allow words to be morphed between the classes. These include nouns, verbs, adjectives and adverbs. The ‘closed class’ parts of speech are the ones that a small set of words and the words can’t easily switch classes. These include prepositions, interjections, conjunctions, pronouns and determiners.
Most word sense disambiguation systems focus on the open class words, but we also disambiguate one rather nasty close class: prepositions. The method fordisambiguating words varies by the part of speech.
Disambiguating Verbs
To disambiguate verbs, we use the following clues (or sense indicators):
- look at the subject; is the exact word helpful? or a hypernym of the word helpful?
- look at the direct object; is the exact word helpful? or a hypernym of the word helpful? Note: These two clues (subject and direct object) can be used to disambiguate about 80% of the verbs!
If the subject and direct object aren’t enough, consider using one or more of the following:
- is the verb an element of a phrasal verb? If so, which one?
- does the tense help indicate the sense? (certain verbs are only used for specific senses)
- does the verb typically precede either “to” or “that”?
- is the verb typically modified by a specific adverb? If so, is that adverb part of a word scale?
- does the word immediately before the verb, or immediately after it an important clue?
- does the verb use a prepositional phrase as an argument? If so, which ones?