#include <rejctmap.h>
Definition at line 310 of file rejctmap.h.
◆ REJMAP() [1/2]
tesseract::REJMAP::REJMAP |
( |
| ) |
|
|
default |
◆ REJMAP() [2/2]
tesseract::REJMAP::REJMAP |
( |
const REJMAP & |
rejmap | ) |
|
|
inline |
Definition at line 317 of file rejctmap.h.
317 {
318 *this = rejmap;
319 }
◆ accept_count()
int16_t tesseract::REJMAP::accept_count |
( |
| ) |
const |
Definition at line 72 of file rejctmap.cpp.
72 {
74 for (
unsigned i = 0;
i < len;
i++) {
75 if (ptr[
i].accepted()) {
77 }
78 }
80}
◆ full_print()
void tesseract::REJMAP::full_print |
( |
FILE * |
fp | ) |
const |
Definition at line 120 of file rejctmap.cpp.
120 {
121 for (
unsigned i = 0;
i < len;
i++) {
122 ptr[
i].full_print(fp);
123 fprintf(fp, "\n");
124 }
125}
◆ initialise()
void tesseract::REJMAP::initialise |
( |
uint16_t |
length | ) |
|
◆ length()
uint16_t tesseract::REJMAP::length |
( |
| ) |
const |
|
inline |
Definition at line 333 of file rejctmap.h.
333 {
334 return len;
335 }
◆ operator=()
REJMAP & tesseract::REJMAP::operator= |
( |
const REJMAP & |
source | ) |
|
Definition at line 59 of file rejctmap.cpp.
59 {
61 for (
unsigned i = 0;
i < len;
i++) {
62 ptr[
i] = source.ptr[
i];
63 }
64 return *this;
65}
void initialise(uint16_t length)
◆ operator[]()
REJ & tesseract::REJMAP::operator[] |
( |
uint16_t |
index | ) |
const |
|
inline |
Definition at line 326 of file rejctmap.h.
328 {
330 return ptr[index];
331 }
◆ print()
void tesseract::REJMAP::print |
( |
FILE * |
fp | ) |
const |
Definition at line 112 of file rejctmap.cpp.
112 {
113 fputc('"', fp);
114 for (
unsigned i = 0;
i < len;
i++) {
115 fputc( ptr[
i].display_char(), fp);
116 }
117 fputc('"', fp);
118}
◆ quality_recoverable_rejects()
bool tesseract::REJMAP::quality_recoverable_rejects |
( |
| ) |
const |
Definition at line 91 of file rejctmap.cpp.
91 {
92 for (
unsigned i = 0;
i < len;
i++) {
93 if (ptr[
i].accept_if_good_quality()) {
94 return true;
95 }
96 }
97 return false;
98}
◆ recoverable_rejects()
bool tesseract::REJMAP::recoverable_rejects |
( |
| ) |
const |
Definition at line 82 of file rejctmap.cpp.
82 {
83 for (
unsigned i = 0;
i < len;
i++) {
84 if (ptr[
i].recoverable()) {
85 return true;
86 }
87 }
88 return false;
89}
◆ rej_word_bad_permuter()
void tesseract::REJMAP::rej_word_bad_permuter |
( |
| ) |
|
Definition at line 155 of file rejctmap.cpp.
155 {
156 for (
unsigned i = 0;
i < len;
i++) {
157 if (ptr[
i].accepted()) {
158 ptr[
i].setrej_bad_permuter();
159 }
160 }
161}
◆ rej_word_bad_quality()
void tesseract::REJMAP::rej_word_bad_quality |
( |
| ) |
|
Definition at line 187 of file rejctmap.cpp.
187 {
188 for (
unsigned i = 0;
i < len;
i++) {
189 if (ptr[
i].accepted()) {
190 ptr[
i].setrej_bad_quality();
191 }
192 }
193}
◆ rej_word_block_rej()
void tesseract::REJMAP::rej_word_block_rej |
( |
| ) |
|
Definition at line 203 of file rejctmap.cpp.
203 {
204 for (
unsigned i = 0;
i < len;
i++) {
205 if (ptr[
i].accepted()) {
206 ptr[
i].setrej_block_rej();
207 }
208 }
209}
◆ rej_word_contains_blanks()
void tesseract::REJMAP::rej_word_contains_blanks |
( |
| ) |
|
Definition at line 147 of file rejctmap.cpp.
147 {
148 for (
unsigned i = 0;
i < len;
i++) {
149 if (ptr[
i].accepted()) {
150 ptr[
i].setrej_contains_blanks();
151 }
152 }
153}
◆ rej_word_doc_rej()
void tesseract::REJMAP::rej_word_doc_rej |
( |
| ) |
|
Definition at line 195 of file rejctmap.cpp.
195 {
196 for (
unsigned i = 0;
i < len;
i++) {
197 if (ptr[
i].accepted()) {
198 ptr[
i].setrej_doc_rej();
199 }
200 }
201}
◆ rej_word_mostly_rej()
void tesseract::REJMAP::rej_word_mostly_rej |
( |
| ) |
|
Definition at line 179 of file rejctmap.cpp.
179 {
180 for (
unsigned i = 0;
i < len;
i++) {
181 if (ptr[
i].accepted()) {
182 ptr[
i].setrej_mostly_rej();
183 }
184 }
185}
◆ rej_word_no_alphanums()
void tesseract::REJMAP::rej_word_no_alphanums |
( |
| ) |
|
Definition at line 171 of file rejctmap.cpp.
171 {
172 for (
unsigned i = 0;
i < len;
i++) {
173 if (ptr[
i].accepted()) {
174 ptr[
i].setrej_no_alphanums();
175 }
176 }
177}
◆ rej_word_not_tess_accepted()
void tesseract::REJMAP::rej_word_not_tess_accepted |
( |
| ) |
|
Definition at line 139 of file rejctmap.cpp.
139 {
140 for (
unsigned i = 0;
i < len;
i++) {
141 if (ptr[
i].accepted()) {
142 ptr[
i].setrej_not_tess_accepted();
143 }
144 }
145}
◆ rej_word_row_rej()
void tesseract::REJMAP::rej_word_row_rej |
( |
| ) |
|
Definition at line 211 of file rejctmap.cpp.
211 {
212 for (
unsigned i = 0;
i < len;
i++) {
213 if (ptr[
i].accepted()) {
214 ptr[
i].setrej_row_rej();
215 }
216 }
217}
◆ rej_word_small_xht()
void tesseract::REJMAP::rej_word_small_xht |
( |
| ) |
|
Definition at line 127 of file rejctmap.cpp.
127 {
128 for (
unsigned i = 0;
i < len;
i++) {
129 ptr[
i].setrej_small_xht();
130 }
131}
◆ rej_word_tess_failure()
void tesseract::REJMAP::rej_word_tess_failure |
( |
| ) |
|
Definition at line 133 of file rejctmap.cpp.
133 {
134 for (
unsigned i = 0;
i < len;
i++) {
135 ptr[
i].setrej_tess_failure();
136 }
137}
◆ rej_word_xht_fixup()
void tesseract::REJMAP::rej_word_xht_fixup |
( |
| ) |
|
Definition at line 163 of file rejctmap.cpp.
163 {
164 for (
unsigned i = 0;
i < len;
i++) {
165 if (ptr[
i].accepted()) {
166 ptr[
i].setrej_xht_fixup();
167 }
168 }
169}
◆ reject_count()
int16_t tesseract::REJMAP::reject_count |
( |
| ) |
const |
|
inline |
Definition at line 339 of file rejctmap.h.
339 {
341 }
int16_t accept_count() const
◆ remove_pos()
void tesseract::REJMAP::remove_pos |
( |
uint16_t |
pos | ) |
|
Definition at line 100 of file rejctmap.cpp.
102 {
105
106 len--;
107 for (; pos < len; pos++) {
108 ptr[pos] = ptr[pos + 1];
109 }
110}
The documentation for this class was generated from the following files:
- /media/home/debian/src/github/tesseract-ocr/tesseract/src/ccstruct/rejctmap.h
- /media/home/debian/src/github/tesseract-ocr/tesseract/src/ccstruct/rejctmap.cpp