|
FreeLing
3.0
|
Class semanticDB implements a semantic DB interface. More...
#include <semdb.h>

Public Member Functions | |
| semanticDB (const std::wstring &) | |
| Constructor. | |
| ~semanticDB () | |
| Destructor. | |
| void | get_WN_keys (const std::wstring &, const std::wstring &, const std::wstring &, std::list< std::pair< std::wstring, std::wstring > > &) const |
| Compute list of lemma-pos to search in WN for given word, according to mapping rules. | |
| std::list< std::wstring > | get_sense_words (const std::wstring &) const |
| get list of words for a sense | |
| std::list< std::wstring > | get_word_senses (const std::wstring &, const std::wstring &, const std::wstring &) const |
| get list of senses for a lemma+pos | |
| sense_info | get_sense_info (const std::wstring &) const |
| get sense info for a sense | |
Private Attributes | |
| std::list< posmaprule > | posmap |
| map of PoS tags to WN lemma+postag | |
| database * | form_dict |
| map of (lema,pos) -> form | |
| database * | sensesdb |
| actual storage | |
| database * | wndb |
Class semanticDB implements a semantic DB interface.
| semanticDB::semanticDB | ( | const std::wstring & | wsdFile | ) |
Constructor.
Create the sense annotator.
References util::absolute(), DB_MAP, ERROR_CRASH, posmaprule::lemma, util::open_utf8_file(), posmaprule::pos, and posmaprule::wnpos.
Destructor.
Destroy sense annotator module, close database.
| sense_info semanticDB::get_sense_info | ( | const std::wstring & | ) | const |
get sense info for a sense
Get info for a sense+pos.
access DB and split obtained data_string into fields and store appropriately in a sense_info object
add also list of synset words
References sense_info::words.
Referenced by check_tonto::eval(), check_semfile::eval(), check_synon::eval(), and check_asynon::eval().
| list< wstring > semanticDB::get_sense_words | ( | const std::wstring & | ) | const |
| void semanticDB::get_WN_keys | ( | const std::wstring & | , |
| const std::wstring & | , | ||
| const std::wstring & | , | ||
| std::list< std::pair< std::wstring, std::wstring > > & | |||
| ) | const |
Compute list of lemma-pos to search in WN for given word, according to mapping rules.
Compute list of lemma-pos to search in WN for given word and analysis, according to mapping rules.
References TRACE, and util::wstring2list().
| list< wstring > semanticDB::get_word_senses | ( | const std::wstring & | , |
| const std::wstring & | , | ||
| const std::wstring & | |||
| ) | const |
get list of senses for a lemma+pos
Get senses for a lemma+pos.
References util::list2wstring(), TRACE, and util::wstring2list().
Referenced by check_tonto::eval(), check_semfile::eval(), check_synon::eval(), and check_asynon::eval().
database* semanticDB::form_dict [private] |
map of (lema,pos) -> form
std::list<posmaprule> semanticDB::posmap [private] |
map of PoS tags to WN lemma+postag
database* semanticDB::sensesdb [private] |
actual storage
database* semanticDB::wndb [private] |
1.7.6.1