This module is not a main processor in the default analysis chain, but it is used by the other modules that need access to the semantic database: The sense annotator senses, the word sense disambiguator ukb_wrap, the dependency parser dep_txala, and the coreference solver coref.
Moreover, this module can be used by the applications to enrich or post process the results of the analysis.
The API for this module is
class semanticDB { public: /// Constructor semanticDB(const std::string &); /// Compute list of lemma-pos to search in WN for given word, /// according to mapping rules. void get_WN_keys(const std::wstring &, const std::wstring &, const std::wstring &, std::list<std::pair<std::wstring,std::wstring> > &) const; /// get list of words for a sense+pos std::list<std::string> get_sense_words(const std::string &, const std::string &) const; /// get list of senses for a lemma+pos std::list<std::string> get_word_senses(const std::string &, const std::string &) const; /// get sense info for a sensecode+pos sense_info get_sense_info(const std::string &, const std::string &) const; };
The constructor receives a configuration file, with the following contents:
<WNPosMap>
which establishes which PoS found
in the morphological dictionary should be mapped to each WN
part-of-speech. Rule format is described in section 4.2.1.
<DataFiles>
specifying
the knowledge bases required by the algorithm.
This section may contain up to three keywords, with the format:
<DataFiles> senseDictFile ./senses30.src wnFile ../common/wn30.src formDictFile ./dicc.src </DataFiles>
senseDictFile
is the sense repository, with the format
described in section 4.2.2.
wnFile
is a file stating hyperonymy relations and other semantic
information for each sense. The format is described in section 4.2.3.
formDictFile
may be needed if mapping rules in
<WNPosMap>
require it. It is a regular form file with morphological information,
as described in section 3.9.