PLearn 0.1
|
#include <WordNetSenseDictionary.h>
Public Member Functions | |
WordNetSenseDictionary () | |
Default constructor. | |
virtual string | classname () const |
virtual OptionList & | getOptionList () const |
virtual OptionMap & | getOptionMap () const |
virtual RemoteMethodMap & | getRemoteMethodMap () const |
virtual WordNetSenseDictionary * | deepCopy (CopiesMap &copies) const |
virtual int | getId (string symbol, TVec< string > options=TVec< string >(0)) |
Gives the ID of a symbol in the dictionary If the symbol is not in the dictionary, returns the index of oov token if update_mode = NO_UPDATE. | |
virtual void | getValues (TVec< string > options, Vec &values) |
Fills a Vec containing every possible ID values of the Dictionary Options can be specified to restrict the number of possible values. | |
virtual int | size (TVec< string > options=TVec< string >(0)) |
Get size of the dictionary (number of symbols in the dictionary) Options can be specified to restrict the number of possible values. | |
virtual void | parentsOf (int sense, TVec< int > &the_parents) |
Returns the parents of a sense (synset) Will give an empty vector is sense id incorrect or use_wordnet_hierarchy is false. | |
virtual void | childrenOf (int sense, TVec< int > &the_children) |
Returns the children of a sense (synset) Will give an empty vector is sense id incorrect or use_wordnet_hierarchy is false. | |
virtual int | rootNode () |
Return the id of WN_ROOT_NODE. | |
virtual real | sensePrior (string word, string sense) |
Prior distribution over senses of a word, given by WordNet. | |
virtual void | build () |
Post-constructor. | |
virtual void | makeDeepCopyFromShallowCopy (CopiesMap &copies) |
Transforms a shallow copy into a deep copy. | |
Static Public Member Functions | |
static string | _classname_ () |
static OptionList & | _getOptionList_ () |
static RemoteMethodMap & | _getRemoteMethodMap_ () |
static Object * | _new_instance_for_typemap_ () |
static bool | _isa_ (const Object *o) |
static void | _static_initialize_ () |
static const PPath & | declaringFile () |
Public Attributes | |
bool | options_stem_words |
Stem word before including in dictionary STEM/NO_STEM (ontology only) | |
bool | options_to_lower_case |
Put words to lower case. | |
string | symbol_type |
Type of representation (symbol) of the senses. | |
hash_map< string, Vec > | possible_values_for_word |
Possible values for a certain word. | |
bool | use_wordnet_hierarchy |
Indication that the WordNet hierarchy will be used. | |
hash_map< int, TVec< int > > | children |
Synset children mapping. | |
hash_map< int, TVec< int > > | parents |
Synset parents mapping. | |
hash_map< string, real > | sense_prior |
Prior distribution p(sense|word) given by WordNet. | |
Static Public Attributes | |
static StaticInitializer | _static_initializer_ |
Protected Member Functions | |
void | getSensesFromWordNet (TVec< string > options) |
Static Protected Member Functions | |
static void | declareOptions (OptionList &ol) |
Declares this class' options. | |
Protected Attributes | |
Vec | possible_values |
possible values vector | |
TVec< string > | stems |
Stems of words (temporary computation field) | |
TVec< string > | senses |
Senses of words (temporary computation field) | |
TVec< TVec< string > > | ancestors_vec |
Senses of words (temporary computation field) | |
TVec< int > | tagcnts |
Tag counts for senses (temporary computation field) | |
int | ret |
Temporary variable when returning an int;. | |
string | word_sense |
Temporary variable for sense_prior computation. | |
Private Types | |
typedef Dictionary | inherited |
Private Member Functions | |
void | build_ () |
This does the actual building. |
This class implements a Dictionary for WordNet senses. The symbols in the instantiated dictionary are senses (not words!).
Definition at line 87 of file WordNetSenseDictionary.h.
typedef Dictionary PLearn::WordNetSenseDictionary::inherited [private] |
Reimplemented from PLearn::Dictionary.
Definition at line 92 of file WordNetSenseDictionary.h.
PLearn::WordNetSenseDictionary::WordNetSenseDictionary | ( | ) |
Default constructor.
Definition at line 270 of file WordNetSenseDictionary.cc.
References PLERROR.
: options_stem_words(false), options_to_lower_case(false), symbol_type("sense_key"), use_wordnet_hierarchy(false) { if(wninit()<0) PLERROR("In WordNetSenseDictionary(): could not open WordNet database files"); }
string PLearn::WordNetSenseDictionary::_classname_ | ( | ) | [static] |
Reimplemented from PLearn::Dictionary.
Definition at line 279 of file WordNetSenseDictionary.cc.
OptionList & PLearn::WordNetSenseDictionary::_getOptionList_ | ( | ) | [static] |
Reimplemented from PLearn::Dictionary.
Definition at line 279 of file WordNetSenseDictionary.cc.
RemoteMethodMap & PLearn::WordNetSenseDictionary::_getRemoteMethodMap_ | ( | ) | [static] |
Reimplemented from PLearn::Dictionary.
Definition at line 279 of file WordNetSenseDictionary.cc.
Reimplemented from PLearn::Dictionary.
Definition at line 279 of file WordNetSenseDictionary.cc.
Object * PLearn::WordNetSenseDictionary::_new_instance_for_typemap_ | ( | ) | [static] |
Reimplemented from PLearn::Dictionary.
Definition at line 279 of file WordNetSenseDictionary.cc.
StaticInitializer WordNetSenseDictionary::_static_initializer_ & PLearn::WordNetSenseDictionary::_static_initialize_ | ( | ) | [static] |
Reimplemented from PLearn::Dictionary.
Definition at line 279 of file WordNetSenseDictionary.cc.
void PLearn::WordNetSenseDictionary::build | ( | ) | [virtual] |
Post-constructor.
The normal implementation should call simply inherited::build(), then this class's build_(). This method should be callable again at later times, after modifying some option fields to change the "architecture" of the object.
Reimplemented from PLearn::Dictionary.
Definition at line 306 of file WordNetSenseDictionary.cc.
References PLearn::Dictionary::build(), and build_().
{ inherited::build(); build_(); }
void PLearn::WordNetSenseDictionary::build_ | ( | ) | [private] |
This does the actual building.
Reimplemented from PLearn::Dictionary.
Definition at line 299 of file WordNetSenseDictionary.cc.
References PLERROR, symbol_type, and use_wordnet_hierarchy.
Referenced by build().
{ if(use_wordnet_hierarchy && symbol_type == "sense_key") PLERROR("In WordNetSenseDictionary::build_(): cannot use WordNet hierarchy with symbol type \"sense_key\""); }
Returns the children of a sense (synset) Will give an empty vector is sense id incorrect or use_wordnet_hierarchy is false.
Definition at line 570 of file WordNetSenseDictionary.cc.
References children, and PLearn::TVec< T >::resize().
{ if(children.find(sense) == children.end()) the_children.resize(0); else { the_children.resize(children[sense].length()); the_children << children[sense]; } }
string PLearn::WordNetSenseDictionary::classname | ( | ) | const [virtual] |
Reimplemented from PLearn::Dictionary.
Definition at line 279 of file WordNetSenseDictionary.cc.
void PLearn::WordNetSenseDictionary::declareOptions | ( | OptionList & | ol | ) | [static, protected] |
Declares this class' options.
Reimplemented from PLearn::Dictionary.
Definition at line 281 of file WordNetSenseDictionary.cc.
References PLearn::OptionBase::buildoption, children, PLearn::declareOption(), PLearn::Dictionary::declareOptions(), PLearn::OptionBase::learntoption, options_stem_words, options_to_lower_case, parents, possible_values_for_word, sense_prior, symbol_type, and use_wordnet_hierarchy.
{ declareOption(ol, "options_stem_words", &WordNetSenseDictionary::options_stem_words, OptionBase::buildoption, "Indication that words given as options should be stemmed when looking at their possible senses"); declareOption(ol, "options_to_lower_case", &WordNetSenseDictionary::options_to_lower_case, OptionBase::buildoption, "Indication that words given as options should be put to lower case"); declareOption(ol, "symbol_type", &WordNetSenseDictionary::symbol_type, OptionBase::buildoption, "Type of representation (symbol) of the senses. The currently supported types are:\n" " - \"sense_key\" (standard WordNet representation)\n" " - \"synset_key\" (custom made representation, that consists of maximum three words from the synset, the POS category and the byte offset of the synset)\n" "Note that the Dictionary will always accept \"sense_key\" symbols as input, but will convert it automatically to\n" "the symbol_type representation and treat it as such."); declareOption(ol, "possible_values_for_word", &WordNetSenseDictionary::possible_values_for_word, OptionBase::learntoption, "Mapping of the possible id values for a given word"); declareOption(ol, "use_wordnet_hierarchy", &WordNetSenseDictionary::use_wordnet_hierarchy, OptionBase::buildoption, "Indication that the WordNet hierarchy will be used"); declareOption(ol, "children", &WordNetSenseDictionary::children, OptionBase::learntoption, "Synset children mapping"); declareOption(ol, "parents", &WordNetSenseDictionary::parents, OptionBase::learntoption, "Synset parents mapping"); declareOption(ol, "sense_prior", &WordNetSenseDictionary::sense_prior, OptionBase::learntoption, "Prior distribution for p(sense|word) given by WordNet"); inherited::declareOptions(ol); }
static const PPath& PLearn::WordNetSenseDictionary::declaringFile | ( | ) | [inline, static] |
Reimplemented from PLearn::Dictionary.
Definition at line 176 of file WordNetSenseDictionary.h.
WordNetSenseDictionary * PLearn::WordNetSenseDictionary::deepCopy | ( | CopiesMap & | copies | ) | const [virtual] |
Reimplemented from PLearn::Dictionary.
Definition at line 279 of file WordNetSenseDictionary.cc.
int PLearn::WordNetSenseDictionary::getId | ( | string | symbol, |
TVec< string > | options = TVec<string>(0) |
||
) | [virtual] |
Gives the ID of a symbol in the dictionary If the symbol is not in the dictionary, returns the index of oov token if update_mode = NO_UPDATE.
Insert the new word otherwise and return its index When a symbol is added to the dictionary, the following fields are updated: string_to_int, int_to_string, values Options can be specified ...
Reimplemented from PLearn::Dictionary.
Definition at line 451 of file WordNetSenseDictionary.cc.
References PLearn::cstr(), PLearn::TVec< T >::find(), PLearn::Dictionary::getId(), PLearn::getSynsetKey(), getValues(), PLearn::TVec< T >::length(), PLearn::pl_isnumber(), PLERROR, PLWARNING, possible_values, ret, symbol_type, PLearn::toint(), UPDATE, and PLearn::Dictionary::update_mode.
{ // This permits converting an input symbol as sense_key // to some other symbol_type... if(strchr(symbol.c_str(),'%') && symbol_type != "sense_key") { if(symbol_type == "synset_key") { char* symbol_cstr = cstr(symbol); symbol = getSynsetKey(GetSynsetForSense(symbol_cstr)); delete symbol_cstr; } else PLERROR("In getId(): symbol_type %s not valid", symbol_type.c_str()); } // Convert WordNet sense number to sense symbol if(options.length() == 2 && pl_isnumber(symbol)) { char* cword = cstr(options[0]); int wn_pos = -1; if(strstr(options[1].c_str(),"NN")) wn_pos = NOUN; if(strstr(options[1].c_str(),"VB")) wn_pos = VERB; if(strstr(options[1].c_str(),"JJ")) wn_pos = ADJ; if(strstr(options[1].c_str(),"RB")) wn_pos = ADV; if (wn_pos < 0) PLERROR("In WordNetSenseDictionary::extractSenses(): %s is an invalid POS", options[1].c_str()); SynsetPtr ssp = NULL; IndexPtr idx = getindex(cword, wn_pos); ssp = findtheinfo_ds(cword, wn_pos, -HYPERPTR, toint(symbol)); if (ssp == NULL) PLERROR("In WordNetSenseDictionary::extractSenses(): cannot find sense with number %s for word %s of POS %s", symbol.c_str(), options[0].c_str(), options[1].c_str()); if(symbol_type == "sense_key") { char *charsk = WNSnsToStr(idx, toint(symbol)); symbol = string(charsk); delete charsk; } else if(symbol_type == "synset_key") { symbol = getSynsetKey(ssp); } else PLERROR("In extractSenses(): symbol_type %s not valid", symbol_type.c_str()); if(ssp->nextss != NULL) PLERROR("In extractSenses(): more than one possible sense for sense number %s of word %s of POS %s", symbol.c_str(), options[0].c_str(), options[1].c_str()); free_syns(ssp); free_index(idx); delete cword; } ret = inherited::getId(symbol,options); // call getValues, which fills possible_values and gets the ids for all those senses, to do a compatibility check, if necessary if(update_mode == UPDATE && options.length() != 0) { getValues(options, possible_values); //getSensesFromWordNet(options); if(possible_values.find(ret) < 0) PLWARNING("In WordNetSenseDictionary::getId(): sense %s is not among possible symbols",symbol.c_str()); } /* // Extracting new senses. If dictionary can be updated and // if symbol_type == "synset_key", then need to be sure that all // synsets were inserted, even if the current synset is !!! if(update_mode == UPDATE && (symbol_type == "synset_key" || !isIn(symbol,options)) ) for(int i=0; i<senses.length(); i++) inherited::getId(senses[i],options); */ return ret; }
OptionList & PLearn::WordNetSenseDictionary::getOptionList | ( | ) | const [virtual] |
Reimplemented from PLearn::Dictionary.
Definition at line 279 of file WordNetSenseDictionary.cc.
OptionMap & PLearn::WordNetSenseDictionary::getOptionMap | ( | ) | const [virtual] |
Reimplemented from PLearn::Dictionary.
Definition at line 279 of file WordNetSenseDictionary.cc.
RemoteMethodMap & PLearn::WordNetSenseDictionary::getRemoteMethodMap | ( | ) | const [virtual] |
Reimplemented from PLearn::Dictionary.
Definition at line 279 of file WordNetSenseDictionary.cc.
void PLearn::WordNetSenseDictionary::getSensesFromWordNet | ( | TVec< string > | options | ) | [protected] |
Definition at line 312 of file WordNetSenseDictionary.cc.
References ancestors_vec, c, children, PLearn::TVec< T >::copy(), PLearn::extractSenses(), PLearn::find(), PLearn::Dictionary::getId(), i, PLearn::Dictionary::isIn(), j, PLearn::TVec< T >::last(), PLearn::TVec< T >::length(), PLearn::lowerstring(), options_stem_words, options_to_lower_case, parents, PLERROR, PLearn::removeblanks(), PLearn::TVec< T >::resize(), sense_prior, senses, stems, PLearn::stemsOfWord(), PLearn::sum(), symbol_type, tagcnts, use_wordnet_hierarchy, WN_ROOT_NODE, and word_sense.
Referenced by getValues().
{ string word = ""; stems.resize(0); int wn_pos = -1; senses.resize(0); ancestors_vec.resize(0); tagcnts.resize(0); word = removeblanks(options[0]); // This may be unnecessary, given "options_stem_words" if(options_to_lower_case) word = lowerstring(word); if(wn_pos < 0) { // Extract senses for all possible POS // NOUN extractSenses(word,NOUN,symbol_type,senses, tagcnts, ancestors_vec, use_wordnet_hierarchy); if(options_stem_words) { stemsOfWord(word,NOUN,stems); for(int i=0; i<stems.length(); i++) if(word != stems[i]) extractSenses(stems[i],NOUN,symbol_type,senses, tagcnts, ancestors_vec, use_wordnet_hierarchy); } // VERB extractSenses(word,VERB,symbol_type,senses, tagcnts, ancestors_vec, use_wordnet_hierarchy); if(options_stem_words) { stemsOfWord(word,VERB,stems); for(int i=0; i<stems.length(); i++) if(word != stems[i]) extractSenses(stems[i],VERB,symbol_type,senses, tagcnts, ancestors_vec, use_wordnet_hierarchy); } // ADJ extractSenses(word,ADJ,symbol_type,senses, tagcnts, ancestors_vec, use_wordnet_hierarchy); if(options_stem_words) { stemsOfWord(word,ADJ,stems); for(int i=0; i<stems.length(); i++) if(word != stems[i]) extractSenses(stems[i],ADJ,symbol_type,senses, tagcnts, ancestors_vec, use_wordnet_hierarchy); } // ADV extractSenses(word,ADV,symbol_type,senses, tagcnts, ancestors_vec, use_wordnet_hierarchy); if(options_stem_words) { stemsOfWord(word,ADV,stems); for(int i=0; i<stems.length(); i++) if(word != stems[i]) extractSenses(stems[i],ADV,symbol_type,senses, tagcnts, ancestors_vec, use_wordnet_hierarchy); } if(tagcnts.length()>0) { word_sense = word + " " + senses[0]; if(sense_prior.find(word_sense) == sense_prior.end()) { int sum = 0; for(int i=0; i<tagcnts.length(); i++) sum += tagcnts[i]; for(int i=0; i<tagcnts.length();i++) { word_sense = word + " " + senses[i]; sense_prior[word_sense] = ((real)tagcnts[i])/sum; } } } } else { // Extract senses only for wn_pos extractSenses(word,wn_pos,symbol_type,senses, tagcnts, ancestors_vec, use_wordnet_hierarchy); if(options_stem_words) { stemsOfWord(word,wn_pos,stems); for(int i=0; i<stems.length(); i++) if(word != stems[i]) extractSenses(stems[i],wn_pos,symbol_type,senses, tagcnts, ancestors_vec, use_wordnet_hierarchy); } PLERROR("In WordNetSenseDictionary::getSensesFromWordNet(): producing sense_prior not implemented yet"); } if(use_wordnet_hierarchy) { int n1,n2; string str1,str2; for(int i=0; i<ancestors_vec.length(); i++) { for(int j=0; j<ancestors_vec[i].length(); j++) { if(j != ancestors_vec[i].length()-1) { str1 = ancestors_vec[i][j]; str2 = ancestors_vec[i][j+1]; } else { str1 = ancestors_vec[i].last(); str2 = WN_ROOT_NODE; } n1 = inherited::getId(str1); n2 = inherited::getId(str2); if(!isIn(str1) || !isIn(str2)) continue; if(parents.find(n1) == parents.end()) { TVec<int> p(1); p[0] = n2; parents[n1] = p.copy(); } else { if(parents[n1].find(n2)>=0) parents[n1].push_back(n2); } if(children.find(n2) == children.end()) { TVec<int> c(1); c[0] = n1; children[n2] = c.copy(); } else { if(children[n2].find(n1)>=0) children[n2].push_back(n1); } } } } }
Fills a Vec containing every possible ID values of the Dictionary Options can be specified to restrict the number of possible values.
A Vec instead of a TVec<int> is required, for compatibility with the getValues() function of VMatrix objects.
Reimplemented from PLearn::Dictionary.
Definition at line 526 of file WordNetSenseDictionary.cc.
References PLearn::TVec< T >::copy(), PLearn::Dictionary::getId(), getSensesFromWordNet(), PLearn::Dictionary::getValues(), i, PLearn::TVec< T >::length(), possible_values_for_word, PLearn::TVec< T >::resize(), and senses.
Referenced by getId(), and size().
{ if(options.length() == 0) return inherited::getValues(options,values); else { //refill_possible_values = 1; //if(options.length() > 1) PLERROR("In WordNetSenseDictionary::getSensesFromWordNet(): options.length()>1 not supported"); if(possible_values_for_word.find(options[0]) == possible_values_for_word.end()) { getSensesFromWordNet(options); values.resize(senses.length()); for(int i=0; i<senses.length(); i++) values[i] = inherited::getId(senses[i]); possible_values_for_word[options[0]] = values.copy(); } else { values.resize(possible_values_for_word[options[0]].length()); values << possible_values_for_word[options[0]]; } } }
void PLearn::WordNetSenseDictionary::makeDeepCopyFromShallowCopy | ( | CopiesMap & | copies | ) | [virtual] |
Transforms a shallow copy into a deep copy.
Reimplemented from PLearn::Dictionary.
Definition at line 592 of file WordNetSenseDictionary.cc.
References ancestors_vec, children, PLearn::deepCopyField(), PLearn::Dictionary::makeDeepCopyFromShallowCopy(), parents, possible_values, possible_values_for_word, sense_prior, senses, stems, and tagcnts.
{ inherited::makeDeepCopyFromShallowCopy(copies); deepCopyField(possible_values, copies); deepCopyField(stems, copies); deepCopyField(senses, copies); deepCopyField(ancestors_vec, copies); deepCopyField(tagcnts, copies); deepCopyField(possible_values_for_word, copies); deepCopyField(children, copies); deepCopyField(parents, copies); deepCopyField(sense_prior, copies); }
Returns the parents of a sense (synset) Will give an empty vector is sense id incorrect or use_wordnet_hierarchy is false.
Definition at line 560 of file WordNetSenseDictionary.cc.
References parents, and PLearn::TVec< T >::resize().
{ if(parents.find(sense) == parents.end()) the_parents.resize(0); else { the_parents.resize(parents[sense].length()); the_parents << parents[sense]; } }
int PLearn::WordNetSenseDictionary::rootNode | ( | ) | [virtual] |
Return the id of WN_ROOT_NODE.
Definition at line 580 of file WordNetSenseDictionary.cc.
References PLearn::Dictionary::getId(), and WN_ROOT_NODE.
{ return inherited::getId(WN_ROOT_NODE); }
real PLearn::WordNetSenseDictionary::sensePrior | ( | string | word, |
string | sense | ||
) | [virtual] |
Prior distribution over senses of a word, given by WordNet.
Definition at line 584 of file WordNetSenseDictionary.cc.
References sense_prior, and word_sense.
{ word_sense = word + " " + sense; if(sense_prior.find(word_sense) == sense_prior.end()) return 0; else return sense_prior[word_sense]; }
Get size of the dictionary (number of symbols in the dictionary) Options can be specified to restrict the number of possible values.
Reimplemented from PLearn::Dictionary.
Definition at line 550 of file WordNetSenseDictionary.cc.
References getValues(), PLearn::TVec< T >::length(), possible_values, and PLearn::Dictionary::size().
{ if(options.length() == 0) return inherited::size(); else { getValues(options,possible_values); return possible_values.length(); } }
Reimplemented from PLearn::Dictionary.
Definition at line 176 of file WordNetSenseDictionary.h.
TVec< TVec<string> > PLearn::WordNetSenseDictionary::ancestors_vec [protected] |
Senses of words (temporary computation field)
Definition at line 140 of file WordNetSenseDictionary.h.
Referenced by getSensesFromWordNet(), and makeDeepCopyFromShallowCopy().
hash_map<int, TVec<int> > PLearn::WordNetSenseDictionary::children |
Synset children mapping.
Definition at line 123 of file WordNetSenseDictionary.h.
Referenced by childrenOf(), declareOptions(), getSensesFromWordNet(), and makeDeepCopyFromShallowCopy().
Stem word before including in dictionary STEM/NO_STEM (ontology only)
Definition at line 106 of file WordNetSenseDictionary.h.
Referenced by declareOptions(), and getSensesFromWordNet().
Put words to lower case.
Definition at line 109 of file WordNetSenseDictionary.h.
Referenced by declareOptions(), and getSensesFromWordNet().
hash_map<int, TVec<int> > PLearn::WordNetSenseDictionary::parents |
Synset parents mapping.
Definition at line 126 of file WordNetSenseDictionary.h.
Referenced by declareOptions(), getSensesFromWordNet(), makeDeepCopyFromShallowCopy(), and parentsOf().
Vec PLearn::WordNetSenseDictionary::possible_values [protected] |
possible values vector
Definition at line 97 of file WordNetSenseDictionary.h.
Referenced by getId(), makeDeepCopyFromShallowCopy(), and size().
hash_map<string,Vec > PLearn::WordNetSenseDictionary::possible_values_for_word |
Possible values for a certain word.
Definition at line 115 of file WordNetSenseDictionary.h.
Referenced by declareOptions(), getValues(), and makeDeepCopyFromShallowCopy().
int PLearn::WordNetSenseDictionary::ret [protected] |
Temporary variable when returning an int;.
Definition at line 146 of file WordNetSenseDictionary.h.
Referenced by getId().
hash_map<string, real> PLearn::WordNetSenseDictionary::sense_prior |
Prior distribution p(sense|word) given by WordNet.
Definition at line 129 of file WordNetSenseDictionary.h.
Referenced by declareOptions(), getSensesFromWordNet(), makeDeepCopyFromShallowCopy(), and sensePrior().
TVec<string> PLearn::WordNetSenseDictionary::senses [protected] |
Senses of words (temporary computation field)
Definition at line 137 of file WordNetSenseDictionary.h.
Referenced by getSensesFromWordNet(), getValues(), and makeDeepCopyFromShallowCopy().
TVec<string> PLearn::WordNetSenseDictionary::stems [protected] |
Stems of words (temporary computation field)
Definition at line 134 of file WordNetSenseDictionary.h.
Referenced by getSensesFromWordNet(), and makeDeepCopyFromShallowCopy().
Type of representation (symbol) of the senses.
Definition at line 112 of file WordNetSenseDictionary.h.
Referenced by build_(), declareOptions(), getId(), and getSensesFromWordNet().
TVec<int> PLearn::WordNetSenseDictionary::tagcnts [protected] |
Tag counts for senses (temporary computation field)
Definition at line 143 of file WordNetSenseDictionary.h.
Referenced by getSensesFromWordNet(), and makeDeepCopyFromShallowCopy().
Indication that the WordNet hierarchy will be used.
Definition at line 120 of file WordNetSenseDictionary.h.
Referenced by build_(), declareOptions(), and getSensesFromWordNet().
string PLearn::WordNetSenseDictionary::word_sense [protected] |
Temporary variable for sense_prior computation.
Definition at line 149 of file WordNetSenseDictionary.h.
Referenced by getSensesFromWordNet(), and sensePrior().