TRF Language Model
trf::CorpusBase Class Referenceabstract

#include <trf-corpus.h>

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

Public Member Functions

 CorpusBase ()
 
virtual void Reset (const char *pfilename)=0
 Open file and Load the file. More...
 
virtual bool GetSeq (int nLine, Array< VocabID > &aSeq)=0
 get the sequence in nLine More...
 
virtual void GetLenCount (Array< int > &aLenCount)=0
 get the length count More...
 
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

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 28 of file trf-corpus.h.

Constructor & Destructor Documentation

§ CorpusBase()

trf::CorpusBase::CorpusBase ( )
inline

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

Member Function Documentation

§ GetFileName()

const char* trf::CorpusBase::GetFileName ( ) const
inline

get the file name

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

§ GetLenCount()

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

get the length count

Implemented in trf::CorpusTxt.

§ GetMaxLen()

virtual int trf::CorpusBase::GetMaxLen ( ) const
inlinevirtual

get the max length

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

§ GetMinLen()

virtual int trf::CorpusBase::GetMinLen ( ) const
inlinevirtual

get the min length

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

§ GetNum()

virtual int trf::CorpusBase::GetNum ( ) const
inlinevirtual

get the seq number

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

§ GetSeq()

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

get the sequence in nLine

Implemented in trf::CorpusTxt.

§ Reset()

virtual void trf::CorpusBase::Reset ( const char *  pfilename)
pure virtual

Open file and Load the file.

Implemented in trf::CorpusTxt.

Member Data Documentation

§ m_filename

String trf::CorpusBase::m_filename
protected

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

§ m_nMaxLen

int trf::CorpusBase::m_nMaxLen
protected

record the maximum length;

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

§ m_nMinLen

int trf::CorpusBase::m_nMinLen
protected

record the minimum length;

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

§ m_nNum

int trf::CorpusBase::m_nNum
protected

record the length number;

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


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