State of the art Lexical Substitution in Context
pip3 install lexsub Release: https://pypi.org/project/lexsub/ Version: 1.0.5
The Lexical Substitution task involves selecting and ranking lexical paraphrases for a target word in a given sentential context. In the task, annotators and systems find an alternative substitute word or phrase for a target word in context. The task involves both finding the synonyms and disambiguating the context. To give an example:
Context: The wine was too strong to drink. Target Word: strong Predicted Candidates (Ranked): powerful potent warm hot solid hard
Powerful and potent are much better replacements as indicated by
the score next to them as well. Whereas, all are viable
replacement candidates given the context from a language modeling
Now notice two important things that is interesting:
- Not all synonyms fit in the context.
(direct lexical substitutions aka synonyms won’t always work)
- Not all words that fit in the context preserve the meaning of the sentence. (LM score doesn’t always correlate)
A. Lexical Substitution:
B. Word Sense Disambiguation:
Release history Release notifications | RSS feed
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.