33 #ifndef _MOOT_DYNHMM_H 34 #define _MOOT_DYNHMM_H 112 { hash_ngrams=
true; };
130 n_toks = tokids.size();
135 if (n_toks <= tokid_max) {
136 tokids.resize(tokid_max+1);
137 lexprobs.resize(tokid_max+1);
138 n_toks = tokids.size();
146 TokID tokid = tokids.get_id(tok_text);
155 assert(hash_ngrams==
true);
156 if (n_tags <= tagid_max) {
157 tagids.resize(tagid_max+1);
158 n_tags = tagids.size();
167 if (tagids.nameExists(tagstr))
168 return tagids.name2id(tagstr);
169 TagID tagid = tagids.get_id(tagstr);
170 tagset_resize(tagid);
201 tw->
printf_raw(
" +DynHMM class : %s\n",
"mootDynHMM (?)");
235 typedef std::map<TokStr,ProbT> TokProbMap;
236 typedef std::map<TagStr,ProbT> TagProbMap;
237 typedef std::map<TagStr,TokProbMap> TagTokProbMap;
263 size_t tagids_size_orig;
292 virtual bool load_model(
const string &modelname,
294 const char *myname=
"mootDynLexHMM::load_model()",
295 bool do_estimate_nglambdas=
true,
296 bool do_estimate_wlambdas=
true,
297 bool do_estimate_clambdas=
true,
298 bool do_build_suffix_trie=
true,
299 bool do_compute_logprobs=
true);
326 void dynlex_clear(
void);
339 return a.
prob + Ftw_eps;
346 virtual void dynlex_populate_lexprobs(
void);
387 mootDynLexHMM::set_options(opts);
398 return Ftw_eps + pow(dynlex_base, -dynlex_beta * a.
prob);
404 mootDynLexHMM::tw_put_info(tw);
405 tw->
printf_raw(
" +DynHMM class : %s\n",
"mootDynLexHMM_Boltzmann");
406 tw->
printf_raw(
" dynlex_base : %g\n", dynlex_base);
407 tw->
printf_raw(
" dynlex_beta : %g\n", dynlex_beta);
Type for a single morphological analysis.
Definition: mootToken.h:106
~= "Boltzmann" ~= mootDynLexHMM_Boltzmann
Definition: mootDynHMM.h:50
1st-order Hidden Markov Model Tagger/Disambiguator class.
Definition: mootHMM.h:120
mootDynHMM(void)
Definition: mootDynHMM.h:111
Hidden Markov Model tagger/disambiguator.
virtual ~mootDynHMM(void)
Definition: mootDynHMM.h:115
bool text_tags
Definition: mootDynHMM.h:68
abstract HMM subclass for use with dynamic lexical probabilities.
Definition: mootDynHMM.h:97
mootEnumID TokID
Definition: mootHMM.h:130
~= "Freq" ~= mootDynLexHMM
Definition: mootDynHMM.h:49
virtual void printf_raw(const char *fmt,...)
Abstract class for token input.
Definition: mootTokenIO.h:208
class mootDynHMM * newDynHMM(const std::string &which="Freq", const mootDynHMMOptions &opts=mootDynHMMOptions())
unknown
Definition: mootDynHMM.h:48
Class for storage and retrieval of raw lexical-class frequencies.
Definition: mootClassfreqs.h:44
void tagset_resize(TagID tagid_max)
Definition: mootDynHMM.h:154
~= "MIParser" ~= mootMIParser
Definition: mootDynHMM.h:51
Class for storage & retrieval of raw N-Gram frequencies.
Definition: mootNgrams.h:44
ProbT dynlex_base
Definition: mootDynHMM.h:64
Generic user-level options structure for built-in mootDynHMM subclasses.
Definition: mootDynHMM.h:56
ProbT Ftw_eps
Definition: mootDynHMM.h:61
High-level token information object.
Definition: mootToken.h:96
mootDynHMM subclass using a Maxwell-Boltzmann distribution to estimate f(w,t)
Definition: mootDynHMM.h:368
Class for storage and retrieval of raw lexical frequencies.
Definition: mootLexfreqs.h:44
placeholder
Definition: mootDynHMM.h:52
float ProbT
Definition: mootTypes.h:63
DynHMMClassId
Enum for built-in mootDynHMM estimator modes (subclasses)
Definition: mootDynHMM.h:47
void lex_resize(TokID tokid_max)
Definition: mootDynHMM.h:134
void lex_clear(void)
Definition: mootDynHMM.h:126
~mootDynHMMOptions(void)
Definition: mootDynHMM.h:80
list< mootToken > mootSentence
Definition: mootToken.h:630
bool invert_lexp
Definition: mootDynHMM.h:59
Abstract class for token output.
Definition: mootTokenIO.h:700
ProbT prob
Definition: mootToken.h:118
std::map< TagStr, TagProbMap > TokTagProbMap
Definition: mootDynHMM.h:244
string mootTagString
Definition: mootToken.h:59
TokID lex_get_tokid(const mootTokString &tok_text)
Definition: mootDynHMM.h:144
virtual void set_options(const mootDynHMMOptions &opts)
Definition: mootDynHMM.h:118
ProbT dynlex_beta
Definition: mootDynHMM.h:65
std::string newtag_str
Definition: mootDynHMM.h:60
mootDynHMMOptions(void)
Definition: mootDynHMM.h:71
string mootTokString
Definition: mootToken.h:62
mootEnumID TagID
Definition: mootHMM.h:127
mootDynHMM subclass for dynamic lexical probabilities
Definition: mootDynHMM.h:234