21 #ifndef TESSERACT_TRAINING_VALIDATOR_H_ 22 #define TESSERACT_TRAINING_VALIDATOR_H_ 83 const std::vector<char32>& src,
84 std::vector<std::vector<char32>>* dest);
152 const std::vector<char32>& src,
153 std::vector<std::vector<char32>>* dest);
156 std::vector<std::vector<char32>>* dest);
161 const std::vector<char32>& utf32);
247 #endif // TESSERACT_TRAINING_VALIDATOR_H_ std::vector< IndicPair > codes_
static bool IsVedicAccent(char32 unicode)
static const char32 kInvalid
static const char32 kZeroWidthNonJoiner
static bool IsZeroWidthMark(char32 ch)
bool IsSubscriptScript() const
static const char32 kMinIndicUnicode
void MoveResultsToDest(GraphemeNormMode g_mode, std::vector< std::vector< char32 >> *dest)
static const char32 kMaxJavaneseUnicode
static bool ValidateCleanAndSegment(GraphemeNormMode g_mode, bool report_errors, const std::vector< char32 > &src, std::vector< std::vector< char32 >> *dest)
void MultiCodePart(int length)
static const int kIndicCodePageSize
static const char32 kMyanmarVirama
bool ValidateCleanAndSegmentInternal(GraphemeNormMode g_mode, const std::vector< char32 > &src, std::vector< std::vector< char32 >> *dest)
static const char32 kJavaneseVirama
static const char32 kMaxSinhalaUnicode
virtual CharClass UnicodeToCharClass(char32 ch) const =0
Validator(ViramaScript script, bool report_errors)
static const char32 kMaxViramaScriptUnicode
static bool IsVirama(char32 unicode)
static const char32 kKhmerVirama
bool UseMultiCode(int length)
static const char32 kZeroWidthSpace
static const char32 kLeftToRightMark
static const char32 kZeroWidthJoiner
void ComputeClassCodes(const std::vector< char32 > &text)
virtual bool ConsumeGraphemeIfValid()=0
std::vector< char32 > output_
static std::unique_ptr< Validator > ScriptValidator(ViramaScript script, bool report_errors)
std::pair< CharClass, char32 > IndicPair
std::vector< std::vector< char32 > > parts_
static ViramaScript MostFrequentViramaScript(const std::vector< char32 > &utf32)
static const char32 kSinhalaVirama
static const char32 kRightToLeftMark