34 #ifndef _MOOT_SUFFIX_TRIE_H 35 #define _MOOT_SUFFIX_TRIE_H 56 static const size_t SuffixTrieDefaultMaxLen = 0;
86 SuffixTrie(
size_t max_length =SuffixTrieDefaultMaxLen,
89 : TrieType(max_length,use_case),
104 const TagIDTable &tagids,
114 bool _build_assoc(
const mootLexfreqs &lf,
const TagIDTable &tagids);
120 const TagIDTable &tagids,
127 const TagIDTable &tagids,
134 const TagIDTable &tagids,
145 if (matchlen) *matchlen = 0;
146 for ( ; dtr != end() && dtr->data.empty(); dtr=find_mother(*dtr)) {
147 if (matchlen) (*matchlen)--;
157 if (matchlen) *matchlen = 0;
158 for ( ; dtr != end() && dtr->data.empty(); dtr=find_mother(*dtr)) {
159 if (matchlen) (*matchlen)--;
167 size_t *matchlen=NULL)
168 {
return find_ancestor_nonempty(rfind_longest(tokstr,matchlen),matchlen); };
172 size_t *matchlen=NULL)
174 {
return const_find_ancestor_nonempty(rfind_longest(tokstr,matchlen),matchlen); };
183 return (ti==end() ? default_data() : ti->data);
190 void txtdump(FILE *out,
const TagIDTable &tagids)
const;
197 #endif // _MOOT_SUFFIX_TRIE_H iterator rfind_longest_nonempty(const mootTokString &tokstr, size_t *matchlen=__null)
Definition: mootSuffixTrie.h:166
Top-level class for suffix tries.
Definition: mootSuffixTrie.h:46
Top-level trie class-template using an adjaceny table.
Definition: mootTrieVector.h:143
mootEnumID TagID
Definition: mootSuffixTrie.h:59
HMM training data: lexical frequencies: raw.
vector_type::iterator iterator
Definition: mootTrieVector.h:164
LISP-style assoc list using vector<>: map-like class with small memory footprint. Useful for small as...
Definition: mootAssocVector.h:130
Definition: mootEnum.h:67
AssocVector< mootEnumID, ProbT > SuffixTrieDataT
Definition: mootSuffixTrie.h:42
trie implementation using std::vector<> for underlying storage
Class for storage & retrieval of raw N-Gram frequencies.
Definition: mootNgrams.h:44
Class for storage and retrieval of raw lexical frequencies.
Definition: mootLexfreqs.h:44
float ProbT
Definition: mootTypes.h:63
vector_type::const_iterator const_iterator
Definition: mootTrieVector.h:165
runtime enumerations (1-1 maps: symbolic identifiers <-> unsigned integers)
ProbT CountT
Definition: mootTypes.h:67
HMM training data: n-gram frequencies: raw.
LISP-style assoc vectors.
moot::UInt mootEnumID
Definition: mootEnum.h:45
string mootTokString
Definition: mootToken.h:62