tesseract
4.0.0-1-g2a2b
validate_khmer.h
Go to the documentation of this file.
1
#ifndef TESSERACT_TRAINING_VALIDATE_KHMER_H_
2
#define TESSERACT_TRAINING_VALIDATE_KHMER_H_
3
4
#include "
validator.h
"
5
6
namespace
tesseract
{
7
8
// Subclass of Validator that validates and segments Khmer.
9
class
ValidateKhmer
:
public
Validator
{
10
public
:
11
ValidateKhmer
(
ViramaScript
script,
bool
report_errors)
12
:
Validator
(script, report_errors) {}
13
~ValidateKhmer
() {}
14
15
protected
:
16
// Returns whether codes matches the pattern for an Khmer Grapheme.
17
// Consumes the next Grapheme in codes_[codes_used_++...] and copies it to
18
// parts_ and output_. Returns true if a valid Grapheme was consumed,
19
// otherwise does not increment codes_used_.
20
bool
ConsumeGraphemeIfValid
()
override
;
21
// Returns the CharClass corresponding to the given Unicode ch.
22
CharClass
UnicodeToCharClass
(
char32
ch)
const override
;
23
};
24
25
}
// namespace tesseract
26
27
#endif // TESSERACT_TRAINING_VALIDATE_KHMER_H_
tesseract::Validator::CharClass
CharClass
Definition:
validator.h:112
tesseract::char32
signed int char32
Definition:
unichar.h:52
tesseract::ViramaScript
ViramaScript
Definition:
validator.h:53
tesseract::Validator
Definition:
validator.h:72
validator.h
tesseract
Definition:
baseapi.cpp:94
tesseract::ValidateKhmer
Definition:
validate_khmer.h:9
tesseract::ValidateKhmer::ValidateKhmer
ValidateKhmer(ViramaScript script, bool report_errors)
Definition:
validate_khmer.h:11
tesseract::ValidateKhmer::~ValidateKhmer
~ValidateKhmer()
Definition:
validate_khmer.h:13
tesseract::ValidateKhmer::ConsumeGraphemeIfValid
bool ConsumeGraphemeIfValid() override
Definition:
validate_khmer.cpp:20
tesseract::ValidateKhmer::UnicodeToCharClass
CharClass UnicodeToCharClass(char32 ch) const override
Definition:
validate_khmer.cpp:88
tesseract-ocr.master
src
training
validate_khmer.h
Generated on Mon Oct 29 2018 11:03:50 for tesseract by
1.8.14