This module searches the lemma of each analysis in a sense dictionary, and enriches the analysis with the list of senses found there.
Note that this is not disambiguation, all senses for the lemma are returned.
The module receives a file containing the sense dictionary. FreeLing provides WordNet-based [Fel98,Vos98] dictionaries, but the results of this module can be changed to any other sense catalogue simply providing a different sense dictionary file.
class senses { public: /// Constructor: receives the name of the dictionary file and a boolean. senses(const std::string &, bool); /// sense annotate selected analysis for each word in given sentences void analyze(std::list<sentence> &); };
The constructor of this class receives:
For instance, the word crane has the follwing analysis:
crane crane NN 0.833 crane VB 0.083 crane VBP 0.083
If the list of senses is simply added to each of them (that is, the duplicate boolean is set to false), you will get:
crane crane NN 0.833 02516101:01524724 crane VB 0.083 00019686 crane VBP 0.083 00019686
But if you set the boolean to true, the NN analysis will be duplicated for each of its possible senses:
crane crane NN 0.416 02516101 crane NN 0.416 01524724 crane VB 0.083 00019686 crane VBP 0.083 00019686
Lluís Padró 2010-09-02