FreeLing  3.0
Public Member Functions | Private Attributes
semanticDB Class Reference

Class semanticDB implements a semantic DB interface. More...

#include <semdb.h>

Collaboration diagram for semanticDB:
Collaboration graph
[legend]

List of all members.

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< posmapruleposmap
 map of PoS tags to WN lemma+postag
databaseform_dict
 map of (lema,pos) -> form
databasesensesdb
 actual storage
databasewndb

Detailed Description

Class semanticDB implements a semantic DB interface.


Constructor & Destructor Documentation

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.


Member Function Documentation

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

get list of words for a sense

Get synonyms for a sense+pos.

References util::wstring2list().

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().


Member Data Documentation

map of (lema,pos) -> form

std::list<posmaprule> semanticDB::posmap [private]

map of PoS tags to WN lemma+postag

actual storage


The documentation for this class was generated from the following files: