Tesseract  3.02
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
tesseract::CharClassifier Class Reference

#include <classifier_base.h>

Inheritance diagram for tesseract::CharClassifier:
tesseract::ConvNetCharClassifier tesseract::HybridNeuralNetCharClassifier

List of all members.

Public Member Functions

 CharClassifier (CharSet *char_set, TuningParams *params, FeatureBase *feat_extract)
virtual ~CharClassifier ()
virtual CharAltListClassify (CharSamp *char_samp)=0
virtual int CharCost (CharSamp *char_samp)=0
virtual bool Train (CharSamp *char_samp, int ClassID)=0
virtual bool SetLearnParam (char *var_name, float val)=0
virtual bool Init (const string &data_file_path, const string &lang, LangModel *lang_mod)=0
FeatureBaseFeatureExtractor ()
bool CaseSensitive () const
void SetCaseSensitive (bool case_sensitive)

Protected Member Functions

virtual void Fold ()=0
virtual bool LoadFoldingSets (const string &data_file_path, const string &lang, LangModel *lang_mod)=0

Protected Attributes

FeatureBasefeat_extract_
CharSetchar_set_
TuningParamsparams_
int ** fold_sets_
int * fold_set_len_
int fold_set_cnt_
bool init_
bool case_sensitive_

Detailed Description

Definition at line 35 of file classifier_base.h.


Constructor & Destructor Documentation

tesseract::CharClassifier::CharClassifier ( CharSet char_set,
TuningParams params,
FeatureBase feat_extract 
)
inline

Definition at line 37 of file classifier_base.h.

{
char_set_ = char_set;
params_ = params;
feat_extract_ = feat_extract;
init_ = false;
}
virtual tesseract::CharClassifier::~CharClassifier ( )
inlinevirtual

Definition at line 49 of file classifier_base.h.

{
if (fold_sets_ != NULL) {
for (int fold_set = 0; fold_set < fold_set_cnt_; fold_set++) {
if (fold_sets_[fold_set] != NULL) {
delete []fold_sets_[fold_set];
}
}
delete []fold_sets_;
}
if (fold_set_len_ != NULL) {
delete []fold_set_len_;
}
if (feat_extract_ != NULL) {
delete feat_extract_;
}
}

Member Function Documentation

bool tesseract::CharClassifier::CaseSensitive ( ) const
inline

Definition at line 79 of file classifier_base.h.

{ return case_sensitive_; }
virtual int tesseract::CharClassifier::CharCost ( CharSamp char_samp)
pure virtual
virtual CharAltList* tesseract::CharClassifier::Classify ( CharSamp char_samp)
pure virtual
FeatureBase* tesseract::CharClassifier::FeatureExtractor ( )
inline

Definition at line 78 of file classifier_base.h.

{return feat_extract_;}
virtual void tesseract::CharClassifier::Fold ( )
protectedpure virtual
virtual bool tesseract::CharClassifier::Init ( const string &  data_file_path,
const string &  lang,
LangModel lang_mod 
)
pure virtual
virtual bool tesseract::CharClassifier::LoadFoldingSets ( const string &  data_file_path,
const string &  lang,
LangModel lang_mod 
)
protectedpure virtual
void tesseract::CharClassifier::SetCaseSensitive ( bool  case_sensitive)
inline

Definition at line 80 of file classifier_base.h.

{
case_sensitive_ = case_sensitive;
}
virtual bool tesseract::CharClassifier::SetLearnParam ( char *  var_name,
float  val 
)
pure virtual
virtual bool tesseract::CharClassifier::Train ( CharSamp char_samp,
int  ClassID 
)
pure virtual

Member Data Documentation

bool tesseract::CharClassifier::case_sensitive_
protected

Definition at line 96 of file classifier_base.h.

CharSet* tesseract::CharClassifier::char_set_
protected

Definition at line 90 of file classifier_base.h.

FeatureBase* tesseract::CharClassifier::feat_extract_
protected

Definition at line 89 of file classifier_base.h.

int tesseract::CharClassifier::fold_set_cnt_
protected

Definition at line 94 of file classifier_base.h.

int* tesseract::CharClassifier::fold_set_len_
protected

Definition at line 93 of file classifier_base.h.

int** tesseract::CharClassifier::fold_sets_
protected

Definition at line 92 of file classifier_base.h.

bool tesseract::CharClassifier::init_
protected

Definition at line 95 of file classifier_base.h.

TuningParams* tesseract::CharClassifier::params_
protected

Definition at line 91 of file classifier_base.h.


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