tesseract
3.05.02
|
#include <unicharset.h>
Public Types | |
enum | Direction { U_LEFT_TO_RIGHT = 0, U_RIGHT_TO_LEFT = 1, U_EUROPEAN_NUMBER = 2, U_EUROPEAN_NUMBER_SEPARATOR = 3, U_EUROPEAN_NUMBER_TERMINATOR = 4, U_ARABIC_NUMBER = 5, U_COMMON_NUMBER_SEPARATOR = 6, U_BLOCK_SEPARATOR = 7, U_SEGMENT_SEPARATOR = 8, U_WHITE_SPACE_NEUTRAL = 9, U_OTHER_NEUTRAL = 10, U_LEFT_TO_RIGHT_EMBEDDING = 11, U_LEFT_TO_RIGHT_OVERRIDE = 12, U_RIGHT_TO_LEFT_ARABIC = 13, U_RIGHT_TO_LEFT_EMBEDDING = 14, U_RIGHT_TO_LEFT_OVERRIDE = 15, U_POP_DIRECTIONAL_FORMAT = 16, U_DIR_NON_SPACING_MARK = 17, U_BOUNDARY_NEUTRAL = 18, U_CHAR_DIRECTION_COUNT } |
Public Member Functions | |
UNICHARSET () | |
~UNICHARSET () | |
UNICHAR_ID TESS_API | unichar_to_id (const char *const unichar_repr) const |
UNICHAR_ID | unichar_to_id (const char *const unichar_repr, int length) const |
int | step (const char *str) const |
bool | encodable_string (const char *str, int *first_bad_position) const |
bool | encode_string (const char *str, bool give_up_on_failure, GenericVector< UNICHAR_ID > *encoding, GenericVector< char > *lengths, int *encoded_length) const |
const char * | id_to_unichar (UNICHAR_ID id) const |
const char * | id_to_unichar_ext (UNICHAR_ID id) const |
STRING | debug_str (UNICHAR_ID id) const |
STRING | debug_str (const char *unichar_repr) const |
void TESS_API | unichar_insert (const char *const unichar_repr) |
bool | contains_unichar_id (UNICHAR_ID unichar_id) const |
bool TESS_API | contains_unichar (const char *const unichar_repr) const |
bool | contains_unichar (const char *const unichar_repr, int length) const |
bool | eq (UNICHAR_ID unichar_id, const char *const unichar_repr) const |
void | delete_pointers_in_unichars () |
void | clear () |
int | size () const |
void | reserve (int unichars_number) |
bool | save_to_file (const char *const filename) const |
bool | save_to_file (FILE *file) const |
bool | save_to_file (tesseract::TFile *file) const |
bool TESS_API | save_to_string (STRING *str) const |
bool | load_from_inmemory_file (const char *const memory, int mem_size, bool skip_fragments) |
bool | load_from_inmemory_file (const char *const memory, int mem_size) |
bool | load_from_file (const char *const filename, bool skip_fragments) |
bool | load_from_file (const char *const filename) |
bool | load_from_file (FILE *file, bool skip_fragments) |
bool | load_from_file (FILE *file) |
bool | load_from_file (tesseract::TFile *file, bool skip_fragments) |
void | post_load_setup () |
bool | major_right_to_left () const |
void | set_black_and_whitelist (const char *blacklist, const char *whitelist, const char *unblacklist) |
void | set_isalpha (UNICHAR_ID unichar_id, bool value) |
void | set_islower (UNICHAR_ID unichar_id, bool value) |
void | set_isupper (UNICHAR_ID unichar_id, bool value) |
void | set_isdigit (UNICHAR_ID unichar_id, bool value) |
void | set_ispunctuation (UNICHAR_ID unichar_id, bool value) |
void | set_isngram (UNICHAR_ID unichar_id, bool value) |
void | set_script (UNICHAR_ID unichar_id, const char *value) |
void | set_other_case (UNICHAR_ID unichar_id, UNICHAR_ID other_case) |
void | set_direction (UNICHAR_ID unichar_id, UNICHARSET::Direction value) |
void | set_mirror (UNICHAR_ID unichar_id, UNICHAR_ID mirror) |
void | set_normed (UNICHAR_ID unichar_id, const char *normed) |
void | set_normed_ids (UNICHAR_ID unichar_id) |
bool | get_isalpha (UNICHAR_ID unichar_id) const |
bool | get_islower (UNICHAR_ID unichar_id) const |
bool | get_isupper (UNICHAR_ID unichar_id) const |
bool | get_isdigit (UNICHAR_ID unichar_id) const |
bool | get_ispunctuation (UNICHAR_ID unichar_id) const |
bool | get_isngram (UNICHAR_ID unichar_id) const |
bool | get_isprivate (UNICHAR_ID unichar_id) const |
bool | top_bottom_useful () const |
void | set_ranges_empty () |
void | SetPropertiesFromOther (const UNICHARSET &src) |
void | PartialSetPropertiesFromOther (int start_index, const UNICHARSET &src) |
void | ExpandRangesFromOther (const UNICHARSET &src) |
void | CopyFrom (const UNICHARSET &src) |
void | AppendOtherUnicharset (const UNICHARSET &src) |
bool | SizesDistinct (UNICHAR_ID id1, UNICHAR_ID id2) const |
void | get_top_bottom (UNICHAR_ID unichar_id, int *min_bottom, int *max_bottom, int *min_top, int *max_top) const |
void | set_top_bottom (UNICHAR_ID unichar_id, int min_bottom, int max_bottom, int min_top, int max_top) |
void | get_width_stats (UNICHAR_ID unichar_id, float *width, float *width_sd) const |
void | set_width_stats (UNICHAR_ID unichar_id, float width, float width_sd) |
void | get_bearing_stats (UNICHAR_ID unichar_id, float *bearing, float *bearing_sd) const |
void | set_bearing_stats (UNICHAR_ID unichar_id, float bearing, float bearing_sd) |
void | get_advance_stats (UNICHAR_ID unichar_id, float *advance, float *advance_sd) const |
void | set_advance_stats (UNICHAR_ID unichar_id, float advance, float advance_sd) |
bool | PropertiesIncomplete (UNICHAR_ID unichar_id) const |
int | get_script (UNICHAR_ID unichar_id) const |
unsigned int | get_properties (UNICHAR_ID unichar_id) const |
char | get_chartype (UNICHAR_ID unichar_id) const |
UNICHAR_ID | get_other_case (UNICHAR_ID unichar_id) const |
Direction | get_direction (UNICHAR_ID unichar_id) const |
UNICHAR_ID | get_mirror (UNICHAR_ID unichar_id) const |
UNICHAR_ID | to_lower (UNICHAR_ID unichar_id) const |
UNICHAR_ID | to_upper (UNICHAR_ID unichar_id) const |
bool | has_special_codes () const |
bool | AnyRepeatedUnicodes () const |
const CHAR_FRAGMENT * | get_fragment (UNICHAR_ID unichar_id) const |
bool | get_isalpha (const char *const unichar_repr) const |
bool | get_islower (const char *const unichar_repr) const |
bool | get_isupper (const char *const unichar_repr) const |
bool | get_isdigit (const char *const unichar_repr) const |
bool | get_ispunctuation (const char *const unichar_repr) const |
unsigned int | get_properties (const char *const unichar_repr) const |
char | get_chartype (const char *const unichar_repr) const |
int | get_script (const char *const unichar_repr) const |
const CHAR_FRAGMENT * | get_fragment (const char *const unichar_repr) const |
bool | get_isalpha (const char *const unichar_repr, int length) const |
bool | get_islower (const char *const unichar_repr, int length) const |
bool | get_isupper (const char *const unichar_repr, int length) const |
bool | get_isdigit (const char *const unichar_repr, int length) const |
bool | get_ispunctuation (const char *const unichar_repr, int length) const |
const char * | get_normed_unichar (UNICHAR_ID unichar_id) const |
const GenericVector< UNICHAR_ID > & | normed_ids (UNICHAR_ID unichar_id) const |
int | get_script (const char *const unichar_repr, int length) const |
int | get_script_table_size () const |
const char * | get_script_from_script_id (int id) const |
int | get_script_id_from_name (const char *script_name) const |
bool | is_null_script (const char *script) const |
int | add_script (const char *script) |
bool | get_enabled (UNICHAR_ID unichar_id) const |
int | null_sid () const |
int | common_sid () const |
int | latin_sid () const |
int | cyrillic_sid () const |
int | greek_sid () const |
int | han_sid () const |
int | hiragana_sid () const |
int | katakana_sid () const |
int | default_sid () const |
bool | script_has_upper_lower () const |
bool | script_has_xheight () const |
Static Public Member Functions | |
static STRING | debug_utf8_str (const char *str) |
Static Public Attributes | |
static TESS_API const char * | kCustomLigatures [][2] |
static const char * | kSpecialUnicharCodes [SPECIAL_UNICHAR_CODES_COUNT] |
Definition at line 139 of file unicharset.h.
Definition at line 150 of file unicharset.h.
UNICHARSET::UNICHARSET | ( | ) |
Definition at line 159 of file unicharset.cpp.
UNICHARSET::~UNICHARSET | ( | ) |
Definition at line 175 of file unicharset.cpp.
int UNICHARSET::add_script | ( | const char * | script | ) |
Definition at line 1002 of file unicharset.cpp.
bool UNICHARSET::AnyRepeatedUnicodes | ( | ) | const |
Definition at line 986 of file unicharset.cpp.
void UNICHARSET::AppendOtherUnicharset | ( | const UNICHARSET & | src | ) |
Definition at line 439 of file unicharset.cpp.
|
inline |
Definition at line 265 of file unicharset.h.
|
inline |
Definition at line 832 of file unicharset.h.
bool UNICHARSET::contains_unichar | ( | const char *const | unichar_repr | ) | const |
Definition at line 644 of file unicharset.cpp.
bool UNICHARSET::contains_unichar | ( | const char *const | unichar_repr, |
int | length | ||
) | const |
Definition at line 648 of file unicharset.cpp.
|
inline |
Definition at line 241 of file unicharset.h.
void UNICHARSET::CopyFrom | ( | const UNICHARSET & | src | ) |
Definition at line 423 of file unicharset.cpp.
|
inline |
Definition at line 834 of file unicharset.h.
STRING UNICHARSET::debug_str | ( | UNICHAR_ID | id | ) | const |
Definition at line 318 of file unicharset.cpp.
|
inline |
Definition at line 232 of file unicharset.h.
|
static |
Definition at line 294 of file unicharset.cpp.
|
inline |
Definition at line 839 of file unicharset.h.
|
inline |
Definition at line 255 of file unicharset.h.
bool UNICHARSET::encodable_string | ( | const char * | str, |
int * | first_bad_position | ||
) | const |
Definition at line 222 of file unicharset.cpp.
bool UNICHARSET::encode_string | ( | const char * | str, |
bool | give_up_on_failure, | ||
GenericVector< UNICHAR_ID > * | encoding, | ||
GenericVector< char > * | lengths, | ||
int * | encoded_length | ||
) | const |
Definition at line 234 of file unicharset.cpp.
bool UNICHARSET::eq | ( | UNICHAR_ID | unichar_id, |
const char *const | unichar_repr | ||
) | const |
Definition at line 656 of file unicharset.cpp.
void UNICHARSET::ExpandRangesFromOther | ( | const UNICHARSET & | src | ) |
Definition at line 410 of file unicharset.cpp.
|
inline |
Definition at line 588 of file unicharset.h.
|
inline |
Definition at line 571 of file unicharset.h.
char UNICHARSET::get_chartype | ( | UNICHAR_ID | unichar_id | ) | const |
Definition at line 603 of file unicharset.cpp.
|
inline |
Definition at line 719 of file unicharset.h.
|
inline |
Definition at line 638 of file unicharset.h.
|
inline |
Definition at line 826 of file unicharset.h.
|
inline |
Definition at line 682 of file unicharset.h.
|
inline |
Definition at line 732 of file unicharset.h.
|
inline |
Definition at line 449 of file unicharset.h.
|
inline |
Definition at line 689 of file unicharset.h.
|
inline |
Definition at line 742 of file unicharset.h.
|
inline |
Definition at line 470 of file unicharset.h.
|
inline |
Definition at line 704 of file unicharset.h.
|
inline |
Definition at line 763 of file unicharset.h.
|
inline |
Definition at line 456 of file unicharset.h.
|
inline |
Definition at line 694 of file unicharset.h.
|
inline |
Definition at line 749 of file unicharset.h.
|
inline |
Definition at line 484 of file unicharset.h.
bool UNICHARSET::get_isprivate | ( | UNICHAR_ID | unichar_id | ) | const |
Definition at line 363 of file unicharset.cpp.
|
inline |
Definition at line 477 of file unicharset.h.
|
inline |
Definition at line 709 of file unicharset.h.
|
inline |
Definition at line 770 of file unicharset.h.
|
inline |
Definition at line 463 of file unicharset.h.
|
inline |
Definition at line 699 of file unicharset.h.
|
inline |
Definition at line 756 of file unicharset.h.
|
inline |
Definition at line 645 of file unicharset.h.
|
inline |
Definition at line 776 of file unicharset.h.
|
inline |
Definition at line 631 of file unicharset.h.
unsigned int UNICHARSET::get_properties | ( | UNICHAR_ID | unichar_id | ) | const |
Definition at line 588 of file unicharset.cpp.
|
inline |
Definition at line 715 of file unicharset.h.
|
inline |
Definition at line 611 of file unicharset.h.
|
inline |
Definition at line 726 of file unicharset.h.
|
inline |
Definition at line 791 of file unicharset.h.
|
inline |
Definition at line 802 of file unicharset.h.
int UNICHARSET::get_script_id_from_name | ( | const char * | script_name | ) | const |
Definition at line 1080 of file unicharset.cpp.
|
inline |
Definition at line 797 of file unicharset.h.
|
inline |
Definition at line 526 of file unicharset.h.
|
inline |
Definition at line 554 of file unicharset.h.
|
inline |
Definition at line 835 of file unicharset.h.
|
inline |
Definition at line 836 of file unicharset.h.
|
inline |
Definition at line 670 of file unicharset.h.
|
inline |
Definition at line 837 of file unicharset.h.
const char * UNICHARSET::id_to_unichar | ( | UNICHAR_ID | id | ) | const |
Definition at line 266 of file unicharset.cpp.
const char * UNICHARSET::id_to_unichar_ext | ( | UNICHAR_ID | id | ) | const |
Definition at line 274 of file unicharset.cpp.
|
inline |
Definition at line 816 of file unicharset.h.
|
inline |
Definition at line 838 of file unicharset.h.
|
inline |
Definition at line 833 of file unicharset.h.
|
inline |
Definition at line 346 of file unicharset.h.
|
inline |
Definition at line 354 of file unicharset.h.
bool UNICHARSET::load_from_file | ( | FILE * | file, |
bool | skip_fragments | ||
) |
Definition at line 744 of file unicharset.cpp.
|
inline |
Definition at line 361 of file unicharset.h.
bool UNICHARSET::load_from_file | ( | tesseract::TFile * | file, |
bool | skip_fragments | ||
) |
Definition at line 753 of file unicharset.cpp.
bool UNICHARSET::load_from_inmemory_file | ( | const char *const | memory, |
int | mem_size, | ||
bool | skip_fragments | ||
) |
Definition at line 724 of file unicharset.cpp.
|
inline |
Definition at line 339 of file unicharset.h.
bool UNICHARSET::major_right_to_left | ( | ) | const |
Definition at line 931 of file unicharset.cpp.
|
inline |
Definition at line 783 of file unicharset.h.
|
inline |
Definition at line 831 of file unicharset.h.
void UNICHARSET::PartialSetPropertiesFromOther | ( | int | start_index, |
const UNICHARSET & | src | ||
) |
Definition at line 380 of file unicharset.cpp.
void UNICHARSET::post_load_setup | ( | ) |
Definition at line 867 of file unicharset.cpp.
|
inline |
Definition at line 604 of file unicharset.h.
void UNICHARSET::reserve | ( | int | unichars_number | ) |
Definition at line 179 of file unicharset.cpp.
|
inline |
Definition at line 306 of file unicharset.h.
|
inline |
Definition at line 316 of file unicharset.h.
|
inline |
Definition at line 322 of file unicharset.h.
bool UNICHARSET::save_to_string | ( | STRING * | str | ) | const |
Definition at line 661 of file unicharset.cpp.
|
inline |
Definition at line 842 of file unicharset.h.
|
inline |
Definition at line 849 of file unicharset.h.
|
inline |
Definition at line 598 of file unicharset.h.
|
inline |
Definition at line 581 of file unicharset.h.
void UNICHARSET::set_black_and_whitelist | ( | const char * | blacklist, |
const char * | whitelist, | ||
const char * | unblacklist | ||
) |
Definition at line 948 of file unicharset.cpp.
|
inline |
Definition at line 430 of file unicharset.h.
|
inline |
Definition at line 389 of file unicharset.h.
|
inline |
Definition at line 404 of file unicharset.h.
|
inline |
Definition at line 394 of file unicharset.h.
|
inline |
Definition at line 414 of file unicharset.h.
|
inline |
Definition at line 409 of file unicharset.h.
|
inline |
Definition at line 399 of file unicharset.h.
|
inline |
Definition at line 435 of file unicharset.h.
|
inline |
Definition at line 440 of file unicharset.h.
void UNICHARSET::set_normed_ids | ( | UNICHAR_ID | unichar_id | ) |
Definition at line 348 of file unicharset.cpp.
|
inline |
Definition at line 425 of file unicharset.h.
void UNICHARSET::set_ranges_empty | ( | ) |
Definition at line 371 of file unicharset.cpp.
|
inline |
Definition at line 420 of file unicharset.h.
|
inline |
Definition at line 540 of file unicharset.h.
|
inline |
Definition at line 565 of file unicharset.h.
|
inline |
Definition at line 503 of file unicharset.h.
|
inline |
Definition at line 297 of file unicharset.h.
bool UNICHARSET::SizesDistinct | ( | UNICHAR_ID | id1, |
UNICHAR_ID | id2 | ||
) | const |
Definition at line 472 of file unicharset.cpp.
int UNICHARSET::step | ( | const char * | str | ) | const |
Definition at line 211 of file unicharset.cpp.
|
inline |
Definition at line 652 of file unicharset.h.
|
inline |
Definition at line 660 of file unicharset.h.
|
inline |
Definition at line 495 of file unicharset.h.
void UNICHARSET::unichar_insert | ( | const char *const | unichar_repr | ) |
Definition at line 612 of file unicharset.cpp.
UNICHAR_ID UNICHARSET::unichar_to_id | ( | const char *const | unichar_repr | ) | const |
Definition at line 194 of file unicharset.cpp.
UNICHAR_ID UNICHARSET::unichar_to_id | ( | const char *const | unichar_repr, |
int | length | ||
) | const |
Definition at line 199 of file unicharset.cpp.
|
static |
Definition at line 144 of file unicharset.h.
|
static |
Definition at line 147 of file unicharset.h.