Professional Documents
Culture Documents
CHARBEL AL HELAYEL
RAMI SAADE
KARIM SALHAB
INTRODUCTION
INTRODUCTION
Word Sense Disambiguation(WSD) is the task of assigning the
correct meaning to a word given its context, since a word can
have multiple meanings
Example:
The word date can be assigned different meanings:
1. Larry took Ellie out on a date
2. Larry‟s favorite fruit to eat is a date
SEMANTIC DISAMBIGUATION 3
INTRODUCTION
Considering another example:
1. I went fishing for some sea bass
2. The bass line of this song is too weak
SEMANTIC DISAMBIGUATION 4
INTRODUCTION
Replicating this human ability using algorithms can be quite a demanding and
difficult task
Solving this problem benefits many computer-related such as improving search
engine relevance, speech recognition and language translations
SEMANTIC DISAMBIGUATION 5
CONTENTS
History
Difficulties
Approaches and Algorithms
Knowledge-based
Unsupervised
Supervised
Evaluations and demos
Conclusion
SEMANTIC DISAMBIGUATION 6
HISTORY
Difficulties
Conclusion
HISTORY
WSD is one of the oldest problems in computation linguistics that dated back to
the 40s.
Introduced by Warren Weaver, a pioneer of the machine translation
Semantic Disambiguation was believed, by early researchers, to be unsolvable by
electronic computer due to the necessity of having to model all knowledge
In the1970, WSD systems were still very primitive as they were:
Hand coded
Rule based (if-then statements)
SEMANTIC DISAMBIGUATION 8
HISTORY
In the 1980s, the emergence of large-scale lexical resources enabled the switch
from hand-coded knowledge to automatic extraction from these resources
In the 1990s, supervised learning helped in the improvement of WSD
In the 2000s, supervised techniques reached their optimal accuracy and other
methods emerged such as domain adaptation, semi-supervised and unsupervised
corpus
Supervised systems are still the way to go
SEMANTIC DISAMBIGUATION 9
History
DIFFICULTIES
Approaches and Algorithms
Conclusion
DIFFICULTIES
DIFFERENCE BETWEEN DICTIONARIES
This inconsistency between resources could lead to not returning the finest
sense of the word
This reflects a difficulty in WSD since multiple dictionary resources are usually
used
SEMANTIC DISAMBIGUATION 11
DIFFICULTIES
PRAGMATICS
Common sense is usually needed in WSD as some sentence formulation can lead
to confusion
The following example illustrates the upper fact:
Bob and Jim are fathers
Bob and Jim are brothers
In the first sentence, Bob and Jim are fathers independently of each other
In the second sentence, Bob and Jim are actual brothers of each other
SEMANTIC DISAMBIGUATION 12
DIFFICULTIES
SENSE INVENTORY AND ALGORITHMS TASK-DEPENDENCY
SEMANTIC DISAMBIGUATION 13
History
Difficulties
Conclusion
KNOWLEDGE BASED
APPROACHES AND ALGORITHMS
LESK ALGORITHM
DICTIONARY AND KNOWLEDGE BASED METHODS
One of the most popular algorithms in knowledge based approaches is the Lesk
Algorithm
Requires a Machine Readable Dictionary such as WordNet
The steps are as follows :
1. Find the overlap between the features of different senses of an ambiguous word (sense
bag) and the features of the words in its context (context bag).
2. Weights can be given appropriately to each sense
3. The sense which has the maximum overlap is selected as the contextually appropriate sense.
Sense Bag: contains the words in all of the definitions of the ambiguous words
Context Bag: contains the words of the definitions of all context words
SEMANTIC DISAMBIGUATION 16
APPROACHES AND ALGORITHMS
LESK ALGORITHM
DICTIONARY AND KNOWLEDGE BASED METHODS
3 To convert into ash A black solid combustible substance formed by the partial decomposition
of vegetable matter without free access to air and under the influence of
moisture and often increased pressure and temperature that is widely used
as a fuel for burning
Problem: if a long sentence was considered, the database would explode and the
algorithm will take a long time
Example:
I went to the bank to donate blood for an old person
Bank has 18 definitions
Donate has 2 definitions
Blood has 24 definitions
Old has 28 definitions
Person has 16 definitions
SEMANTIC DISAMBIGUATION 18
APPROACHES AND ALGORITHMS
LESK ALGORITHM
DICTIONARY AND KNOWLEDGE BASED METHODS
SEMANTIC DISAMBIGUATION 19
APPROACHES AND ALGORITHMS
LESK ALGORITHM
DICTIONARY AND KNOWLEDGE BASED METHODS
1 a seat, especially for one person, usually having four legs for support
and a rest for the back and often having rests for the arms.
Other algorithms like the Walker and Random Walk approaches are
used and are available in Appendix A of the presentation.
SEMANTIC DISAMBIGUATION 21
SUPERVISED
APPROACHES AND ALGORITHMS
SUPERVISED METHODS
SEMANTIC DISAMBIGUATION 23
APPROACHES AND ALGORITHMS
NAÏVE BAYES ALGORITHM
SUPERVISED METHODS
In simple term, the classifier assigns the sense that has the biggest probability in the feature
set to be correct
We „naively‟ assume that features are independent from one another, and calculate the
probabilities using the training data and the weight of the features
Mathematically: Nc count(w, c) +1
P̂(c) = P̂(w | c) =
N count(c)+ | V |
3. Rank: higher log-likelihood means more predictive evidence, unless the target word
and its collocation words are found in the same order in the corpus
SEMANTIC DISAMBIGUATION 26
APPROACHES AND ALGORITHMS
DECISION LIST ALGORITHM
SUPERVISED METHODS
… … …
APPROACHES AND ALGORITHMS
COMPARISON
SUPERVISED METHODS
SEMANTIC DISAMBIGUATION 28
UNSUPERVISED
APPROACHES AND ALGORITHMS
HYPERFLEX
UNSUPERVISED APPROACHES
One of the most popular unsupervised methods in knowledge based approaches is the Hyperflex
Approach
Extracts the senses from the corpus itself without any human classification
The corpus senses respond in their turn to clusters of similar context of a word
The senses responses will create a co-occurrences graph of the target word with each edge having a
weight
For the example the co-occurrences graph for the word Gram would be:
SEMANTIC DISAMBIGUATION 30
APPROACHES AND ALGORITHMS
HYPERFLEX
UNSUPERVISED APPROACHES
SEMANTIC DISAMBIGUATION 31
APPROACHES AND ALGORITHMS
HYPERFLEX
UNSUPERVISED APPROACHES
SEMANTIC DISAMBIGUATION 32
APPROACHES AND ALGORITHMS
LIN‟S APPROACH
UNSUPERVISED APPROACHES
Lin‟s Approach works on the principle that two words could have similar meanings in a local context
The algorithms main goal is to search for Selectors Words that have a similar context to the context
word
The Target Word sense that has the same Hypernym* as most of the Selectors is then chosen
Consider this Example for the target word “Facility” and context word “Employ”:
The facility will employ 100 new employees. Selectors of “employ”
Senses of facility
installation
proficiency
readiness Hypernym: a word
toilet/bathroom that names a broad
category that
includes other
In this case , installation would be
words.
the chosen sense.
e.g.: “Primate” for
“Humans” and
SEMANTIC DISAMBIGUATION “Chimpanzee” 33
APPROACHES AND ALGORITHMS
MORE UNSUPERVISED APPROACHES
UNSUPERVISED APPROACHES
SEMANTIC DISAMBIGUATION 34
APPROACHES AND ALGORITHMS
UNSUPERVISED APPROACHES COMPARISON
UNSUPERVISED APPROACHES
Lin’s Algorithm 68.5% Tested on a corpus Most tested algorithm General Approach
containing 25 million
words containing 2832
polysemous* nouns
Hyperlex 97% Test on a set of 10 highly Highest Precision Rate Could fail to distinguish
polysemous French between finer senses of
words A new approach that a word (e.g. the
extracts information medicinal and narcotic
from a corpus sense of “drug”)
WSD using parallel 62.4% Trained using a English Can distinguish between Needs a parallel corpus
corpora Spanish parallel corpus the finer sense of a of multiple languages
of nouns word due to distinct which needs a lot of
translations processing
* Polysemous:
SEMANTIC DISAMBIGUATION Words that can have 35
multiple meanings
History
Difficulties
The used database includes all word Classifications of the different senses Clusters of words of similar context.
terms. of words.
Relies on the provided senses in Relies on the human classification of No need for human declarations ,
Machine Dictionaries the senses. results depend on the context words
37
SEMANTIC DISAMBIGUATION
EVALUATIONS AND DEMO
PYTHIA DEMO
Phythia
1. Go to http://omiotis.hua.gr/pythia/# or press above
2. Insert “Joe is a chair” as your text and press next, then choose short text
3. Choose Inter-Linear Programming and then Lesk-Like as we want to test an
algorithm similar to the Lesk one
4. Choose No for Sense pruning and then choose All Features for the
Classification model
5. Check your text when you are prompted to, you can see that chair will be given
the right meaning
6. Now try the following text “Joe took Ellie out on a date” you will see that date
was not given the correct meaning
SEMANTIC DISAMBIGUATION 38
EVALUATIONS AND DEMO
BABELFY DEMO
Babelfy
1. Go to http://babelfy.org/index or press above
2. Insert “Rami is a chair” as your text and press Babelfy, you will see that
Chair has been given the wrong meaning
3. Now try to give Babelfy more context by trying “Rami is a chair
member”, you will see that now the meaning of chair will be correct
4. As you can see, even Babelfy one of the most used WSD systems needs
a good amount of context for it to work
SEMANTIC DISAMBIGUATION 39
EVALUATIONS AND DEMO
GOOGLE TRANSLATE DEMO
Google Translate
1. Go to https://translate.google.com.lb/ or press above
2. Choose to translate from English to French
2. Insert “Rami is a chair member” as your text and translate you will see that
Chair has been given the wrong translation
3. Now try to give Google even more context by trying “Rami is the chair of the
board”, you will see that now the translation of chair will be correct
4. As you can see, also Google translate one of the most used translation systems
needs even more a fairly large amount of context for it to work correctly
SEMANTIC DISAMBIGUATION 40
History
Difficulties
CONCLUSION
CONCLUSION
All three methods are closely related
The denoted accuracy of each algorithm and the shown Demos prove that WSD
is still a long way from being completely perfect and truly reliable
SEMANTIC DISAMBIGUATION 42
APPENDIX A.1
WALKER‟S ALGORITHM
DICTIONARY AND KNOWLEDGE BASED METHODS
SEMANTIC DISAMBIGUATION 43
APPENDIX A.1
WALKER‟S ALGORITHM
DICTIONARY AND KNOWLEDGE BASED METHODS
SEMANTIC DISAMBIGUATION 44
APPENDIX A.2
RANDOM WALK ALGORITHM
DICTIONARY AND KNOWLEDGE BASED METHODS
0.46 0.97
0.42
a
S3 b a
S3 S3
c
0.49
e
0.35 0.63
S2 f S2 S2
k
g
h
i 0.58
0.92 0.56 l 0.67
j
S1 S1 S1 S1
SEMANTIC DISAMBIGUATION 46