tesseract
4.0.0-1-g2a2b
|
#include <validator.h>
Public Member Functions | |
virtual | ~Validator () |
Static Public Member Functions | |
static bool | ValidateCleanAndSegment (GraphemeNormMode g_mode, bool report_errors, const std::vector< char32 > &src, std::vector< std::vector< char32 >> *dest) |
static bool | IsZeroWidthMark (char32 ch) |
Static Public Attributes | |
static const char32 | kZeroWidthSpace = 0x200B |
static const char32 | kZeroWidthNonJoiner = 0x200C |
static const char32 | kZeroWidthJoiner = 0x200D |
static const char32 | kLeftToRightMark = 0x200E |
static const char32 | kRightToLeftMark = 0x200F |
static const char32 | kInvalid = 0xfffd |
Protected Types | |
enum | CharClass { CharClass::kConsonant = 'C', CharClass::kVowel = 'V', CharClass::kVirama = 'H', CharClass::kMatra = 'M', CharClass::kMatraPiece = 'P', CharClass::kVowelModifier = 'D', CharClass::kZeroWidthNonJoiner = 'z', CharClass::kZeroWidthJoiner = 'Z', CharClass::kVedicMark = 'v', CharClass::kNukta = 'N', CharClass::kRobat = 'R', CharClass::kOther = 'O', CharClass::kWhitespace = ' ', CharClass::kCombiner = 'c' } |
using | IndicPair = std::pair< CharClass, char32 > |
Protected Member Functions | |
Validator (ViramaScript script, bool report_errors) | |
bool | ValidateCleanAndSegmentInternal (GraphemeNormMode g_mode, const std::vector< char32 > &src, std::vector< std::vector< char32 >> *dest) |
void | MoveResultsToDest (GraphemeNormMode g_mode, std::vector< std::vector< char32 >> *dest) |
bool | IsSubscriptScript () const |
bool | CodeOnlyToOutput () |
void | MultiCodePart (int length) |
bool | UseMultiCode (int length) |
virtual bool | ConsumeGraphemeIfValid ()=0 |
void | ComputeClassCodes (const std::vector< char32 > &text) |
virtual CharClass | UnicodeToCharClass (char32 ch) const =0 |
void | Clear () |
Static Protected Member Functions | |
static std::unique_ptr< Validator > | ScriptValidator (ViramaScript script, bool report_errors) |
static ViramaScript | MostFrequentViramaScript (const std::vector< char32 > &utf32) |
static bool | IsVirama (char32 unicode) |
static bool | IsVedicAccent (char32 unicode) |
Protected Attributes | |
ViramaScript | script_ |
std::vector< IndicPair > | codes_ |
std::vector< std::vector< char32 > > | parts_ |
std::vector< char32 > | output_ |
int | codes_used_ |
int | output_used_ |
bool | report_errors_ |
Static Protected Attributes | |
static const int | kIndicCodePageSize = 128 |
static const char32 | kMinIndicUnicode = 0x900 |
static const char32 | kMaxSinhalaUnicode = 0xdff |
static const char32 | kMaxViramaScriptUnicode = 0x17ff |
static const char32 | kSinhalaVirama = 0xdca |
static const char32 | kMyanmarVirama = 0x1039 |
static const char32 | kKhmerVirama = 0x17d2 |
static const char32 | kJavaneseVirama = 0xa9c0 |
static const char32 | kMaxJavaneseUnicode = 0xa9df |
Definition at line 72 of file validator.h.
|
protected |
Definition at line 134 of file validator.h.
|
strongprotected |
Enumerator | |
---|---|
kConsonant | |
kVowel | |
kVirama | |
kMatra | |
kMatraPiece | |
kVowelModifier | |
kZeroWidthNonJoiner | |
kZeroWidthJoiner | |
kVedicMark | |
kNukta | |
kRobat | |
kOther | |
kWhitespace | |
kCombiner |
Definition at line 112 of file validator.h.
|
virtualdefault |
|
inlineprotected |
Definition at line 136 of file validator.h.
|
protected |
Definition at line 214 of file validator.cpp.
|
inlineprotected |
Definition at line 172 of file validator.h.
|
protected |
Definition at line 206 of file validator.cpp.
|
protectedpure virtual |
|
protected |
Definition at line 198 of file validator.cpp.
|
staticprotected |
Definition at line 191 of file validator.cpp.
|
staticprotected |
Definition at line 180 of file validator.cpp.
|
inlinestatic |
Definition at line 88 of file validator.h.
|
staticprotected |
Definition at line 143 of file validator.cpp.
|
protected |
Definition at line 114 of file validator.cpp.
|
inlineprotected |
Definition at line 182 of file validator.h.
|
staticprotected |
Definition at line 71 of file validator.cpp.
|
inlineprotected |
Definition at line 196 of file validator.h.
|
static |
Definition at line 40 of file validator.cpp.
|
protected |
Definition at line 97 of file validator.cpp.
|
protected |
Definition at line 232 of file validator.h.
|
protected |
Definition at line 238 of file validator.h.
|
staticprotected |
Definition at line 214 of file validator.h.
|
static |
Definition at line 100 of file validator.h.
|
staticprotected |
Definition at line 226 of file validator.h.
|
staticprotected |
Definition at line 224 of file validator.h.
|
static |
Definition at line 98 of file validator.h.
|
staticprotected |
Definition at line 227 of file validator.h.
|
staticprotected |
Definition at line 218 of file validator.h.
|
staticprotected |
Definition at line 220 of file validator.h.
|
staticprotected |
Definition at line 216 of file validator.h.
|
staticprotected |
Definition at line 223 of file validator.h.
|
static |
Definition at line 99 of file validator.h.
|
staticprotected |
Definition at line 222 of file validator.h.
|
static |
Definition at line 97 of file validator.h.
|
static |
Definition at line 96 of file validator.h.
|
static |
Definition at line 95 of file validator.h.
|
protected |
Definition at line 236 of file validator.h.
|
protected |
Definition at line 240 of file validator.h.
|
protected |
Definition at line 234 of file validator.h.
|
protected |
Definition at line 242 of file validator.h.
|
protected |
Definition at line 230 of file validator.h.