|
TRF Language Model
|
include all the feature table More...
#include <trf-feature.h>
Public Member Functions | |
| Feat (int nOrder=0, bool bClass=true) | |
| ~Feat () | |
| void | Reset (int nOrder, bool bClass) |
| Reset, set the order. Node: the maximum order (including the skip) may be larger than nOrder. More... | |
| void | Reset (const char *pfeatType) |
| Reset, read a feature type files. More... | |
| int | GetMaxOrder () |
| Get maximum order. More... | |
| int | GetNum () const |
| Get number. More... | |
| void | Find (Array< int > &afeat, Seq &seq, int pos, int order) |
| Find the ngram feature with a fixed order. More... | |
| void | Find (Array< int > &afeat, Seq &seq) |
| Find all the feature in the sequence. More... | |
| void | FindClass (Array< int > &afeat, Seq &seq, int pos, int order) |
| Find the class ngram feature with a fixed order. More... | |
| void | FindWord (Array< int > &afeat, Seq &seq, int pos, int order) |
| Find the ngram feature depending on word[pos]. More... | |
| void | FindPosDep (Array< int > &afeat, Seq &seq, int pos, int type=0) |
| Find the class ngram depending on the nPos. More... | |
| void | LoadFeatFromCorpus (const char *path, Vocab *pv) |
| Load Features from corpus. More... | |
| void | WriteT (File &file, PValue *pValue=NULL) |
| Write the features. More... | |
| void | ReadT (File &file, PValue *pValue=NULL) |
| Read the features. More... | |
Public Attributes | |
| Array< FeatTable * > | m_aTable |
| different feature table More... | |
| int | m_nTotalNum |
| total feature number More... | |
include all the feature table
Definition at line 179 of file trf-feature.h.
|
inline |
Definition at line 185 of file trf-feature.h.
|
inline |
Definition at line 192 of file trf-feature.h.
Find the ngram feature with a fixed order.
Definition at line 443 of file trf-feature.cpp.
Find all the feature in the sequence.
Definition at line 449 of file trf-feature.cpp.
Find the class ngram feature with a fixed order.
Definition at line 455 of file trf-feature.cpp.
Find the class ngram depending on the nPos.
Definition at line 473 of file trf-feature.cpp.
Find the ngram feature depending on word[pos].
Definition at line 464 of file trf-feature.cpp.
| int trf::Feat::GetMaxOrder | ( | ) |
Get maximum order.
Definition at line 435 of file trf-feature.cpp.
|
inline |
Get number.
Definition at line 200 of file trf-feature.h.
| void trf::Feat::LoadFeatFromCorpus | ( | const char * | path, |
| Vocab * | pv | ||
| ) |
Load Features from corpus.
Definition at line 505 of file trf-feature.cpp.
Read the features.
Definition at line 571 of file trf-feature.cpp.
| void trf::Feat::Reset | ( | int | nOrder, |
| bool | bClass | ||
| ) |
Reset, set the order. Node: the maximum order (including the skip) may be larger than nOrder.
add the styles
Definition at line 384 of file trf-feature.cpp.
| void trf::Feat::Reset | ( | const char * | pfeatType | ) |
Reset, read a feature type files.
Definition at line 405 of file trf-feature.cpp.
Write the features.
Definition at line 558 of file trf-feature.cpp.
different feature table
Definition at line 182 of file trf-feature.h.
| int trf::Feat::m_nTotalNum |
total feature number
Definition at line 183 of file trf-feature.h.