|
tesseract 3.04.01
|
#include <lm_state.h>
Public Member Functions | |
| LanguageModelNgramInfo (const char *c, int l, bool p, float nc, float ncc) | |
Public Attributes | |
| STRING | context |
| int | context_unichar_step_len |
| bool | pruned |
| float | ngram_cost |
| -ln(P_ngram_model(path)) | |
| float | ngram_and_classifier_cost |
| -[ ln(P_classifier(path)) + scale_factor * ln(P_ngram_model(path)) ] | |
Struct for storing additional information used by Ngram language model component.
Definition at line 74 of file lm_state.h.
| tesseract::LanguageModelNgramInfo::LanguageModelNgramInfo | ( | const char * | c, |
| int | l, | ||
| bool | p, | ||
| float | nc, | ||
| float | ncc | ||
| ) | [inline] |
Definition at line 75 of file lm_state.h.
: context(c), context_unichar_step_len(l), pruned(p), ngram_cost(nc), ngram_and_classifier_cost(ncc) {}
Definition at line 78 of file lm_state.h.
Length of the context measured by advancing using UNICHAR::utf8_step() (should be at most the order of the character ngram model used).
Definition at line 81 of file lm_state.h.
-[ ln(P_classifier(path)) + scale_factor * ln(P_ngram_model(path)) ]
Definition at line 90 of file lm_state.h.
-ln(P_ngram_model(path))
Definition at line 88 of file lm_state.h.
The paths with pruned set are pruned out from the perspective of the character ngram model. They are explored further because they represent a dictionary match or a top choice. Thus ngram_info is still computed for them in order to calculate the combined cost.
Definition at line 86 of file lm_state.h.