Tesseract 3.02

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- Class List
- Class Hierarchy
- Class Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Protected Member Functions | Protected Attributes
tesseract::CharClassifier Class Reference

`#include <classifier_base.h>`

Inheritance diagram for tesseract::CharClassifier:

List of all members.

## Public Member Functions

| CharClassifier (CharSet *char_set, TuningParams *params, FeatureBase *feat_extract)
virtual | ~CharClassifier ()
virtual CharAltList * | Classify (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
FeatureBase * | FeatureExtractor ()
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

FeatureBase * | feat_extract_
CharSet * | char_set_
TuningParams * | params_
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;
fold_sets_ = NULL;
fold_set_cnt_ = 0;
fold_set_len_ = NULL;
init_ = false;
case_sensitive_ = true;
}

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_;
fold_sets_ = NULL;
}
if (fold_set_len_ != NULL) {
delete []fold_set_len_;
fold_set_len_ = NULL;
}
if (feat_extract_ != NULL) {
delete feat_extract_;
feat_extract_ = NULL;
}
}

## 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

Implemented in tesseract::ConvNetCharClassifier, and tesseract::HybridNeuralNetCharClassifier.

virtual CharAltList* tesseract::CharClassifier::Classify | ( | CharSamp * | char_samp | ) |

pure virtual

Implemented in tesseract::ConvNetCharClassifier, and tesseract::HybridNeuralNetCharClassifier.

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

Implemented in tesseract::ConvNetCharClassifier, and tesseract::HybridNeuralNetCharClassifier.

virtual bool tesseract::CharClassifier::Train | ( | CharSamp * | char_samp,
|  | int | ClassID
| ) |  |

pure virtual

Implemented in tesseract::ConvNetCharClassifier, and tesseract::HybridNeuralNetCharClassifier.

## 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:

- /mnt/data/src/tesseract-ocr/cube/classifier_base.h