tesseract  v4.0.0-17-g361f3264
Open Source OCR Engine
tesseract::ParamsModel Class Reference

#include <params_model.h>

Collaboration diagram for tesseract::ParamsModel:

Public Types

enum  PassEnum { PTRAIN_PASS1, PTRAIN_PASS2, PTRAIN_NUM_PASSES }
 

Public Member Functions

 ParamsModel ()
 
 ParamsModel (const char *lang, const GenericVector< float > &weights)
 
bool Initialized ()
 
void Print ()
 
void Clear ()
 
void Copy (const ParamsModel &other_model)
 
float ComputeCost (const float features[]) const
 
bool Equivalent (const ParamsModel &that) const
 
bool SaveToFile (const char *full_path) const
 
bool LoadFromFile (const char *lang, const char *full_path)
 
bool LoadFromFp (const char *lang, TFile *fp)
 
const GenericVector< float > & weights () const
 
const GenericVector< float > & weights_for_pass (PassEnum pass) const
 
void SetPass (PassEnum pass)
 

Private Member Functions

bool ParseLine (char *line, char **key, float *val)
 

Private Attributes

STRING lang_
 
PassEnum pass_
 
GenericVector< float > weights_vec_ [PTRAIN_NUM_PASSES]
 

Member Enumeration Documentation

◆ PassEnum

Enumerator
PTRAIN_PASS1 
PTRAIN_PASS2 
PTRAIN_NUM_PASSES 

Constructor & Destructor Documentation

◆ ParamsModel() [1/2]

tesseract::ParamsModel::ParamsModel ( )
inline

◆ ParamsModel() [2/2]

tesseract::ParamsModel::ParamsModel ( const char *  lang,
const GenericVector< float > &  weights 
)
inline

Member Function Documentation

◆ Clear()

void tesseract::ParamsModel::Clear ( )
inline

◆ ComputeCost()

float tesseract::ParamsModel::ComputeCost ( const float  features[]) const

◆ Copy()

void tesseract::ParamsModel::Copy ( const ParamsModel other_model)

◆ Equivalent()

bool tesseract::ParamsModel::Equivalent ( const ParamsModel that) const

◆ Initialized()

bool tesseract::ParamsModel::Initialized ( )
inline

◆ LoadFromFile()

bool tesseract::ParamsModel::LoadFromFile ( const char *  lang,
const char *  full_path 
)

◆ LoadFromFp()

bool tesseract::ParamsModel::LoadFromFp ( const char *  lang,
TFile fp 
)

◆ ParseLine()

bool tesseract::ParamsModel::ParseLine ( char *  line,
char **  key,
float *  val 
)
private

◆ Print()

void tesseract::ParamsModel::Print ( )

◆ SaveToFile()

bool tesseract::ParamsModel::SaveToFile ( const char *  full_path) const

◆ SetPass()

void tesseract::ParamsModel::SetPass ( PassEnum  pass)
inline

◆ weights()

const GenericVector<float>& tesseract::ParamsModel::weights ( ) const
inline

◆ weights_for_pass()

const GenericVector<float>& tesseract::ParamsModel::weights_for_pass ( PassEnum  pass) const
inline

Member Data Documentation

◆ lang_

STRING tesseract::ParamsModel::lang_
private

◆ pass_

PassEnum tesseract::ParamsModel::pass_
private

◆ weights_vec_

GenericVector<float> tesseract::ParamsModel::weights_vec_[PTRAIN_NUM_PASSES]
private

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