TRF Language Model
trf::Seq Class Reference

define a sequence including the word sequence and class sequence More...

#include <trf-feature.h>

Public Member Functions

 Seq ()
 
 Seq (int len)
 
void Reset (int p_len)
 reset only change the len variable, does not change the buffer size. More...
 
void Copy (Seq &seq)
 copy the sequence More...
 
int GetLen () const
 
void Set (Array< int > &aInt, Vocab *pv)
 transform the word sequence (form file) to Seq More...
 
void Set (int *pInt, int nLen, Vocab *pv)
 
void Random (Vocab *pv)
 Random. More...
 
void SetClass (Vocab *pv)
 set the class based the word sequence More...
 
VocabIDGetWordSeq ()
 get word sequence More...
 
VocabIDGetClassSeq ()
 get class sequence More...
 
void Print ()
 
void Print (File &file)
 

Public Attributes

Mat< VocabIDx
 
int nLen
 
int nMaxLen
 to denote the buffer size More...
 

Detailed Description

define a sequence including the word sequence and class sequence

Definition at line 41 of file trf-feature.h.

Constructor & Destructor Documentation

§ Seq() [1/2]

trf::Seq::Seq ( )
inline

Definition at line 48 of file trf-feature.h.

§ Seq() [2/2]

trf::Seq::Seq ( int  len)
inline

Definition at line 49 of file trf-feature.h.

Member Function Documentation

§ Copy()

void trf::Seq::Copy ( Seq seq)
inline

copy the sequence

Definition at line 66 of file trf-feature.h.

§ GetClassSeq()

VocabID* trf::Seq::GetClassSeq ( )
inline

get class sequence

Definition at line 82 of file trf-feature.h.

§ GetLen()

int trf::Seq::GetLen ( ) const
inline

Definition at line 71 of file trf-feature.h.

§ GetWordSeq()

VocabID* trf::Seq::GetWordSeq ( )
inline

get word sequence

Definition at line 80 of file trf-feature.h.

§ Print() [1/2]

void trf::Seq::Print ( )

Definition at line 52 of file trf-feature.cpp.

§ Print() [2/2]

void trf::Seq::Print ( File file)

Definition at line 59 of file trf-feature.cpp.

§ Random()

void trf::Seq::Random ( Vocab pv)

Random.

Definition at line 39 of file trf-feature.cpp.

§ Reset()

void trf::Seq::Reset ( int  p_len)
inline

reset only change the len variable, does not change the buffer size.

Definition at line 51 of file trf-feature.h.

§ Set() [1/2]

void trf::Seq::Set ( Array< int > &  aInt,
Vocab pv 
)

transform the word sequence (form file) to Seq

Definition at line 22 of file trf-feature.cpp.

§ Set() [2/2]

void trf::Seq::Set ( int *  pInt,
int  nLen,
Vocab pv 
)

set the seqbeg and seqend

Definition at line 26 of file trf-feature.cpp.

§ SetClass()

void trf::Seq::SetClass ( Vocab pv)

set the class based the word sequence

Definition at line 35 of file trf-feature.cpp.

Member Data Documentation

§ nLen

int trf::Seq::nLen

Definition at line 45 of file trf-feature.h.

§ nMaxLen

int trf::Seq::nMaxLen

to denote the buffer size

Definition at line 46 of file trf-feature.h.

§ x

Mat<VocabID> trf::Seq::x

Definition at line 44 of file trf-feature.h.


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