TRF Language Model
trf::CorpusTxt Class Reference

#include <trf-corpus.h>

Inheritance diagram for trf::CorpusTxt:
trf::CorpusBase

Public Member Functions

 CorpusTxt ()
 
 CorpusTxt (const char *pfilename)
 
 ~CorpusTxt ()
 
virtual void Reset (const char *pfilename)
 Open file and Load the file. More...
 
virtual bool GetSeq (int nLine, Array< VocabID > &aSeq)
 get the sequence in nLine More...
 
virtual void GetLenCount (Array< int > &aLenCount)
 get the length count More...
 
- Public Member Functions inherited from trf::CorpusBase
 CorpusBase ()
 
virtual int GetNum () const
 get the seq number More...
 
virtual int GetMinLen () const
 get the min length More...
 
virtual int GetMaxLen () const
 get the max length More...
 
const char * GetFileName () const
 get the file name More...
 

Protected Attributes

Array< Array< VocabID > * > m_aSeq
 
- Protected Attributes inherited from trf::CorpusBase
String m_filename
 
int m_nMinLen
 record the minimum length; More...
 
int m_nMaxLen
 record the maximum length; More...
 
int m_nNum
 record the length number; More...
 

Detailed Description

Definition at line 60 of file trf-corpus.h.

Constructor & Destructor Documentation

§ CorpusTxt() [1/2]

trf::CorpusTxt::CorpusTxt ( )
inline

Definition at line 65 of file trf-corpus.h.

§ CorpusTxt() [2/2]

trf::CorpusTxt::CorpusTxt ( const char *  pfilename)
inline

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

§ ~CorpusTxt()

trf::CorpusTxt::~CorpusTxt ( )

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

Member Function Documentation

§ GetLenCount()

void trf::CorpusTxt::GetLenCount ( Array< int > &  aLenCount)
virtual

get the length count

Implements trf::CorpusBase.

Definition at line 66 of file trf-corpus.cpp.

§ GetSeq()

bool trf::CorpusTxt::GetSeq ( int  nLine,
Array< VocabID > &  aSeq 
)
virtual

get the sequence in nLine

Implements trf::CorpusBase.

Definition at line 57 of file trf-corpus.cpp.

§ Reset()

void trf::CorpusTxt::Reset ( const char *  pfilename)
virtual

Open file and Load the file.

Implements trf::CorpusBase.

Definition at line 29 of file trf-corpus.cpp.

Member Data Documentation

§ m_aSeq

Array<Array<VocabID>*> trf::CorpusTxt::m_aSeq
protected

Definition at line 63 of file trf-corpus.h.


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