-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy patha00077_source.html
288 lines (286 loc) · 244 KB
/
a00077_source.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.14"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>tesseract: /usr/src/tesseract-ocr.master/src/ccmain/docqual.cpp Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
$(document).ready(initResizable);
/* @license-end */</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">tesseract
 <span id="projectnumber">4.0.0-1-g2a2b</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.14 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('a00077_source.html','');});
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<div class="header">
<div class="headertitle">
<div class="title">docqual.cpp</div> </div>
</div><!--header-->
<div class="contents">
<a href="a00077.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span> <span class="comment">/******************************************************************</span></div><div class="line"><a name="l00002"></a><span class="lineno"> 2</span> <span class="comment"> * File: docqual.cpp (Formerly docqual.c)</span></div><div class="line"><a name="l00003"></a><span class="lineno"> 3</span> <span class="comment"> * Description: Document Quality Metrics</span></div><div class="line"><a name="l00004"></a><span class="lineno"> 4</span> <span class="comment"> * Author: Phil Cheatle</span></div><div class="line"><a name="l00005"></a><span class="lineno"> 5</span> <span class="comment"> * Created: Mon May 9 11:27:28 BST 1994</span></div><div class="line"><a name="l00006"></a><span class="lineno"> 6</span> <span class="comment"> *</span></div><div class="line"><a name="l00007"></a><span class="lineno"> 7</span> <span class="comment"> * (C) Copyright 1994, Hewlett-Packard Ltd.</span></div><div class="line"><a name="l00008"></a><span class="lineno"> 8</span> <span class="comment"> ** Licensed under the Apache License, Version 2.0 (the "License");</span></div><div class="line"><a name="l00009"></a><span class="lineno"> 9</span> <span class="comment"> ** you may not use this file except in compliance with the License.</span></div><div class="line"><a name="l00010"></a><span class="lineno"> 10</span> <span class="comment"> ** You may obtain a copy of the License at</span></div><div class="line"><a name="l00011"></a><span class="lineno"> 11</span> <span class="comment"> ** http://www.apache.org/licenses/LICENSE-2.0</span></div><div class="line"><a name="l00012"></a><span class="lineno"> 12</span> <span class="comment"> ** Unless required by applicable law or agreed to in writing, software</span></div><div class="line"><a name="l00013"></a><span class="lineno"> 13</span> <span class="comment"> ** distributed under the License is distributed on an "AS IS" BASIS,</span></div><div class="line"><a name="l00014"></a><span class="lineno"> 14</span> <span class="comment"> ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</span></div><div class="line"><a name="l00015"></a><span class="lineno"> 15</span> <span class="comment"> ** See the License for the specific language governing permissions and</span></div><div class="line"><a name="l00016"></a><span class="lineno"> 16</span> <span class="comment"> ** limitations under the License.</span></div><div class="line"><a name="l00017"></a><span class="lineno"> 17</span> <span class="comment"> *</span></div><div class="line"><a name="l00018"></a><span class="lineno"> 18</span> <span class="comment"> **********************************************************************/</span></div><div class="line"><a name="l00019"></a><span class="lineno"> 19</span> </div><div class="line"><a name="l00020"></a><span class="lineno"> 20</span> <span class="preprocessor">#include <cctype></span></div><div class="line"><a name="l00021"></a><span class="lineno"> 21</span> <span class="preprocessor">#include "<a class="code" href="a00080.html">docqual.h</a>"</span></div><div class="line"><a name="l00022"></a><span class="lineno"> 22</span> <span class="preprocessor">#include "<a class="code" href="a00167.html">reject.h</a>"</span></div><div class="line"><a name="l00023"></a><span class="lineno"> 23</span> <span class="preprocessor">#include "<a class="code" href="a00587.html">tesscallback.h</a>"</span></div><div class="line"><a name="l00024"></a><span class="lineno"> 24</span> <span class="preprocessor">#include "<a class="code" href="a00197.html">tessvars.h</a>"</span></div><div class="line"><a name="l00025"></a><span class="lineno"> 25</span> <span class="preprocessor">#include "<a class="code" href="a00875.html">globals.h</a>"</span></div><div class="line"><a name="l00026"></a><span class="lineno"> 26</span> <span class="preprocessor">#include "<a class="code" href="a00191.html">tesseractclass.h</a>"</span></div><div class="line"><a name="l00027"></a><span class="lineno"> 27</span> </div><div class="line"><a name="l00028"></a><span class="lineno"> 28</span> <span class="keyword">namespace </span><a class="code" href="a01629.html">tesseract</a>{</div><div class="line"><a name="l00029"></a><span class="lineno"> 29</span> </div><div class="line"><a name="l00030"></a><span class="lineno"> 30</span> <span class="comment">// A little class to provide the callbacks as we have no pre-bound args.</span></div><div class="line"><a name="l00031"></a><span class="lineno"><a class="line" href="a02242.html"> 31</a></span> <span class="keyword">struct </span><a class="code" href="a02242.html">DocQualCallbacks</a> {</div><div class="line"><a name="l00032"></a><span class="lineno"><a class="line" href="a02242.html#afcbe06fefeeaee8eb7f00b8e90a2d769"> 32</a></span>  <span class="keyword">explicit</span> <a class="code" href="a02242.html#afcbe06fefeeaee8eb7f00b8e90a2d769">DocQualCallbacks</a>(<a class="code" href="a02542.html">WERD_RES</a>* word0)</div><div class="line"><a name="l00033"></a><span class="lineno"> 33</span>  : <a class="code" href="a02242.html#a06e04c42b1ff2e5ffa24923e9f34e84e">word</a>(word0), <a class="code" href="a02242.html#abb2699970b61241200641216fd972ed6">match_count</a>(0), <a class="code" href="a02242.html#a1d1838a03608183c677257e30aa5ea2a">accepted_match_count</a>(0) {}</div><div class="line"><a name="l00034"></a><span class="lineno"> 34</span> </div><div class="line"><a name="l00035"></a><span class="lineno"><a class="line" href="a02242.html#a5f143209a4192b1872e2e2430d78e29a"> 35</a></span>  <span class="keywordtype">void</span> <a class="code" href="a02242.html#a5f143209a4192b1872e2e2430d78e29a">CountMatchingBlobs</a>(<span class="keywordtype">int</span> index) {</div><div class="line"><a name="l00036"></a><span class="lineno"> 36</span>  ++<a class="code" href="a02242.html#abb2699970b61241200641216fd972ed6">match_count</a>;</div><div class="line"><a name="l00037"></a><span class="lineno"> 37</span>  }</div><div class="line"><a name="l00038"></a><span class="lineno"> 38</span> </div><div class="line"><a name="l00039"></a><span class="lineno"><a class="line" href="a02242.html#a7fb05da0218e4e94705cab1d751c7762"> 39</a></span>  <span class="keywordtype">void</span> <a class="code" href="a02242.html#a7fb05da0218e4e94705cab1d751c7762">CountAcceptedBlobs</a>(<span class="keywordtype">int</span> index) {</div><div class="line"><a name="l00040"></a><span class="lineno"> 40</span>  <span class="keywordflow">if</span> (<a class="code" href="a02242.html#a06e04c42b1ff2e5ffa24923e9f34e84e">word</a>-><a class="code" href="a02542.html#ae24eb58be06cf275aee411d947fd31ef">reject_map</a>[index].accepted())</div><div class="line"><a name="l00041"></a><span class="lineno"> 41</span>  ++<a class="code" href="a02242.html#a1d1838a03608183c677257e30aa5ea2a">accepted_match_count</a>;</div><div class="line"><a name="l00042"></a><span class="lineno"> 42</span>  ++<a class="code" href="a02242.html#abb2699970b61241200641216fd972ed6">match_count</a>;</div><div class="line"><a name="l00043"></a><span class="lineno"> 43</span>  }</div><div class="line"><a name="l00044"></a><span class="lineno"> 44</span> </div><div class="line"><a name="l00045"></a><span class="lineno"><a class="line" href="a02242.html#a4b494c625c5aa534c6fa265fb7fe828f"> 45</a></span>  <span class="keywordtype">void</span> <a class="code" href="a02242.html#a4b494c625c5aa534c6fa265fb7fe828f">AcceptIfGoodQuality</a>(<span class="keywordtype">int</span> index) {</div><div class="line"><a name="l00046"></a><span class="lineno"> 46</span>  <span class="keywordflow">if</span> (<a class="code" href="a02242.html#a06e04c42b1ff2e5ffa24923e9f34e84e">word</a>-><a class="code" href="a02542.html#ae24eb58be06cf275aee411d947fd31ef">reject_map</a>[index].accept_if_good_quality())</div><div class="line"><a name="l00047"></a><span class="lineno"> 47</span>  <a class="code" href="a02242.html#a06e04c42b1ff2e5ffa24923e9f34e84e">word</a>-><a class="code" href="a02542.html#ae24eb58be06cf275aee411d947fd31ef">reject_map</a>[index].setrej_quality_accept();</div><div class="line"><a name="l00048"></a><span class="lineno"> 48</span>  }</div><div class="line"><a name="l00049"></a><span class="lineno"> 49</span> </div><div class="line"><a name="l00050"></a><span class="lineno"><a class="line" href="a02242.html#a06e04c42b1ff2e5ffa24923e9f34e84e"> 50</a></span>  <a class="code" href="a02542.html">WERD_RES</a>* <a class="code" href="a02242.html#a06e04c42b1ff2e5ffa24923e9f34e84e">word</a>;</div><div class="line"><a name="l00051"></a><span class="lineno"><a class="line" href="a02242.html#abb2699970b61241200641216fd972ed6"> 51</a></span>  int16_t <a class="code" href="a02242.html#abb2699970b61241200641216fd972ed6">match_count</a>;</div><div class="line"><a name="l00052"></a><span class="lineno"><a class="line" href="a02242.html#a1d1838a03608183c677257e30aa5ea2a"> 52</a></span>  int16_t <a class="code" href="a02242.html#a1d1838a03608183c677257e30aa5ea2a">accepted_match_count</a>;</div><div class="line"><a name="l00053"></a><span class="lineno"> 53</span> };</div><div class="line"><a name="l00054"></a><span class="lineno"> 54</span> </div><div class="line"><a name="l00055"></a><span class="lineno"> 55</span> <span class="comment">/*************************************************************************</span></div><div class="line"><a name="l00056"></a><span class="lineno"> 56</span> <span class="comment"> * word_blob_quality()</span></div><div class="line"><a name="l00057"></a><span class="lineno"> 57</span> <span class="comment"> * How many blobs in the box_word are identical to those of the inword?</span></div><div class="line"><a name="l00058"></a><span class="lineno"> 58</span> <span class="comment"> * ASSUME blobs in both initial word and box_word are in ascending order of</span></div><div class="line"><a name="l00059"></a><span class="lineno"> 59</span> <span class="comment"> * left hand blob edge.</span></div><div class="line"><a name="l00060"></a><span class="lineno"> 60</span> <span class="comment"> *************************************************************************/</span></div><div class="line"><a name="l00061"></a><span class="lineno"><a class="line" href="a02358.html#ad0d6e09c6386cb0d6d1bc4a34beb23fa"> 61</a></span> int16_t <a class="code" href="a02358.html#ad0d6e09c6386cb0d6d1bc4a34beb23fa">Tesseract::word_blob_quality</a>(<a class="code" href="a02542.html">WERD_RES</a> *word, <a class="code" href="a02526.html">ROW</a> *row) {</div><div class="line"><a name="l00062"></a><span class="lineno"> 62</span>  <span class="keywordflow">if</span> (word-><a class="code" href="a02542.html#af171e37da16ed628bf4516e9f934dc08">bln_boxes</a> == <span class="keyword">nullptr</span> ||</div><div class="line"><a name="l00063"></a><span class="lineno"> 63</span>  word-><a class="code" href="a02542.html#a211ab5c5a13123ee7bdc7459d3363f9d">rebuild_word</a> == <span class="keyword">nullptr</span> || word-><a class="code" href="a02542.html#a211ab5c5a13123ee7bdc7459d3363f9d">rebuild_word</a>-><a class="code" href="a02402.html#a52fba22521039a79d8c1c8182f602dcc">blobs</a>.<a class="code" href="a02182.html#a172c4aa23ba397e24319ae095281cbcc">empty</a>())</div><div class="line"><a name="l00064"></a><span class="lineno"> 64</span>  <span class="keywordflow">return</span> 0;</div><div class="line"><a name="l00065"></a><span class="lineno"> 65</span> </div><div class="line"><a name="l00066"></a><span class="lineno"> 66</span>  <a class="code" href="a02242.html">DocQualCallbacks</a> cb(word);</div><div class="line"><a name="l00067"></a><span class="lineno"> 67</span>  word-><a class="code" href="a02542.html#af171e37da16ed628bf4516e9f934dc08">bln_boxes</a>-><a class="code" href="a02410.html#a114878e47b1abf1d799350aea31af8e2">ProcessMatchedBlobs</a>(</div><div class="line"><a name="l00068"></a><span class="lineno"> 68</span>  *word-><a class="code" href="a02542.html#a211ab5c5a13123ee7bdc7459d3363f9d">rebuild_word</a>,</div><div class="line"><a name="l00069"></a><span class="lineno"> 69</span>  <a class="code" href="a00587.html#ad000c6729bae0f97075ca10a0b5bf7d6">NewPermanentTessCallback</a>(&cb, &<a class="code" href="a02242.html#a5f143209a4192b1872e2e2430d78e29a">DocQualCallbacks::CountMatchingBlobs</a>));</div><div class="line"><a name="l00070"></a><span class="lineno"> 70</span>  <span class="keywordflow">return</span> cb.<a class="code" href="a02242.html#abb2699970b61241200641216fd972ed6">match_count</a>;</div><div class="line"><a name="l00071"></a><span class="lineno"> 71</span> }</div><div class="line"><a name="l00072"></a><span class="lineno"> 72</span> </div><div class="line"><a name="l00073"></a><span class="lineno"><a class="line" href="a02358.html#a37bfb6999dc3b5d05d4eeafa38571d9f"> 73</a></span> int16_t <a class="code" href="a02358.html#a37bfb6999dc3b5d05d4eeafa38571d9f">Tesseract::word_outline_errs</a>(<a class="code" href="a02542.html">WERD_RES</a> *word) {</div><div class="line"><a name="l00074"></a><span class="lineno"> 74</span>  int16_t i = 0;</div><div class="line"><a name="l00075"></a><span class="lineno"> 75</span>  int16_t err_count = 0;</div><div class="line"><a name="l00076"></a><span class="lineno"> 76</span> </div><div class="line"><a name="l00077"></a><span class="lineno"> 77</span>  <span class="keywordflow">if</span> (word-><a class="code" href="a02542.html#a211ab5c5a13123ee7bdc7459d3363f9d">rebuild_word</a> != <span class="keyword">nullptr</span>) {</div><div class="line"><a name="l00078"></a><span class="lineno"> 78</span>  <span class="keywordflow">for</span> (<span class="keywordtype">int</span> b = 0; b < word-><a class="code" href="a02542.html#a211ab5c5a13123ee7bdc7459d3363f9d">rebuild_word</a>-><a class="code" href="a02402.html#a0d5347723ece084faf8f3d0dba6dd219">NumBlobs</a>(); ++b) {</div><div class="line"><a name="l00079"></a><span class="lineno"> 79</span>  <a class="code" href="a02398.html">TBLOB</a>* blob = word-><a class="code" href="a02542.html#a211ab5c5a13123ee7bdc7459d3363f9d">rebuild_word</a>-><a class="code" href="a02402.html#a52fba22521039a79d8c1c8182f602dcc">blobs</a>[b];</div><div class="line"><a name="l00080"></a><span class="lineno"> 80</span>  err_count += <a class="code" href="a02358.html#aeeb8639cc084ba3f46e4c014ad2eaea8">count_outline_errs</a>(word-><a class="code" href="a02542.html#a3d42ac7ec121263e757c9b7160dfd50d">best_choice</a>-><a class="code" href="a02606.html#adf200132afabc2ee6ec256e516011007">unichar_string</a>()[i],</div><div class="line"><a name="l00081"></a><span class="lineno"> 81</span>  blob-><a class="code" href="a02398.html#ae6866212174ebb7b1e3f11e1a516c8a2">NumOutlines</a>());</div><div class="line"><a name="l00082"></a><span class="lineno"> 82</span>  i++;</div><div class="line"><a name="l00083"></a><span class="lineno"> 83</span>  }</div><div class="line"><a name="l00084"></a><span class="lineno"> 84</span>  }</div><div class="line"><a name="l00085"></a><span class="lineno"> 85</span>  <span class="keywordflow">return</span> err_count;</div><div class="line"><a name="l00086"></a><span class="lineno"> 86</span> }</div><div class="line"><a name="l00087"></a><span class="lineno"> 87</span> </div><div class="line"><a name="l00088"></a><span class="lineno"> 88</span> <span class="comment">/*************************************************************************</span></div><div class="line"><a name="l00089"></a><span class="lineno"> 89</span> <span class="comment"> * word_char_quality()</span></div><div class="line"><a name="l00090"></a><span class="lineno"> 90</span> <span class="comment"> * Combination of blob quality and outline quality - how many good chars are</span></div><div class="line"><a name="l00091"></a><span class="lineno"> 91</span> <span class="comment"> * there? - I.e chars which pass the blob AND outline tests.</span></div><div class="line"><a name="l00092"></a><span class="lineno"> 92</span> <span class="comment"> *************************************************************************/</span></div><div class="line"><a name="l00093"></a><span class="lineno"><a class="line" href="a02358.html#a99a1e1a4cd1134ecab8028de820ae57a"> 93</a></span> <span class="keywordtype">void</span> <a class="code" href="a02358.html#a99a1e1a4cd1134ecab8028de820ae57a">Tesseract::word_char_quality</a>(<a class="code" href="a02542.html">WERD_RES</a> *word,</div><div class="line"><a name="l00094"></a><span class="lineno"> 94</span>  <a class="code" href="a02526.html">ROW</a> *row,</div><div class="line"><a name="l00095"></a><span class="lineno"> 95</span>  int16_t *match_count,</div><div class="line"><a name="l00096"></a><span class="lineno"> 96</span>  int16_t *accepted_match_count) {</div><div class="line"><a name="l00097"></a><span class="lineno"> 97</span>  <span class="keywordflow">if</span> (word-><a class="code" href="a02542.html#af171e37da16ed628bf4516e9f934dc08">bln_boxes</a> == <span class="keyword">nullptr</span> || word-><a class="code" href="a02542.html#a211ab5c5a13123ee7bdc7459d3363f9d">rebuild_word</a> == <span class="keyword">nullptr</span> ||</div><div class="line"><a name="l00098"></a><span class="lineno"> 98</span>  word-><a class="code" href="a02542.html#a211ab5c5a13123ee7bdc7459d3363f9d">rebuild_word</a>-><a class="code" href="a02402.html#a52fba22521039a79d8c1c8182f602dcc">blobs</a>.<a class="code" href="a02182.html#a172c4aa23ba397e24319ae095281cbcc">empty</a>()) {</div><div class="line"><a name="l00099"></a><span class="lineno"> 99</span>  *match_count = 0;</div><div class="line"><a name="l00100"></a><span class="lineno"> 100</span>  *accepted_match_count = 0;</div><div class="line"><a name="l00101"></a><span class="lineno"> 101</span>  <span class="keywordflow">return</span>;</div><div class="line"><a name="l00102"></a><span class="lineno"> 102</span>  }</div><div class="line"><a name="l00103"></a><span class="lineno"> 103</span> </div><div class="line"><a name="l00104"></a><span class="lineno"> 104</span>  <a class="code" href="a02242.html">DocQualCallbacks</a> cb(word);</div><div class="line"><a name="l00105"></a><span class="lineno"> 105</span>  word-><a class="code" href="a02542.html#af171e37da16ed628bf4516e9f934dc08">bln_boxes</a>-><a class="code" href="a02410.html#a114878e47b1abf1d799350aea31af8e2">ProcessMatchedBlobs</a>(</div><div class="line"><a name="l00106"></a><span class="lineno"> 106</span>  *word-><a class="code" href="a02542.html#a211ab5c5a13123ee7bdc7459d3363f9d">rebuild_word</a>,</div><div class="line"><a name="l00107"></a><span class="lineno"> 107</span>  <a class="code" href="a00587.html#ad000c6729bae0f97075ca10a0b5bf7d6">NewPermanentTessCallback</a>(&cb, &<a class="code" href="a02242.html#a7fb05da0218e4e94705cab1d751c7762">DocQualCallbacks::CountAcceptedBlobs</a>));</div><div class="line"><a name="l00108"></a><span class="lineno"> 108</span>  *match_count = cb.<a class="code" href="a02242.html#abb2699970b61241200641216fd972ed6">match_count</a>;</div><div class="line"><a name="l00109"></a><span class="lineno"> 109</span>  *accepted_match_count = cb.<a class="code" href="a02242.html#a1d1838a03608183c677257e30aa5ea2a">accepted_match_count</a>;</div><div class="line"><a name="l00110"></a><span class="lineno"> 110</span> }</div><div class="line"><a name="l00111"></a><span class="lineno"> 111</span> </div><div class="line"><a name="l00112"></a><span class="lineno"> 112</span> <span class="comment">/*************************************************************************</span></div><div class="line"><a name="l00113"></a><span class="lineno"> 113</span> <span class="comment"> * unrej_good_chs()</span></div><div class="line"><a name="l00114"></a><span class="lineno"> 114</span> <span class="comment"> * Unreject POTENTIAL rejects if the blob passes the blob and outline checks</span></div><div class="line"><a name="l00115"></a><span class="lineno"> 115</span> <span class="comment"> *************************************************************************/</span></div><div class="line"><a name="l00116"></a><span class="lineno"><a class="line" href="a02358.html#ab156ed65c76c10dadacfc1121624ebc2"> 116</a></span> <span class="keywordtype">void</span> <a class="code" href="a02358.html#ab156ed65c76c10dadacfc1121624ebc2">Tesseract::unrej_good_chs</a>(<a class="code" href="a02542.html">WERD_RES</a> *word, <a class="code" href="a02526.html">ROW</a> *row) {</div><div class="line"><a name="l00117"></a><span class="lineno"> 117</span>  <span class="keywordflow">if</span> (word-><a class="code" href="a02542.html#af171e37da16ed628bf4516e9f934dc08">bln_boxes</a> == <span class="keyword">nullptr</span> ||</div><div class="line"><a name="l00118"></a><span class="lineno"> 118</span>  word-><a class="code" href="a02542.html#a211ab5c5a13123ee7bdc7459d3363f9d">rebuild_word</a> == <span class="keyword">nullptr</span> || word-><a class="code" href="a02542.html#a211ab5c5a13123ee7bdc7459d3363f9d">rebuild_word</a>-><a class="code" href="a02402.html#a52fba22521039a79d8c1c8182f602dcc">blobs</a>.<a class="code" href="a02182.html#a172c4aa23ba397e24319ae095281cbcc">empty</a>())</div><div class="line"><a name="l00119"></a><span class="lineno"> 119</span>  <span class="keywordflow">return</span>;</div><div class="line"><a name="l00120"></a><span class="lineno"> 120</span> </div><div class="line"><a name="l00121"></a><span class="lineno"> 121</span>  <a class="code" href="a02242.html">DocQualCallbacks</a> cb(word);</div><div class="line"><a name="l00122"></a><span class="lineno"> 122</span>  word-><a class="code" href="a02542.html#af171e37da16ed628bf4516e9f934dc08">bln_boxes</a>-><a class="code" href="a02410.html#a114878e47b1abf1d799350aea31af8e2">ProcessMatchedBlobs</a>(</div><div class="line"><a name="l00123"></a><span class="lineno"> 123</span>  *word-><a class="code" href="a02542.html#a211ab5c5a13123ee7bdc7459d3363f9d">rebuild_word</a>,</div><div class="line"><a name="l00124"></a><span class="lineno"> 124</span>  <a class="code" href="a00587.html#ad000c6729bae0f97075ca10a0b5bf7d6">NewPermanentTessCallback</a>(&cb, &<a class="code" href="a02242.html#a4b494c625c5aa534c6fa265fb7fe828f">DocQualCallbacks::AcceptIfGoodQuality</a>));</div><div class="line"><a name="l00125"></a><span class="lineno"> 125</span> }</div><div class="line"><a name="l00126"></a><span class="lineno"> 126</span> </div><div class="line"><a name="l00127"></a><span class="lineno"><a class="line" href="a02358.html#aeeb8639cc084ba3f46e4c014ad2eaea8"> 127</a></span> int16_t <a class="code" href="a02358.html#aeeb8639cc084ba3f46e4c014ad2eaea8">Tesseract::count_outline_errs</a>(<span class="keywordtype">char</span> c, int16_t outline_count) {</div><div class="line"><a name="l00128"></a><span class="lineno"> 128</span>  <span class="keywordtype">int</span> expected_outline_count;</div><div class="line"><a name="l00129"></a><span class="lineno"> 129</span> </div><div class="line"><a name="l00130"></a><span class="lineno"> 130</span>  <span class="keywordflow">if</span> (<a class="code" href="a02834.html">STRING</a> (<a class="code" href="a02358.html#a6c17b9a72b83394d218773f9a297b77a">outlines_odd</a>).contains (c))</div><div class="line"><a name="l00131"></a><span class="lineno"> 131</span>  <span class="keywordflow">return</span> 0; <span class="comment">// Don't use this char</span></div><div class="line"><a name="l00132"></a><span class="lineno"> 132</span>  <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="a02834.html">STRING</a> (<a class="code" href="a02358.html#acb4b01dca8f419468e5ccf97c451e7cf">outlines_2</a>).contains (c))</div><div class="line"><a name="l00133"></a><span class="lineno"> 133</span>  expected_outline_count = 2;</div><div class="line"><a name="l00134"></a><span class="lineno"> 134</span>  <span class="keywordflow">else</span></div><div class="line"><a name="l00135"></a><span class="lineno"> 135</span>  expected_outline_count = 1;</div><div class="line"><a name="l00136"></a><span class="lineno"> 136</span>  <span class="keywordflow">return</span> abs (outline_count - expected_outline_count);</div><div class="line"><a name="l00137"></a><span class="lineno"> 137</span> }</div><div class="line"><a name="l00138"></a><span class="lineno"> 138</span> </div><div class="line"><a name="l00139"></a><span class="lineno"><a class="line" href="a02358.html#a6c2fe027fce0afe0a8b4b4e3f10266a4"> 139</a></span> <span class="keywordtype">void</span> <a class="code" href="a02358.html#a6c2fe027fce0afe0a8b4b4e3f10266a4">Tesseract::quality_based_rejection</a>(<a class="code" href="a02546.html">PAGE_RES_IT</a> &page_res_it,</div><div class="line"><a name="l00140"></a><span class="lineno"> 140</span>  <span class="keywordtype">bool</span> good_quality_doc) {</div><div class="line"><a name="l00141"></a><span class="lineno"> 141</span>  <span class="keywordflow">if</span> ((<a class="code" href="a02358.html#ab72bc025f4efb212ec99ee21091d7f10">tessedit_good_quality_unrej</a> && good_quality_doc))</div><div class="line"><a name="l00142"></a><span class="lineno"> 142</span>  <a class="code" href="a02358.html#af247aff07d2cc55480e36f278c5a76a8">unrej_good_quality_words</a>(page_res_it);</div><div class="line"><a name="l00143"></a><span class="lineno"> 143</span>  <a class="code" href="a02358.html#a3528122ae883323b4d2a57870d9ddd7b">doc_and_block_rejection</a>(page_res_it, good_quality_doc);</div><div class="line"><a name="l00144"></a><span class="lineno"> 144</span>  <span class="keywordflow">if</span> (<a class="code" href="a02358.html#a8a848e8a83e73f182d0ef7324afc741f">unlv_tilde_crunching</a>) {</div><div class="line"><a name="l00145"></a><span class="lineno"> 145</span>  <a class="code" href="a02358.html#a2c77d5d94321d7fc717b5376bcb02b79">tilde_crunch</a>(page_res_it);</div><div class="line"><a name="l00146"></a><span class="lineno"> 146</span>  <a class="code" href="a02358.html#a06a8ab9064d4c6da290c82e7adf53a8c">tilde_delete</a>(page_res_it);</div><div class="line"><a name="l00147"></a><span class="lineno"> 147</span>  }</div><div class="line"><a name="l00148"></a><span class="lineno"> 148</span> }</div><div class="line"><a name="l00149"></a><span class="lineno"> 149</span> </div><div class="line"><a name="l00150"></a><span class="lineno"> 150</span> <span class="comment">/*************************************************************************</span></div><div class="line"><a name="l00151"></a><span class="lineno"> 151</span> <span class="comment"> * unrej_good_quality_words()</span></div><div class="line"><a name="l00152"></a><span class="lineno"> 152</span> <span class="comment"> * Accept potential rejects in words which pass the following checks:</span></div><div class="line"><a name="l00153"></a><span class="lineno"> 153</span> <span class="comment"> * - Contains a potential reject</span></div><div class="line"><a name="l00154"></a><span class="lineno"> 154</span> <span class="comment"> * - Word looks like a sensible alpha word.</span></div><div class="line"><a name="l00155"></a><span class="lineno"> 155</span> <span class="comment"> * - Word segmentation is the same as the original image</span></div><div class="line"><a name="l00156"></a><span class="lineno"> 156</span> <span class="comment"> * - All characters have the expected number of outlines</span></div><div class="line"><a name="l00157"></a><span class="lineno"> 157</span> <span class="comment"> * NOTE - the rejection counts are recalculated after unrejection</span></div><div class="line"><a name="l00158"></a><span class="lineno"> 158</span> <span class="comment"> * - CAN'T do it in a single pass without a bit of fiddling</span></div><div class="line"><a name="l00159"></a><span class="lineno"> 159</span> <span class="comment"> * - keep it simple but inefficient</span></div><div class="line"><a name="l00160"></a><span class="lineno"> 160</span> <span class="comment"> *************************************************************************/</span></div><div class="line"><a name="l00161"></a><span class="lineno"><a class="line" href="a02358.html#af247aff07d2cc55480e36f278c5a76a8"> 161</a></span> <span class="keywordtype">void</span> <a class="code" href="a02358.html#af247aff07d2cc55480e36f278c5a76a8">Tesseract::unrej_good_quality_words</a>( <span class="comment">//unreject potential</span></div><div class="line"><a name="l00162"></a><span class="lineno"> 162</span>  <a class="code" href="a02546.html">PAGE_RES_IT</a> &page_res_it) {</div><div class="line"><a name="l00163"></a><span class="lineno"> 163</span>  <a class="code" href="a02542.html">WERD_RES</a> *word;</div><div class="line"><a name="l00164"></a><span class="lineno"> 164</span>  <a class="code" href="a02538.html">ROW_RES</a> *current_row;</div><div class="line"><a name="l00165"></a><span class="lineno"> 165</span>  <a class="code" href="a02534.html">BLOCK_RES</a> *current_block;</div><div class="line"><a name="l00166"></a><span class="lineno"> 166</span>  <span class="keywordtype">int</span> i;</div><div class="line"><a name="l00167"></a><span class="lineno"> 167</span> </div><div class="line"><a name="l00168"></a><span class="lineno"> 168</span>  page_res_it.<a class="code" href="a02546.html#a15febd45d0904bb3c5f7d506368177f0">restart_page</a> ();</div><div class="line"><a name="l00169"></a><span class="lineno"> 169</span>  <span class="keywordflow">while</span> (page_res_it.<a class="code" href="a02546.html#a6cdcdaa4b0b1250ab7e14760d4b5f113">word</a> () != <span class="keyword">nullptr</span>) {</div><div class="line"><a name="l00170"></a><span class="lineno"> 170</span>  <a class="code" href="a02358.html#a91dd02088541c2b02ff3b70810c71eff">check_debug_pt</a> (page_res_it.<a class="code" href="a02546.html#a6cdcdaa4b0b1250ab7e14760d4b5f113">word</a> (), 100);</div><div class="line"><a name="l00171"></a><span class="lineno"> 171</span>  <span class="keywordflow">if</span> (<a class="code" href="a02358.html#a40dee9aa1298b5edcd042b9ec45aeb59">bland_unrej</a>) {</div><div class="line"><a name="l00172"></a><span class="lineno"> 172</span>  word = page_res_it.<a class="code" href="a02546.html#a6cdcdaa4b0b1250ab7e14760d4b5f113">word</a> ();</div><div class="line"><a name="l00173"></a><span class="lineno"> 173</span>  <span class="keywordflow">for</span> (i = 0; i < word-><a class="code" href="a02542.html#ae24eb58be06cf275aee411d947fd31ef">reject_map</a>.<a class="code" href="a02618.html#adb462d55dc4b682e0a77090185a58011">length</a> (); i++) {</div><div class="line"><a name="l00174"></a><span class="lineno"> 174</span>  <span class="keywordflow">if</span> (word-><a class="code" href="a02542.html#ae24eb58be06cf275aee411d947fd31ef">reject_map</a>[i].accept_if_good_quality ())</div><div class="line"><a name="l00175"></a><span class="lineno"> 175</span>  word-><a class="code" href="a02542.html#ae24eb58be06cf275aee411d947fd31ef">reject_map</a>[i].setrej_quality_accept ();</div><div class="line"><a name="l00176"></a><span class="lineno"> 176</span>  }</div><div class="line"><a name="l00177"></a><span class="lineno"> 177</span>  page_res_it.<a class="code" href="a02546.html#ab29005f235cc738eebafb7d9ed6fe70b">forward</a> ();</div><div class="line"><a name="l00178"></a><span class="lineno"> 178</span>  }</div><div class="line"><a name="l00179"></a><span class="lineno"> 179</span>  <span class="keywordflow">else</span> <span class="keywordflow">if</span> ((page_res_it.<a class="code" href="a02546.html#a2038f4bd5c4c0eac4dba7f1d6bcdb5bf">row</a> ()-><a class="code" href="a02538.html#afca7c9bf18393a8a1a6a2f8648d250c4">char_count</a> > 0) &&</div><div class="line"><a name="l00180"></a><span class="lineno"> 180</span>  ((page_res_it.<a class="code" href="a02546.html#a2038f4bd5c4c0eac4dba7f1d6bcdb5bf">row</a> ()-><a class="code" href="a02538.html#a51d1ba1dfd848e692d39bf08f4e53042">rej_count</a> /</div><div class="line"><a name="l00181"></a><span class="lineno"> 181</span>  (float) page_res_it.<a class="code" href="a02546.html#a2038f4bd5c4c0eac4dba7f1d6bcdb5bf">row</a> ()-><a class="code" href="a02538.html#afca7c9bf18393a8a1a6a2f8648d250c4">char_count</a>) <=</div><div class="line"><a name="l00182"></a><span class="lineno"> 182</span>  <a class="code" href="a02358.html#a4a2be7907ac8c08a04d704b316b2ee1c">quality_rowrej_pc</a>)) {</div><div class="line"><a name="l00183"></a><span class="lineno"> 183</span>  word = page_res_it.<a class="code" href="a02546.html#a6cdcdaa4b0b1250ab7e14760d4b5f113">word</a> ();</div><div class="line"><a name="l00184"></a><span class="lineno"> 184</span>  <span class="keywordflow">if</span> (word-><a class="code" href="a02542.html#ae24eb58be06cf275aee411d947fd31ef">reject_map</a>.<a class="code" href="a02618.html#ad48f4dc7ca8fb95f7d938d834f4cbb38">quality_recoverable_rejects</a>() &&</div><div class="line"><a name="l00185"></a><span class="lineno"> 185</span>  (<a class="code" href="a02358.html#aec01ad16a705e92500c6dc8f209ab9f8">tessedit_unrej_any_wd</a> ||</div><div class="line"><a name="l00186"></a><span class="lineno"> 186</span>  <a class="code" href="a02358.html#a51f2ad8b2d849d90bbcfbfca3067c0f1">acceptable_word_string</a>(*word-><a class="code" href="a02542.html#a053a2aeeddc26a93a41a04fa08dd688a">uch_set</a>,</div><div class="line"><a name="l00187"></a><span class="lineno"> 187</span>  word-><a class="code" href="a02542.html#a3d42ac7ec121263e757c9b7160dfd50d">best_choice</a>-><a class="code" href="a02606.html#adf200132afabc2ee6ec256e516011007">unichar_string</a>().<a class="code" href="a02834.html#abf0a7b3c6ae39a46e5441f28f61de5de">string</a>(),</div><div class="line"><a name="l00188"></a><span class="lineno"> 188</span>  word-><a class="code" href="a02542.html#a3d42ac7ec121263e757c9b7160dfd50d">best_choice</a>-><a class="code" href="a02606.html#adaecd80cfe44e00e9c4647859b1c87e0">unichar_lengths</a>().<a class="code" href="a02834.html#abf0a7b3c6ae39a46e5441f28f61de5de">string</a>())</div><div class="line"><a name="l00189"></a><span class="lineno"> 189</span>  != <a class="code" href="a00074.html#af9ff5a7d7a1b9eeea7ce4106bffa7eeeaab0741a5a5ff9757ca343af255353ba0">AC_UNACCEPTABLE</a>)) {</div><div class="line"><a name="l00190"></a><span class="lineno"> 190</span>  <a class="code" href="a02358.html#ab156ed65c76c10dadacfc1121624ebc2">unrej_good_chs</a>(word, page_res_it.<a class="code" href="a02546.html#a2038f4bd5c4c0eac4dba7f1d6bcdb5bf">row</a> ()-><a class="code" href="a02538.html#ad3a856f3e9217c47b8f2f54cd3908721">row</a>);</div><div class="line"><a name="l00191"></a><span class="lineno"> 191</span>  }</div><div class="line"><a name="l00192"></a><span class="lineno"> 192</span>  page_res_it.<a class="code" href="a02546.html#ab29005f235cc738eebafb7d9ed6fe70b">forward</a> ();</div><div class="line"><a name="l00193"></a><span class="lineno"> 193</span>  }</div><div class="line"><a name="l00194"></a><span class="lineno"> 194</span>  <span class="keywordflow">else</span> {</div><div class="line"><a name="l00195"></a><span class="lineno"> 195</span>  <span class="comment">/* Skip to end of dodgy row */</span></div><div class="line"><a name="l00196"></a><span class="lineno"> 196</span>  current_row = page_res_it.<a class="code" href="a02546.html#a2038f4bd5c4c0eac4dba7f1d6bcdb5bf">row</a> ();</div><div class="line"><a name="l00197"></a><span class="lineno"> 197</span>  <span class="keywordflow">while</span> ((page_res_it.<a class="code" href="a02546.html#a6cdcdaa4b0b1250ab7e14760d4b5f113">word</a> () != <span class="keyword">nullptr</span>) &&</div><div class="line"><a name="l00198"></a><span class="lineno"> 198</span>  (page_res_it.<a class="code" href="a02546.html#a2038f4bd5c4c0eac4dba7f1d6bcdb5bf">row</a> () == current_row))</div><div class="line"><a name="l00199"></a><span class="lineno"> 199</span>  page_res_it.<a class="code" href="a02546.html#ab29005f235cc738eebafb7d9ed6fe70b">forward</a> ();</div><div class="line"><a name="l00200"></a><span class="lineno"> 200</span>  }</div><div class="line"><a name="l00201"></a><span class="lineno"> 201</span>  <a class="code" href="a02358.html#a91dd02088541c2b02ff3b70810c71eff">check_debug_pt</a> (page_res_it.<a class="code" href="a02546.html#a6cdcdaa4b0b1250ab7e14760d4b5f113">word</a> (), 110);</div><div class="line"><a name="l00202"></a><span class="lineno"> 202</span>  }</div><div class="line"><a name="l00203"></a><span class="lineno"> 203</span>  page_res_it.<a class="code" href="a02546.html#a15febd45d0904bb3c5f7d506368177f0">restart_page</a> ();</div><div class="line"><a name="l00204"></a><span class="lineno"> 204</span>  page_res_it.<a class="code" href="a02546.html#aab221a373111c4be685444b5633e22a5">page_res</a>-><a class="code" href="a02530.html#ad89f8ec4b63b4650cd9c35eb1eb82ca7">char_count</a> = 0;</div><div class="line"><a name="l00205"></a><span class="lineno"> 205</span>  page_res_it.<a class="code" href="a02546.html#aab221a373111c4be685444b5633e22a5">page_res</a>-><a class="code" href="a02530.html#a6341c86ed5c02252716d5d902fc42862">rej_count</a> = 0;</div><div class="line"><a name="l00206"></a><span class="lineno"> 206</span>  current_block = <span class="keyword">nullptr</span>;</div><div class="line"><a name="l00207"></a><span class="lineno"> 207</span>  current_row = <span class="keyword">nullptr</span>;</div><div class="line"><a name="l00208"></a><span class="lineno"> 208</span>  <span class="keywordflow">while</span> (page_res_it.<a class="code" href="a02546.html#a6cdcdaa4b0b1250ab7e14760d4b5f113">word</a> () != <span class="keyword">nullptr</span>) {</div><div class="line"><a name="l00209"></a><span class="lineno"> 209</span>  <span class="keywordflow">if</span> (current_block != page_res_it.<a class="code" href="a02546.html#a997c382ddd2cf2f539532a1d91780963">block</a> ()) {</div><div class="line"><a name="l00210"></a><span class="lineno"> 210</span>  current_block = page_res_it.<a class="code" href="a02546.html#a997c382ddd2cf2f539532a1d91780963">block</a> ();</div><div class="line"><a name="l00211"></a><span class="lineno"> 211</span>  current_block-><a class="code" href="a02534.html#abdeb810e73f050c499a90c74b3891af3">char_count</a> = 0;</div><div class="line"><a name="l00212"></a><span class="lineno"> 212</span>  current_block-><a class="code" href="a02534.html#a441fdfc65ad274a7490eb17c87c24a77">rej_count</a> = 0;</div><div class="line"><a name="l00213"></a><span class="lineno"> 213</span>  }</div><div class="line"><a name="l00214"></a><span class="lineno"> 214</span>  <span class="keywordflow">if</span> (current_row != page_res_it.<a class="code" href="a02546.html#a2038f4bd5c4c0eac4dba7f1d6bcdb5bf">row</a> ()) {</div><div class="line"><a name="l00215"></a><span class="lineno"> 215</span>  current_row = page_res_it.<a class="code" href="a02546.html#a2038f4bd5c4c0eac4dba7f1d6bcdb5bf">row</a> ();</div><div class="line"><a name="l00216"></a><span class="lineno"> 216</span>  current_row-><a class="code" href="a02538.html#afca7c9bf18393a8a1a6a2f8648d250c4">char_count</a> = 0;</div><div class="line"><a name="l00217"></a><span class="lineno"> 217</span>  current_row-><a class="code" href="a02538.html#a51d1ba1dfd848e692d39bf08f4e53042">rej_count</a> = 0;</div><div class="line"><a name="l00218"></a><span class="lineno"> 218</span>  current_row-><a class="code" href="a02538.html#a17e4e343e45d964a85995f998fb6b717">whole_word_rej_count</a> = 0;</div><div class="line"><a name="l00219"></a><span class="lineno"> 219</span>  }</div><div class="line"><a name="l00220"></a><span class="lineno"> 220</span>  page_res_it.<a class="code" href="a02546.html#a1d1af03a63da4b7f551770e07ca86414">rej_stat_word</a> ();</div><div class="line"><a name="l00221"></a><span class="lineno"> 221</span>  page_res_it.<a class="code" href="a02546.html#ab29005f235cc738eebafb7d9ed6fe70b">forward</a> ();</div><div class="line"><a name="l00222"></a><span class="lineno"> 222</span>  }</div><div class="line"><a name="l00223"></a><span class="lineno"> 223</span> }</div><div class="line"><a name="l00224"></a><span class="lineno"> 224</span> </div><div class="line"><a name="l00225"></a><span class="lineno"> 225</span> </div><div class="line"><a name="l00226"></a><span class="lineno"> 226</span> <span class="comment">/*************************************************************************</span></div><div class="line"><a name="l00227"></a><span class="lineno"> 227</span> <span class="comment"> * doc_and_block_rejection()</span></div><div class="line"><a name="l00228"></a><span class="lineno"> 228</span> <span class="comment"> *</span></div><div class="line"><a name="l00229"></a><span class="lineno"> 229</span> <span class="comment"> * If the page has too many rejects - reject all of it.</span></div><div class="line"><a name="l00230"></a><span class="lineno"> 230</span> <span class="comment"> * If any block has too many rejects - reject all words in the block</span></div><div class="line"><a name="l00231"></a><span class="lineno"> 231</span> <span class="comment"> *************************************************************************/</span></div><div class="line"><a name="l00232"></a><span class="lineno"> 232</span> </div><div class="line"><a name="l00233"></a><span class="lineno"><a class="line" href="a02358.html#a3528122ae883323b4d2a57870d9ddd7b"> 233</a></span> <span class="keywordtype">void</span> <a class="code" href="a02358.html#a3528122ae883323b4d2a57870d9ddd7b">Tesseract::doc_and_block_rejection</a>( <span class="comment">//reject big chunks</span></div><div class="line"><a name="l00234"></a><span class="lineno"> 234</span>  <a class="code" href="a02546.html">PAGE_RES_IT</a> &page_res_it,</div><div class="line"><a name="l00235"></a><span class="lineno"> 235</span>  <span class="keywordtype">bool</span> good_quality_doc) {</div><div class="line"><a name="l00236"></a><span class="lineno"> 236</span>  int16_t block_no = 0;</div><div class="line"><a name="l00237"></a><span class="lineno"> 237</span>  int16_t row_no = 0;</div><div class="line"><a name="l00238"></a><span class="lineno"> 238</span>  <a class="code" href="a02534.html">BLOCK_RES</a> *current_block;</div><div class="line"><a name="l00239"></a><span class="lineno"> 239</span>  <a class="code" href="a02538.html">ROW_RES</a> *current_row;</div><div class="line"><a name="l00240"></a><span class="lineno"> 240</span> </div><div class="line"><a name="l00241"></a><span class="lineno"> 241</span>  <span class="keywordtype">bool</span> rej_word;</div><div class="line"><a name="l00242"></a><span class="lineno"> 242</span>  <span class="keywordtype">bool</span> prev_word_rejected;</div><div class="line"><a name="l00243"></a><span class="lineno"> 243</span>  int16_t char_quality = 0;</div><div class="line"><a name="l00244"></a><span class="lineno"> 244</span>  int16_t accepted_char_quality;</div><div class="line"><a name="l00245"></a><span class="lineno"> 245</span> </div><div class="line"><a name="l00246"></a><span class="lineno"> 246</span>  <span class="keywordflow">if</span> (page_res_it.<a class="code" href="a02546.html#aab221a373111c4be685444b5633e22a5">page_res</a>-><a class="code" href="a02530.html#a6341c86ed5c02252716d5d902fc42862">rej_count</a> * 100.0 /</div><div class="line"><a name="l00247"></a><span class="lineno"> 247</span>  page_res_it.<a class="code" href="a02546.html#aab221a373111c4be685444b5633e22a5">page_res</a>-><a class="code" href="a02530.html#ad89f8ec4b63b4650cd9c35eb1eb82ca7">char_count</a> > <a class="code" href="a02358.html#a0c689f16fb64963ca30f7b0fddbea414">tessedit_reject_doc_percent</a>) {</div><div class="line"><a name="l00248"></a><span class="lineno"> 248</span>  <a class="code" href="a00077.html#a1b9934928e2b953ee5e91abb58cf043f">reject_whole_page</a>(page_res_it);</div><div class="line"><a name="l00249"></a><span class="lineno"> 249</span>  <span class="keywordflow">if</span> (<a class="code" href="a02358.html#a9771a56b87e31325c043fa195d6885ec">tessedit_debug_doc_rejection</a>) {</div><div class="line"><a name="l00250"></a><span class="lineno"> 250</span>  <a class="code" href="a00596.html#a0c2bcd4462ec67ab0971b34a0f610f55">tprintf</a>(<span class="stringliteral">"REJECT ALL #chars: %d #Rejects: %d; \n"</span>,</div><div class="line"><a name="l00251"></a><span class="lineno"> 251</span>  page_res_it.<a class="code" href="a02546.html#aab221a373111c4be685444b5633e22a5">page_res</a>-><a class="code" href="a02530.html#ad89f8ec4b63b4650cd9c35eb1eb82ca7">char_count</a>,</div><div class="line"><a name="l00252"></a><span class="lineno"> 252</span>  page_res_it.<a class="code" href="a02546.html#aab221a373111c4be685444b5633e22a5">page_res</a>-><a class="code" href="a02530.html#a6341c86ed5c02252716d5d902fc42862">rej_count</a>);</div><div class="line"><a name="l00253"></a><span class="lineno"> 253</span>  }</div><div class="line"><a name="l00254"></a><span class="lineno"> 254</span>  } <span class="keywordflow">else</span> {</div><div class="line"><a name="l00255"></a><span class="lineno"> 255</span>  <span class="keywordflow">if</span> (<a class="code" href="a02358.html#a9771a56b87e31325c043fa195d6885ec">tessedit_debug_doc_rejection</a>) {</div><div class="line"><a name="l00256"></a><span class="lineno"> 256</span>  <a class="code" href="a00596.html#a0c2bcd4462ec67ab0971b34a0f610f55">tprintf</a>(<span class="stringliteral">"NO PAGE REJECTION #chars: %d # Rejects: %d; \n"</span>,</div><div class="line"><a name="l00257"></a><span class="lineno"> 257</span>  page_res_it.<a class="code" href="a02546.html#aab221a373111c4be685444b5633e22a5">page_res</a>-><a class="code" href="a02530.html#ad89f8ec4b63b4650cd9c35eb1eb82ca7">char_count</a>,</div><div class="line"><a name="l00258"></a><span class="lineno"> 258</span>  page_res_it.<a class="code" href="a02546.html#aab221a373111c4be685444b5633e22a5">page_res</a>-><a class="code" href="a02530.html#a6341c86ed5c02252716d5d902fc42862">rej_count</a>);</div><div class="line"><a name="l00259"></a><span class="lineno"> 259</span>  }</div><div class="line"><a name="l00260"></a><span class="lineno"> 260</span> </div><div class="line"><a name="l00261"></a><span class="lineno"> 261</span>  <span class="comment">/* Walk blocks testing for block rejection */</span></div><div class="line"><a name="l00262"></a><span class="lineno"> 262</span> </div><div class="line"><a name="l00263"></a><span class="lineno"> 263</span>  page_res_it.<a class="code" href="a02546.html#a15febd45d0904bb3c5f7d506368177f0">restart_page</a>();</div><div class="line"><a name="l00264"></a><span class="lineno"> 264</span>  <a class="code" href="a02542.html">WERD_RES</a>* word;</div><div class="line"><a name="l00265"></a><span class="lineno"> 265</span>  <span class="keywordflow">while</span> ((word = page_res_it.<a class="code" href="a02546.html#a6cdcdaa4b0b1250ab7e14760d4b5f113">word</a>()) != <span class="keyword">nullptr</span>) {</div><div class="line"><a name="l00266"></a><span class="lineno"> 266</span>  current_block = page_res_it.<a class="code" href="a02546.html#a997c382ddd2cf2f539532a1d91780963">block</a>();</div><div class="line"><a name="l00267"></a><span class="lineno"> 267</span>  block_no = current_block-><a class="code" href="a02534.html#ae7c240d4878247ebdfe78433446751bf">block</a>-><a class="code" href="a02514.html#a9e4346e037f2cc01c3c51d888531da74">pdblk</a>.<a class="code" href="a02558.html#a6a88fdbd4c9b9c23e17181202575d106">index</a>();</div><div class="line"><a name="l00268"></a><span class="lineno"> 268</span>  <span class="keywordflow">if</span> (current_block-><a class="code" href="a02534.html#abdeb810e73f050c499a90c74b3891af3">char_count</a> > 0 &&</div><div class="line"><a name="l00269"></a><span class="lineno"> 269</span>  (current_block-><a class="code" href="a02534.html#a441fdfc65ad274a7490eb17c87c24a77">rej_count</a> * 100.0 / current_block-><a class="code" href="a02534.html#abdeb810e73f050c499a90c74b3891af3">char_count</a>) ></div><div class="line"><a name="l00270"></a><span class="lineno"> 270</span>  <a class="code" href="a02358.html#ae1f650e4873b5842f2ae57a3055868c9">tessedit_reject_block_percent</a>) {</div><div class="line"><a name="l00271"></a><span class="lineno"> 271</span>  <span class="keywordflow">if</span> (<a class="code" href="a02358.html#afe2ceb83896ec93f0add94703dee79ce">tessedit_debug_block_rejection</a>) {</div><div class="line"><a name="l00272"></a><span class="lineno"> 272</span>  <a class="code" href="a00596.html#a0c2bcd4462ec67ab0971b34a0f610f55">tprintf</a>(<span class="stringliteral">"REJECTING BLOCK %d #chars: %d; #Rejects: %d\n"</span>,</div><div class="line"><a name="l00273"></a><span class="lineno"> 273</span>  block_no, current_block-><a class="code" href="a02534.html#abdeb810e73f050c499a90c74b3891af3">char_count</a>,</div><div class="line"><a name="l00274"></a><span class="lineno"> 274</span>  current_block-><a class="code" href="a02534.html#a441fdfc65ad274a7490eb17c87c24a77">rej_count</a>);</div><div class="line"><a name="l00275"></a><span class="lineno"> 275</span>  }</div><div class="line"><a name="l00276"></a><span class="lineno"> 276</span>  prev_word_rejected = <span class="keyword">false</span>;</div><div class="line"><a name="l00277"></a><span class="lineno"> 277</span>  <span class="keywordflow">while</span> ((word = page_res_it.<a class="code" href="a02546.html#a6cdcdaa4b0b1250ab7e14760d4b5f113">word</a>()) != <span class="keyword">nullptr</span> &&</div><div class="line"><a name="l00278"></a><span class="lineno"> 278</span>  (page_res_it.<a class="code" href="a02546.html#a997c382ddd2cf2f539532a1d91780963">block</a>() == current_block)) {</div><div class="line"><a name="l00279"></a><span class="lineno"> 279</span>  <span class="keywordflow">if</span> (<a class="code" href="a02358.html#acf0428aa8b6b2390e5ba2c5f185b7f49">tessedit_preserve_blk_rej_perfect_wds</a>) {</div><div class="line"><a name="l00280"></a><span class="lineno"> 280</span>  rej_word = word-><a class="code" href="a02542.html#ae24eb58be06cf275aee411d947fd31ef">reject_map</a>.<a class="code" href="a02618.html#a2ddec73fd1a7288568496353d75a00e8">reject_count</a>() > 0 ||</div><div class="line"><a name="l00281"></a><span class="lineno"> 281</span>  word-><a class="code" href="a02542.html#ae24eb58be06cf275aee411d947fd31ef">reject_map</a>.<a class="code" href="a02618.html#adb462d55dc4b682e0a77090185a58011">length</a> () < <a class="code" href="a02358.html#a98362ec97923314723dbeb56fd2528fd">tessedit_preserve_min_wd_len</a>;</div><div class="line"><a name="l00282"></a><span class="lineno"> 282</span>  <span class="keywordflow">if</span> (rej_word && <a class="code" href="a02358.html#a00cc24fc46a2c217ff7e614f4ac0db39">tessedit_dont_blkrej_good_wds</a> &&</div><div class="line"><a name="l00283"></a><span class="lineno"> 283</span>  word-><a class="code" href="a02542.html#ae24eb58be06cf275aee411d947fd31ef">reject_map</a>.<a class="code" href="a02618.html#adb462d55dc4b682e0a77090185a58011">length</a>() >= <a class="code" href="a02358.html#a98362ec97923314723dbeb56fd2528fd">tessedit_preserve_min_wd_len</a> &&</div><div class="line"><a name="l00284"></a><span class="lineno"> 284</span>  <a class="code" href="a02358.html#a51f2ad8b2d849d90bbcfbfca3067c0f1">acceptable_word_string</a>(</div><div class="line"><a name="l00285"></a><span class="lineno"> 285</span>  *word-><a class="code" href="a02542.html#a053a2aeeddc26a93a41a04fa08dd688a">uch_set</a>,</div><div class="line"><a name="l00286"></a><span class="lineno"> 286</span>  word-><a class="code" href="a02542.html#a3d42ac7ec121263e757c9b7160dfd50d">best_choice</a>-><a class="code" href="a02606.html#adf200132afabc2ee6ec256e516011007">unichar_string</a>().<a class="code" href="a02834.html#abf0a7b3c6ae39a46e5441f28f61de5de">string</a>(),</div><div class="line"><a name="l00287"></a><span class="lineno"> 287</span>  word-><a class="code" href="a02542.html#a3d42ac7ec121263e757c9b7160dfd50d">best_choice</a>-><a class="code" href="a02606.html#adaecd80cfe44e00e9c4647859b1c87e0">unichar_lengths</a>().<a class="code" href="a02834.html#abf0a7b3c6ae39a46e5441f28f61de5de">string</a>()) !=</div><div class="line"><a name="l00288"></a><span class="lineno"> 288</span>  <a class="code" href="a00074.html#af9ff5a7d7a1b9eeea7ce4106bffa7eeeaab0741a5a5ff9757ca343af255353ba0">AC_UNACCEPTABLE</a>) {</div><div class="line"><a name="l00289"></a><span class="lineno"> 289</span>  <a class="code" href="a02358.html#a99a1e1a4cd1134ecab8028de820ae57a">word_char_quality</a>(word, page_res_it.<a class="code" href="a02546.html#a2038f4bd5c4c0eac4dba7f1d6bcdb5bf">row</a>()-><a class="code" href="a02538.html#ad3a856f3e9217c47b8f2f54cd3908721">row</a>,</div><div class="line"><a name="l00290"></a><span class="lineno"> 290</span>  &char_quality,</div><div class="line"><a name="l00291"></a><span class="lineno"> 291</span>  &accepted_char_quality);</div><div class="line"><a name="l00292"></a><span class="lineno"> 292</span>  rej_word = char_quality != word-><a class="code" href="a02542.html#ae24eb58be06cf275aee411d947fd31ef">reject_map</a>.<a class="code" href="a02618.html#adb462d55dc4b682e0a77090185a58011">length</a>();</div><div class="line"><a name="l00293"></a><span class="lineno"> 293</span>  }</div><div class="line"><a name="l00294"></a><span class="lineno"> 294</span>  } <span class="keywordflow">else</span> {</div><div class="line"><a name="l00295"></a><span class="lineno"> 295</span>  rej_word = <span class="keyword">true</span>;</div><div class="line"><a name="l00296"></a><span class="lineno"> 296</span>  }</div><div class="line"><a name="l00297"></a><span class="lineno"> 297</span>  <span class="keywordflow">if</span> (rej_word) {</div><div class="line"><a name="l00298"></a><span class="lineno"> 298</span>  <span class="comment">/*</span></div><div class="line"><a name="l00299"></a><span class="lineno"> 299</span> <span class="comment"> Reject spacing if both current and prev words are rejected.</span></div><div class="line"><a name="l00300"></a><span class="lineno"> 300</span> <span class="comment"> NOTE - this is NOT restricted to FUZZY spaces. - When tried this</span></div><div class="line"><a name="l00301"></a><span class="lineno"> 301</span> <span class="comment"> generated more space errors.</span></div><div class="line"><a name="l00302"></a><span class="lineno"> 302</span> <span class="comment"> */</span></div><div class="line"><a name="l00303"></a><span class="lineno"> 303</span>  <span class="keywordflow">if</span> (<a class="code" href="a02358.html#aad38132f39f060b3bf998f316abb4d76">tessedit_use_reject_spaces</a> &&</div><div class="line"><a name="l00304"></a><span class="lineno"> 304</span>  prev_word_rejected &&</div><div class="line"><a name="l00305"></a><span class="lineno"> 305</span>  page_res_it.<a class="code" href="a02546.html#a32f7ecd54106290053205cc118395d8d">prev_row</a>() == page_res_it.<a class="code" href="a02546.html#a2038f4bd5c4c0eac4dba7f1d6bcdb5bf">row</a>() &&</div><div class="line"><a name="l00306"></a><span class="lineno"> 306</span>  word-><a class="code" href="a02542.html#afc15fa7c1b5ad55d6772dea0d6865df1">word</a>-><a class="code" href="a02638.html#a43b4c52165d4b7fd811eb653c2aa9d8e">space</a>() == 1)</div><div class="line"><a name="l00307"></a><span class="lineno"> 307</span>  word-><a class="code" href="a02542.html#a9cc40e9e6308d5483012acd05ec9f217">reject_spaces</a> = <span class="keyword">true</span>;</div><div class="line"><a name="l00308"></a><span class="lineno"> 308</span>  word-><a class="code" href="a02542.html#ae24eb58be06cf275aee411d947fd31ef">reject_map</a>.<a class="code" href="a02618.html#aa86752e4e9277f2a616df08459ea08e3">rej_word_block_rej</a>();</div><div class="line"><a name="l00309"></a><span class="lineno"> 309</span>  }</div><div class="line"><a name="l00310"></a><span class="lineno"> 310</span>  prev_word_rejected = rej_word;</div><div class="line"><a name="l00311"></a><span class="lineno"> 311</span>  page_res_it.<a class="code" href="a02546.html#ab29005f235cc738eebafb7d9ed6fe70b">forward</a>();</div><div class="line"><a name="l00312"></a><span class="lineno"> 312</span>  }</div><div class="line"><a name="l00313"></a><span class="lineno"> 313</span>  } <span class="keywordflow">else</span> {</div><div class="line"><a name="l00314"></a><span class="lineno"> 314</span>  <span class="keywordflow">if</span> (<a class="code" href="a02358.html#afe2ceb83896ec93f0add94703dee79ce">tessedit_debug_block_rejection</a>) {</div><div class="line"><a name="l00315"></a><span class="lineno"> 315</span>  <a class="code" href="a00596.html#a0c2bcd4462ec67ab0971b34a0f610f55">tprintf</a>(<span class="stringliteral">"NOT REJECTING BLOCK %d #chars: %d # Rejects: %d; \n"</span>,</div><div class="line"><a name="l00316"></a><span class="lineno"> 316</span>  block_no, page_res_it.<a class="code" href="a02546.html#a997c382ddd2cf2f539532a1d91780963">block</a>()-><a class="code" href="a02534.html#abdeb810e73f050c499a90c74b3891af3">char_count</a>,</div><div class="line"><a name="l00317"></a><span class="lineno"> 317</span>  page_res_it.<a class="code" href="a02546.html#a997c382ddd2cf2f539532a1d91780963">block</a>()-><a class="code" href="a02534.html#a441fdfc65ad274a7490eb17c87c24a77">rej_count</a>);</div><div class="line"><a name="l00318"></a><span class="lineno"> 318</span>  }</div><div class="line"><a name="l00319"></a><span class="lineno"> 319</span> </div><div class="line"><a name="l00320"></a><span class="lineno"> 320</span>  <span class="comment">/* Walk rows in block testing for row rejection */</span></div><div class="line"><a name="l00321"></a><span class="lineno"> 321</span>  row_no = 0;</div><div class="line"><a name="l00322"></a><span class="lineno"> 322</span>  <span class="keywordflow">while</span> (page_res_it.<a class="code" href="a02546.html#a6cdcdaa4b0b1250ab7e14760d4b5f113">word</a>() != <span class="keyword">nullptr</span> &&</div><div class="line"><a name="l00323"></a><span class="lineno"> 323</span>  page_res_it.<a class="code" href="a02546.html#a997c382ddd2cf2f539532a1d91780963">block</a>() == current_block) {</div><div class="line"><a name="l00324"></a><span class="lineno"> 324</span>  current_row = page_res_it.<a class="code" href="a02546.html#a2038f4bd5c4c0eac4dba7f1d6bcdb5bf">row</a>();</div><div class="line"><a name="l00325"></a><span class="lineno"> 325</span>  row_no++;</div><div class="line"><a name="l00326"></a><span class="lineno"> 326</span>  <span class="comment">/* Reject whole row if:</span></div><div class="line"><a name="l00327"></a><span class="lineno"> 327</span> <span class="comment"> fraction of chars on row which are rejected exceed a limit AND</span></div><div class="line"><a name="l00328"></a><span class="lineno"> 328</span> <span class="comment"> fraction rejects which occur in WHOLE WERD rejects is LESS THAN a</span></div><div class="line"><a name="l00329"></a><span class="lineno"> 329</span> <span class="comment"> limit</span></div><div class="line"><a name="l00330"></a><span class="lineno"> 330</span> <span class="comment"> */</span></div><div class="line"><a name="l00331"></a><span class="lineno"> 331</span>  <span class="keywordflow">if</span> (current_row-><a class="code" href="a02538.html#afca7c9bf18393a8a1a6a2f8648d250c4">char_count</a> > 0 &&</div><div class="line"><a name="l00332"></a><span class="lineno"> 332</span>  (current_row-><a class="code" href="a02538.html#a51d1ba1dfd848e692d39bf08f4e53042">rej_count</a> * 100.0 / current_row-><a class="code" href="a02538.html#afca7c9bf18393a8a1a6a2f8648d250c4">char_count</a>) ></div><div class="line"><a name="l00333"></a><span class="lineno"> 333</span>  <a class="code" href="a02358.html#a73cfd99b1d3cd76679efa1a19a4e1d1a">tessedit_reject_row_percent</a> &&</div><div class="line"><a name="l00334"></a><span class="lineno"> 334</span>  (current_row-><a class="code" href="a02538.html#a17e4e343e45d964a85995f998fb6b717">whole_word_rej_count</a> * 100.0 /</div><div class="line"><a name="l00335"></a><span class="lineno"> 335</span>  current_row-><a class="code" href="a02538.html#a51d1ba1dfd848e692d39bf08f4e53042">rej_count</a>) <</div><div class="line"><a name="l00336"></a><span class="lineno"> 336</span>  <a class="code" href="a02358.html#a7124d6d656fc163de05f88b6e31e9681">tessedit_whole_wd_rej_row_percent</a>) {</div><div class="line"><a name="l00337"></a><span class="lineno"> 337</span>  <span class="keywordflow">if</span> (<a class="code" href="a02358.html#afe2ceb83896ec93f0add94703dee79ce">tessedit_debug_block_rejection</a>) {</div><div class="line"><a name="l00338"></a><span class="lineno"> 338</span>  <a class="code" href="a00596.html#a0c2bcd4462ec67ab0971b34a0f610f55">tprintf</a>(<span class="stringliteral">"REJECTING ROW %d #chars: %d; #Rejects: %d\n"</span>,</div><div class="line"><a name="l00339"></a><span class="lineno"> 339</span>  row_no, current_row-><a class="code" href="a02538.html#afca7c9bf18393a8a1a6a2f8648d250c4">char_count</a>,</div><div class="line"><a name="l00340"></a><span class="lineno"> 340</span>  current_row-><a class="code" href="a02538.html#a51d1ba1dfd848e692d39bf08f4e53042">rej_count</a>);</div><div class="line"><a name="l00341"></a><span class="lineno"> 341</span>  }</div><div class="line"><a name="l00342"></a><span class="lineno"> 342</span>  prev_word_rejected = <span class="keyword">false</span>;</div><div class="line"><a name="l00343"></a><span class="lineno"> 343</span>  <span class="keywordflow">while</span> ((word = page_res_it.<a class="code" href="a02546.html#a6cdcdaa4b0b1250ab7e14760d4b5f113">word</a>()) != <span class="keyword">nullptr</span> &&</div><div class="line"><a name="l00344"></a><span class="lineno"> 344</span>  page_res_it.<a class="code" href="a02546.html#a2038f4bd5c4c0eac4dba7f1d6bcdb5bf">row</a> () == current_row) {</div><div class="line"><a name="l00345"></a><span class="lineno"> 345</span>  <span class="comment">/* Preserve words on good docs unless they are mostly rejected*/</span></div><div class="line"><a name="l00346"></a><span class="lineno"> 346</span>  <span class="keywordflow">if</span> (!<a class="code" href="a02358.html#ade40da20d4ed20ac262fb25b50757623">tessedit_row_rej_good_docs</a> && good_quality_doc) {</div><div class="line"><a name="l00347"></a><span class="lineno"> 347</span>  rej_word = word-><a class="code" href="a02542.html#ae24eb58be06cf275aee411d947fd31ef">reject_map</a>.<a class="code" href="a02618.html#a2ddec73fd1a7288568496353d75a00e8">reject_count</a>() /</div><div class="line"><a name="l00348"></a><span class="lineno"> 348</span>  <span class="keyword">static_cast<</span><span class="keywordtype">float</span><span class="keyword">></span>(word-><a class="code" href="a02542.html#ae24eb58be06cf275aee411d947fd31ef">reject_map</a>.<a class="code" href="a02618.html#adb462d55dc4b682e0a77090185a58011">length</a>()) ></div><div class="line"><a name="l00349"></a><span class="lineno"> 349</span>  <a class="code" href="a02358.html#afe905eb6b5f607815ccff87755af5d30">tessedit_good_doc_still_rowrej_wd</a>;</div><div class="line"><a name="l00350"></a><span class="lineno"> 350</span>  } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="a02358.html#a1ac173c27cc204ef8efa50dc7476296a">tessedit_preserve_row_rej_perfect_wds</a>) {</div><div class="line"><a name="l00351"></a><span class="lineno"> 351</span>  <span class="comment">/* Preserve perfect words anyway */</span></div><div class="line"><a name="l00352"></a><span class="lineno"> 352</span>  rej_word = word-><a class="code" href="a02542.html#ae24eb58be06cf275aee411d947fd31ef">reject_map</a>.<a class="code" href="a02618.html#a2ddec73fd1a7288568496353d75a00e8">reject_count</a>() > 0 ||</div><div class="line"><a name="l00353"></a><span class="lineno"> 353</span>  word-><a class="code" href="a02542.html#ae24eb58be06cf275aee411d947fd31ef">reject_map</a>.<a class="code" href="a02618.html#adb462d55dc4b682e0a77090185a58011">length</a> () < <a class="code" href="a02358.html#a98362ec97923314723dbeb56fd2528fd">tessedit_preserve_min_wd_len</a>;</div><div class="line"><a name="l00354"></a><span class="lineno"> 354</span>  <span class="keywordflow">if</span> (rej_word && <a class="code" href="a02358.html#a1ede84f4a4f39a9b6f5376ea36907b98">tessedit_dont_rowrej_good_wds</a> &&</div><div class="line"><a name="l00355"></a><span class="lineno"> 355</span>  word-><a class="code" href="a02542.html#ae24eb58be06cf275aee411d947fd31ef">reject_map</a>.<a class="code" href="a02618.html#adb462d55dc4b682e0a77090185a58011">length</a>() >= <a class="code" href="a02358.html#a98362ec97923314723dbeb56fd2528fd">tessedit_preserve_min_wd_len</a> &&</div><div class="line"><a name="l00356"></a><span class="lineno"> 356</span>  <a class="code" href="a02358.html#a51f2ad8b2d849d90bbcfbfca3067c0f1">acceptable_word_string</a>(*word-><a class="code" href="a02542.html#a053a2aeeddc26a93a41a04fa08dd688a">uch_set</a>,</div><div class="line"><a name="l00357"></a><span class="lineno"> 357</span>  word-><a class="code" href="a02542.html#a3d42ac7ec121263e757c9b7160dfd50d">best_choice</a>-><a class="code" href="a02606.html#adf200132afabc2ee6ec256e516011007">unichar_string</a>().<a class="code" href="a02834.html#abf0a7b3c6ae39a46e5441f28f61de5de">string</a>(),</div><div class="line"><a name="l00358"></a><span class="lineno"> 358</span>  word-><a class="code" href="a02542.html#a3d42ac7ec121263e757c9b7160dfd50d">best_choice</a>-><a class="code" href="a02606.html#adaecd80cfe44e00e9c4647859b1c87e0">unichar_lengths</a>().<a class="code" href="a02834.html#abf0a7b3c6ae39a46e5441f28f61de5de">string</a>()) !=</div><div class="line"><a name="l00359"></a><span class="lineno"> 359</span>  <a class="code" href="a00074.html#af9ff5a7d7a1b9eeea7ce4106bffa7eeeaab0741a5a5ff9757ca343af255353ba0">AC_UNACCEPTABLE</a>) {</div><div class="line"><a name="l00360"></a><span class="lineno"> 360</span>  <a class="code" href="a02358.html#a99a1e1a4cd1134ecab8028de820ae57a">word_char_quality</a>(word, page_res_it.<a class="code" href="a02546.html#a2038f4bd5c4c0eac4dba7f1d6bcdb5bf">row</a>()-><a class="code" href="a02538.html#ad3a856f3e9217c47b8f2f54cd3908721">row</a>,</div><div class="line"><a name="l00361"></a><span class="lineno"> 361</span>  &char_quality,</div><div class="line"><a name="l00362"></a><span class="lineno"> 362</span>  &accepted_char_quality);</div><div class="line"><a name="l00363"></a><span class="lineno"> 363</span>  rej_word = char_quality != word-><a class="code" href="a02542.html#ae24eb58be06cf275aee411d947fd31ef">reject_map</a>.<a class="code" href="a02618.html#adb462d55dc4b682e0a77090185a58011">length</a>();</div><div class="line"><a name="l00364"></a><span class="lineno"> 364</span>  }</div><div class="line"><a name="l00365"></a><span class="lineno"> 365</span>  } <span class="keywordflow">else</span> {</div><div class="line"><a name="l00366"></a><span class="lineno"> 366</span>  rej_word = <span class="keyword">true</span>;</div><div class="line"><a name="l00367"></a><span class="lineno"> 367</span>  }</div><div class="line"><a name="l00368"></a><span class="lineno"> 368</span>  <span class="keywordflow">if</span> (rej_word) {</div><div class="line"><a name="l00369"></a><span class="lineno"> 369</span>  <span class="comment">/*</span></div><div class="line"><a name="l00370"></a><span class="lineno"> 370</span> <span class="comment"> Reject spacing if both current and prev words are rejected.</span></div><div class="line"><a name="l00371"></a><span class="lineno"> 371</span> <span class="comment"> NOTE - this is NOT restricted to FUZZY spaces. - When tried</span></div><div class="line"><a name="l00372"></a><span class="lineno"> 372</span> <span class="comment"> this generated more space errors.</span></div><div class="line"><a name="l00373"></a><span class="lineno"> 373</span> <span class="comment"> */</span></div><div class="line"><a name="l00374"></a><span class="lineno"> 374</span>  <span class="keywordflow">if</span> (<a class="code" href="a02358.html#aad38132f39f060b3bf998f316abb4d76">tessedit_use_reject_spaces</a> &&</div><div class="line"><a name="l00375"></a><span class="lineno"> 375</span>  prev_word_rejected &&</div><div class="line"><a name="l00376"></a><span class="lineno"> 376</span>  page_res_it.<a class="code" href="a02546.html#a32f7ecd54106290053205cc118395d8d">prev_row</a>() == page_res_it.<a class="code" href="a02546.html#a2038f4bd5c4c0eac4dba7f1d6bcdb5bf">row</a>() &&</div><div class="line"><a name="l00377"></a><span class="lineno"> 377</span>  word-><a class="code" href="a02542.html#afc15fa7c1b5ad55d6772dea0d6865df1">word</a>-><a class="code" href="a02638.html#a43b4c52165d4b7fd811eb653c2aa9d8e">space</a> () == 1)</div><div class="line"><a name="l00378"></a><span class="lineno"> 378</span>  word-><a class="code" href="a02542.html#a9cc40e9e6308d5483012acd05ec9f217">reject_spaces</a> = <span class="keyword">true</span>;</div><div class="line"><a name="l00379"></a><span class="lineno"> 379</span>  word-><a class="code" href="a02542.html#ae24eb58be06cf275aee411d947fd31ef">reject_map</a>.<a class="code" href="a02618.html#a03037d4a12a4ea33a377cf21c9400139">rej_word_row_rej</a>();</div><div class="line"><a name="l00380"></a><span class="lineno"> 380</span>  }</div><div class="line"><a name="l00381"></a><span class="lineno"> 381</span>  prev_word_rejected = rej_word;</div><div class="line"><a name="l00382"></a><span class="lineno"> 382</span>  page_res_it.<a class="code" href="a02546.html#ab29005f235cc738eebafb7d9ed6fe70b">forward</a>();</div><div class="line"><a name="l00383"></a><span class="lineno"> 383</span>  }</div><div class="line"><a name="l00384"></a><span class="lineno"> 384</span>  } <span class="keywordflow">else</span> {</div><div class="line"><a name="l00385"></a><span class="lineno"> 385</span>  <span class="keywordflow">if</span> (<a class="code" href="a02358.html#afe2ceb83896ec93f0add94703dee79ce">tessedit_debug_block_rejection</a>) {</div><div class="line"><a name="l00386"></a><span class="lineno"> 386</span>  <a class="code" href="a00596.html#a0c2bcd4462ec67ab0971b34a0f610f55">tprintf</a>(<span class="stringliteral">"NOT REJECTING ROW %d #chars: %d # Rejects: %d; \n"</span>,</div><div class="line"><a name="l00387"></a><span class="lineno"> 387</span>  row_no, current_row-><a class="code" href="a02538.html#afca7c9bf18393a8a1a6a2f8648d250c4">char_count</a>, current_row-><a class="code" href="a02538.html#a51d1ba1dfd848e692d39bf08f4e53042">rej_count</a>);</div><div class="line"><a name="l00388"></a><span class="lineno"> 388</span>  }</div><div class="line"><a name="l00389"></a><span class="lineno"> 389</span>  <span class="keywordflow">while</span> (page_res_it.<a class="code" href="a02546.html#a6cdcdaa4b0b1250ab7e14760d4b5f113">word</a>() != <span class="keyword">nullptr</span> &&</div><div class="line"><a name="l00390"></a><span class="lineno"> 390</span>  page_res_it.<a class="code" href="a02546.html#a2038f4bd5c4c0eac4dba7f1d6bcdb5bf">row</a>() == current_row)</div><div class="line"><a name="l00391"></a><span class="lineno"> 391</span>  page_res_it.<a class="code" href="a02546.html#ab29005f235cc738eebafb7d9ed6fe70b">forward</a>();</div><div class="line"><a name="l00392"></a><span class="lineno"> 392</span>  }</div><div class="line"><a name="l00393"></a><span class="lineno"> 393</span>  }</div><div class="line"><a name="l00394"></a><span class="lineno"> 394</span>  }</div><div class="line"><a name="l00395"></a><span class="lineno"> 395</span>  }</div><div class="line"><a name="l00396"></a><span class="lineno"> 396</span>  }</div><div class="line"><a name="l00397"></a><span class="lineno"> 397</span> }</div><div class="line"><a name="l00398"></a><span class="lineno"> 398</span> </div><div class="line"><a name="l00399"></a><span class="lineno"> 399</span> } <span class="comment">// namespace tesseract</span></div><div class="line"><a name="l00400"></a><span class="lineno"> 400</span> </div><div class="line"><a name="l00401"></a><span class="lineno"> 401</span> <span class="comment">/*************************************************************************</span></div><div class="line"><a name="l00402"></a><span class="lineno"> 402</span> <span class="comment"> * reject_whole_page()</span></div><div class="line"><a name="l00403"></a><span class="lineno"> 403</span> <span class="comment"> * Don't believe any of it - set the reject map to 00..00 in all words</span></div><div class="line"><a name="l00404"></a><span class="lineno"> 404</span> <span class="comment"> *</span></div><div class="line"><a name="l00405"></a><span class="lineno"> 405</span> <span class="comment"> *************************************************************************/</span></div><div class="line"><a name="l00406"></a><span class="lineno"> 406</span> </div><div class="line"><a name="l00407"></a><span class="lineno"><a class="line" href="a00080.html#a1b9934928e2b953ee5e91abb58cf043f"> 407</a></span> <span class="keywordtype">void</span> <a class="code" href="a00077.html#a1b9934928e2b953ee5e91abb58cf043f">reject_whole_page</a>(<a class="code" href="a02546.html">PAGE_RES_IT</a> &page_res_it) {</div><div class="line"><a name="l00408"></a><span class="lineno"> 408</span>  page_res_it.<a class="code" href="a02546.html#a15febd45d0904bb3c5f7d506368177f0">restart_page</a> ();</div><div class="line"><a name="l00409"></a><span class="lineno"> 409</span>  <span class="keywordflow">while</span> (page_res_it.<a class="code" href="a02546.html#a6cdcdaa4b0b1250ab7e14760d4b5f113">word</a> () != <span class="keyword">nullptr</span>) {</div><div class="line"><a name="l00410"></a><span class="lineno"> 410</span>  page_res_it.<a class="code" href="a02546.html#a6cdcdaa4b0b1250ab7e14760d4b5f113">word</a> ()-><a class="code" href="a02542.html#ae24eb58be06cf275aee411d947fd31ef">reject_map</a>.<a class="code" href="a02618.html#a9fb4a691f24ea06370b55650c197db8b">rej_word_doc_rej</a> ();</div><div class="line"><a name="l00411"></a><span class="lineno"> 411</span>  page_res_it.<a class="code" href="a02546.html#ab29005f235cc738eebafb7d9ed6fe70b">forward</a> ();</div><div class="line"><a name="l00412"></a><span class="lineno"> 412</span>  }</div><div class="line"><a name="l00413"></a><span class="lineno"> 413</span>  <span class="comment">//whole page is rejected</span></div><div class="line"><a name="l00414"></a><span class="lineno"> 414</span>  page_res_it.<a class="code" href="a02546.html#aab221a373111c4be685444b5633e22a5">page_res</a>-><a class="code" href="a02530.html#a34f10ee1831fe9d88c00fc332b201bdc">rejected</a> = <span class="keyword">true</span>;</div><div class="line"><a name="l00415"></a><span class="lineno"> 415</span> }</div><div class="line"><a name="l00416"></a><span class="lineno"> 416</span> </div><div class="line"><a name="l00417"></a><span class="lineno"> 417</span> <span class="keyword">namespace </span><a class="code" href="a01629.html">tesseract</a> {</div><div class="line"><a name="l00418"></a><span class="lineno"><a class="line" href="a02358.html#a2c77d5d94321d7fc717b5376bcb02b79"> 418</a></span> <span class="keywordtype">void</span> <a class="code" href="a02358.html#a2c77d5d94321d7fc717b5376bcb02b79">Tesseract::tilde_crunch</a>(<a class="code" href="a02546.html">PAGE_RES_IT</a> &page_res_it) {</div><div class="line"><a name="l00419"></a><span class="lineno"> 419</span>  <a class="code" href="a02542.html">WERD_RES</a> *word;</div><div class="line"><a name="l00420"></a><span class="lineno"> 420</span>  <a class="code" href="a00080.html#ac4a411895d63e3bb0bea788e92894d42">GARBAGE_LEVEL</a> garbage_level;</div><div class="line"><a name="l00421"></a><span class="lineno"> 421</span>  <a class="code" href="a02546.html">PAGE_RES_IT</a> copy_it;</div><div class="line"><a name="l00422"></a><span class="lineno"> 422</span>  <span class="keywordtype">bool</span> prev_potential_marked = <span class="keyword">false</span>;</div><div class="line"><a name="l00423"></a><span class="lineno"> 423</span>  <span class="keywordtype">bool</span> found_terrible_word = <span class="keyword">false</span>;</div><div class="line"><a name="l00424"></a><span class="lineno"> 424</span>  <a class="code" href="a00530.html#a865cbe4908be24ccc32d2fbd598281d0">BOOL8</a> ok_dict_word;</div><div class="line"><a name="l00425"></a><span class="lineno"> 425</span> </div><div class="line"><a name="l00426"></a><span class="lineno"> 426</span>  page_res_it.<a class="code" href="a02546.html#a15febd45d0904bb3c5f7d506368177f0">restart_page</a>();</div><div class="line"><a name="l00427"></a><span class="lineno"> 427</span>  <span class="keywordflow">while</span> (page_res_it.<a class="code" href="a02546.html#a6cdcdaa4b0b1250ab7e14760d4b5f113">word</a>() != <span class="keyword">nullptr</span>) {</div><div class="line"><a name="l00428"></a><span class="lineno"> 428</span>  <a class="code" href="a02582.html">POLY_BLOCK</a>* pb = page_res_it.<a class="code" href="a02546.html#a997c382ddd2cf2f539532a1d91780963">block</a>()-><a class="code" href="a02534.html#ae7c240d4878247ebdfe78433446751bf">block</a>-><a class="code" href="a02514.html#a9e4346e037f2cc01c3c51d888531da74">pdblk</a>.<a class="code" href="a02558.html#a87856f8400f0629dc761fec0f7a17b57">poly_block</a>();</div><div class="line"><a name="l00429"></a><span class="lineno"> 429</span>  <span class="keywordflow">if</span> (pb != <span class="keyword">nullptr</span> && !pb-><a class="code" href="a02582.html#a4eb55be5fc2ed33312e4410f5ee2cf88">IsText</a>()) {</div><div class="line"><a name="l00430"></a><span class="lineno"> 430</span>  page_res_it.<a class="code" href="a02546.html#ab29005f235cc738eebafb7d9ed6fe70b">forward</a>();</div><div class="line"><a name="l00431"></a><span class="lineno"> 431</span>  <span class="keywordflow">continue</span>;</div><div class="line"><a name="l00432"></a><span class="lineno"> 432</span>  }</div><div class="line"><a name="l00433"></a><span class="lineno"> 433</span>  word = page_res_it.<a class="code" href="a02546.html#a6cdcdaa4b0b1250ab7e14760d4b5f113">word</a>();</div><div class="line"><a name="l00434"></a><span class="lineno"> 434</span> </div><div class="line"><a name="l00435"></a><span class="lineno"> 435</span>  <span class="keywordflow">if</span> (<a class="code" href="a02358.html#a49a94ed873a2ddeea43f4b12a8774222">crunch_early_convert_bad_unlv_chs</a>)</div><div class="line"><a name="l00436"></a><span class="lineno"> 436</span>  <a class="code" href="a02358.html#a81b3e2c28a090f5a877dd0f67a4080b6">convert_bad_unlv_chs</a>(word);</div><div class="line"><a name="l00437"></a><span class="lineno"> 437</span> </div><div class="line"><a name="l00438"></a><span class="lineno"> 438</span>  <span class="keywordflow">if</span> (<a class="code" href="a02358.html#aefd718b3d3abe04fba6ff083019f8374">crunch_early_merge_tess_fails</a>)</div><div class="line"><a name="l00439"></a><span class="lineno"> 439</span>  word-><a class="code" href="a02542.html#af092edf58a4a718687aa35c6a458cada">merge_tess_fails</a>();</div><div class="line"><a name="l00440"></a><span class="lineno"> 440</span> </div><div class="line"><a name="l00441"></a><span class="lineno"> 441</span>  <span class="keywordflow">if</span> (word-><a class="code" href="a02542.html#ae24eb58be06cf275aee411d947fd31ef">reject_map</a>.<a class="code" href="a02618.html#a56942b5d4ddd0096c7624d382b1fef90">accept_count</a> () != 0) {</div><div class="line"><a name="l00442"></a><span class="lineno"> 442</span>  found_terrible_word = <span class="keyword">false</span>;</div><div class="line"><a name="l00443"></a><span class="lineno"> 443</span>  <span class="comment">//Forget earlier potential crunches</span></div><div class="line"><a name="l00444"></a><span class="lineno"> 444</span>  prev_potential_marked = <span class="keyword">false</span>;</div><div class="line"><a name="l00445"></a><span class="lineno"> 445</span>  }</div><div class="line"><a name="l00446"></a><span class="lineno"> 446</span>  <span class="keywordflow">else</span> {</div><div class="line"><a name="l00447"></a><span class="lineno"> 447</span>  ok_dict_word = <a class="code" href="a02358.html#a6cc1aac3230938e3e32a76f119ac4565">safe_dict_word</a>(word);</div><div class="line"><a name="l00448"></a><span class="lineno"> 448</span>  garbage_level = <a class="code" href="a02358.html#afad44e1105d7f57e1a99d9076c4a3b25">garbage_word</a>(word, ok_dict_word);</div><div class="line"><a name="l00449"></a><span class="lineno"> 449</span> </div><div class="line"><a name="l00450"></a><span class="lineno"> 450</span>  <span class="keywordflow">if</span> ((garbage_level != <a class="code" href="a00080.html#ac4a411895d63e3bb0bea788e92894d42ac744add072d392855d098a995acb3751">G_NEVER_CRUNCH</a>) &&</div><div class="line"><a name="l00451"></a><span class="lineno"> 451</span>  (<a class="code" href="a02358.html#acc3da037182b6ce27acdb8a9503df393">terrible_word_crunch</a> (word, garbage_level))) {</div><div class="line"><a name="l00452"></a><span class="lineno"> 452</span>  <span class="keywordflow">if</span> (<a class="code" href="a02358.html#a20a1206ce17b07676f829fdee0034eb5">crunch_debug</a> > 0) {</div><div class="line"><a name="l00453"></a><span class="lineno"> 453</span>  <a class="code" href="a00596.html#a0c2bcd4462ec67ab0971b34a0f610f55">tprintf</a> (<span class="stringliteral">"T CRUNCHING: \"%s\"\n"</span>,</div><div class="line"><a name="l00454"></a><span class="lineno"> 454</span>  word-><a class="code" href="a02542.html#a3d42ac7ec121263e757c9b7160dfd50d">best_choice</a>-><a class="code" href="a02606.html#adf200132afabc2ee6ec256e516011007">unichar_string</a>().<a class="code" href="a02834.html#abf0a7b3c6ae39a46e5441f28f61de5de">string</a>());</div><div class="line"><a name="l00455"></a><span class="lineno"> 455</span>  }</div><div class="line"><a name="l00456"></a><span class="lineno"> 456</span>  word-><a class="code" href="a02542.html#a82d32a9f59bc1c08da9537303c56615b">unlv_crunch_mode</a> = <a class="code" href="a00344.html#affc9a96d31e23e645355e534f11c40e9ad0198ebd5b9e3299dd94f0c5f4d3e003">CR_KEEP_SPACE</a>;</div><div class="line"><a name="l00457"></a><span class="lineno"> 457</span>  <span class="keywordflow">if</span> (prev_potential_marked) {</div><div class="line"><a name="l00458"></a><span class="lineno"> 458</span>  <span class="keywordflow">while</span> (copy_it.<a class="code" href="a02546.html#a6cdcdaa4b0b1250ab7e14760d4b5f113">word</a> () != word) {</div><div class="line"><a name="l00459"></a><span class="lineno"> 459</span>  <span class="keywordflow">if</span> (<a class="code" href="a02358.html#a20a1206ce17b07676f829fdee0034eb5">crunch_debug</a> > 0) {</div><div class="line"><a name="l00460"></a><span class="lineno"> 460</span>  <a class="code" href="a00596.html#a0c2bcd4462ec67ab0971b34a0f610f55">tprintf</a> (<span class="stringliteral">"P1 CRUNCHING: \"%s\"\n"</span>,</div><div class="line"><a name="l00461"></a><span class="lineno"> 461</span>  copy_it.<a class="code" href="a02546.html#a6cdcdaa4b0b1250ab7e14760d4b5f113">word</a>()-><a class="code" href="a02542.html#a3d42ac7ec121263e757c9b7160dfd50d">best_choice</a>-><a class="code" href="a02606.html#adf200132afabc2ee6ec256e516011007">unichar_string</a>().<a class="code" href="a02834.html#abf0a7b3c6ae39a46e5441f28f61de5de">string</a>());</div><div class="line"><a name="l00462"></a><span class="lineno"> 462</span>  }</div><div class="line"><a name="l00463"></a><span class="lineno"> 463</span>  copy_it.<a class="code" href="a02546.html#a6cdcdaa4b0b1250ab7e14760d4b5f113">word</a> ()-><a class="code" href="a02542.html#a82d32a9f59bc1c08da9537303c56615b">unlv_crunch_mode</a> = <a class="code" href="a00344.html#affc9a96d31e23e645355e534f11c40e9ad0198ebd5b9e3299dd94f0c5f4d3e003">CR_KEEP_SPACE</a>;</div><div class="line"><a name="l00464"></a><span class="lineno"> 464</span>  copy_it.<a class="code" href="a02546.html#ab29005f235cc738eebafb7d9ed6fe70b">forward</a> ();</div><div class="line"><a name="l00465"></a><span class="lineno"> 465</span>  }</div><div class="line"><a name="l00466"></a><span class="lineno"> 466</span>  prev_potential_marked = <span class="keyword">false</span>;</div><div class="line"><a name="l00467"></a><span class="lineno"> 467</span>  }</div><div class="line"><a name="l00468"></a><span class="lineno"> 468</span>  found_terrible_word = <span class="keyword">true</span>;</div><div class="line"><a name="l00469"></a><span class="lineno"> 469</span>  }</div><div class="line"><a name="l00470"></a><span class="lineno"> 470</span>  <span class="keywordflow">else</span> <span class="keywordflow">if</span> ((garbage_level != <a class="code" href="a00080.html#ac4a411895d63e3bb0bea788e92894d42ac744add072d392855d098a995acb3751">G_NEVER_CRUNCH</a>) &&</div><div class="line"><a name="l00471"></a><span class="lineno"> 471</span>  (<a class="code" href="a02358.html#abaf0e879a8660f0ff78364960b9b9b8f">potential_word_crunch</a> (word,</div><div class="line"><a name="l00472"></a><span class="lineno"> 472</span>  garbage_level, ok_dict_word))) {</div><div class="line"><a name="l00473"></a><span class="lineno"> 473</span>  <span class="keywordflow">if</span> (found_terrible_word) {</div><div class="line"><a name="l00474"></a><span class="lineno"> 474</span>  <span class="keywordflow">if</span> (<a class="code" href="a02358.html#a20a1206ce17b07676f829fdee0034eb5">crunch_debug</a> > 0) {</div><div class="line"><a name="l00475"></a><span class="lineno"> 475</span>  <a class="code" href="a00596.html#a0c2bcd4462ec67ab0971b34a0f610f55">tprintf</a> (<span class="stringliteral">"P2 CRUNCHING: \"%s\"\n"</span>,</div><div class="line"><a name="l00476"></a><span class="lineno"> 476</span>  word-><a class="code" href="a02542.html#a3d42ac7ec121263e757c9b7160dfd50d">best_choice</a>-><a class="code" href="a02606.html#adf200132afabc2ee6ec256e516011007">unichar_string</a>().<a class="code" href="a02834.html#abf0a7b3c6ae39a46e5441f28f61de5de">string</a>());</div><div class="line"><a name="l00477"></a><span class="lineno"> 477</span>  }</div><div class="line"><a name="l00478"></a><span class="lineno"> 478</span>  word-><a class="code" href="a02542.html#a82d32a9f59bc1c08da9537303c56615b">unlv_crunch_mode</a> = <a class="code" href="a00344.html#affc9a96d31e23e645355e534f11c40e9ad0198ebd5b9e3299dd94f0c5f4d3e003">CR_KEEP_SPACE</a>;</div><div class="line"><a name="l00479"></a><span class="lineno"> 479</span>  }</div><div class="line"><a name="l00480"></a><span class="lineno"> 480</span>  <span class="keywordflow">else</span> <span class="keywordflow">if</span> (!prev_potential_marked) {</div><div class="line"><a name="l00481"></a><span class="lineno"> 481</span>  copy_it = page_res_it;</div><div class="line"><a name="l00482"></a><span class="lineno"> 482</span>  prev_potential_marked = <span class="keyword">true</span>;</div><div class="line"><a name="l00483"></a><span class="lineno"> 483</span>  <span class="keywordflow">if</span> (<a class="code" href="a02358.html#a20a1206ce17b07676f829fdee0034eb5">crunch_debug</a> > 1) {</div><div class="line"><a name="l00484"></a><span class="lineno"> 484</span>  <a class="code" href="a00596.html#a0c2bcd4462ec67ab0971b34a0f610f55">tprintf</a> (<span class="stringliteral">"P3 CRUNCHING: \"%s\"\n"</span>,</div><div class="line"><a name="l00485"></a><span class="lineno"> 485</span>  word-><a class="code" href="a02542.html#a3d42ac7ec121263e757c9b7160dfd50d">best_choice</a>-><a class="code" href="a02606.html#adf200132afabc2ee6ec256e516011007">unichar_string</a>().<a class="code" href="a02834.html#abf0a7b3c6ae39a46e5441f28f61de5de">string</a>());</div><div class="line"><a name="l00486"></a><span class="lineno"> 486</span>  }</div><div class="line"><a name="l00487"></a><span class="lineno"> 487</span>  }</div><div class="line"><a name="l00488"></a><span class="lineno"> 488</span>  }</div><div class="line"><a name="l00489"></a><span class="lineno"> 489</span>  <span class="keywordflow">else</span> {</div><div class="line"><a name="l00490"></a><span class="lineno"> 490</span>  found_terrible_word = <span class="keyword">false</span>;</div><div class="line"><a name="l00491"></a><span class="lineno"> 491</span>  <span class="comment">//Forget earlier potential crunches</span></div><div class="line"><a name="l00492"></a><span class="lineno"> 492</span>  prev_potential_marked = <span class="keyword">false</span>;</div><div class="line"><a name="l00493"></a><span class="lineno"> 493</span>  <span class="keywordflow">if</span> (<a class="code" href="a02358.html#a20a1206ce17b07676f829fdee0034eb5">crunch_debug</a> > 2) {</div><div class="line"><a name="l00494"></a><span class="lineno"> 494</span>  <a class="code" href="a00596.html#a0c2bcd4462ec67ab0971b34a0f610f55">tprintf</a> (<span class="stringliteral">"NO CRUNCH: \"%s\"\n"</span>,</div><div class="line"><a name="l00495"></a><span class="lineno"> 495</span>  word-><a class="code" href="a02542.html#a3d42ac7ec121263e757c9b7160dfd50d">best_choice</a>-><a class="code" href="a02606.html#adf200132afabc2ee6ec256e516011007">unichar_string</a>().<a class="code" href="a02834.html#abf0a7b3c6ae39a46e5441f28f61de5de">string</a>());</div><div class="line"><a name="l00496"></a><span class="lineno"> 496</span>  }</div><div class="line"><a name="l00497"></a><span class="lineno"> 497</span>  }</div><div class="line"><a name="l00498"></a><span class="lineno"> 498</span>  }</div><div class="line"><a name="l00499"></a><span class="lineno"> 499</span>  page_res_it.<a class="code" href="a02546.html#ab29005f235cc738eebafb7d9ed6fe70b">forward</a> ();</div><div class="line"><a name="l00500"></a><span class="lineno"> 500</span>  }</div><div class="line"><a name="l00501"></a><span class="lineno"> 501</span> }</div><div class="line"><a name="l00502"></a><span class="lineno"> 502</span> </div><div class="line"><a name="l00503"></a><span class="lineno"> 503</span> </div><div class="line"><a name="l00504"></a><span class="lineno"><a class="line" href="a02358.html#acc3da037182b6ce27acdb8a9503df393"> 504</a></span> <span class="keywordtype">bool</span> <a class="code" href="a02358.html#acc3da037182b6ce27acdb8a9503df393">Tesseract::terrible_word_crunch</a>(<a class="code" href="a02542.html">WERD_RES</a>* word,</div><div class="line"><a name="l00505"></a><span class="lineno"> 505</span>  <a class="code" href="a00080.html#ac4a411895d63e3bb0bea788e92894d42">GARBAGE_LEVEL</a> garbage_level) {</div><div class="line"><a name="l00506"></a><span class="lineno"> 506</span>  <span class="keywordtype">float</span> rating_per_ch;</div><div class="line"><a name="l00507"></a><span class="lineno"> 507</span>  <span class="keywordtype">int</span> adjusted_len;</div><div class="line"><a name="l00508"></a><span class="lineno"> 508</span>  <span class="keywordtype">int</span> crunch_mode = 0;</div><div class="line"><a name="l00509"></a><span class="lineno"> 509</span> </div><div class="line"><a name="l00510"></a><span class="lineno"> 510</span>  <span class="keywordflow">if</span> ((word-><a class="code" href="a02542.html#a3d42ac7ec121263e757c9b7160dfd50d">best_choice</a>-><a class="code" href="a02606.html#adf200132afabc2ee6ec256e516011007">unichar_string</a>().<a class="code" href="a02834.html#a7a1f2a841e8d01d5a8c05bc3ab8064eb">length</a>() == 0) ||</div><div class="line"><a name="l00511"></a><span class="lineno"> 511</span>  (strspn(word-><a class="code" href="a02542.html#a3d42ac7ec121263e757c9b7160dfd50d">best_choice</a>-><a class="code" href="a02606.html#adf200132afabc2ee6ec256e516011007">unichar_string</a>().<a class="code" href="a02834.html#abf0a7b3c6ae39a46e5441f28f61de5de">string</a>(), <span class="stringliteral">" "</span>) ==</div><div class="line"><a name="l00512"></a><span class="lineno"> 512</span>  word-><a class="code" href="a02542.html#a3d42ac7ec121263e757c9b7160dfd50d">best_choice</a>-><a class="code" href="a02606.html#adf200132afabc2ee6ec256e516011007">unichar_string</a>().<a class="code" href="a02834.html#ae2d06687c4bac24187890e5a2357b9d1">unsigned_size</a>()))</div><div class="line"><a name="l00513"></a><span class="lineno"> 513</span>  crunch_mode = 1;</div><div class="line"><a name="l00514"></a><span class="lineno"> 514</span>  <span class="keywordflow">else</span> {</div><div class="line"><a name="l00515"></a><span class="lineno"> 515</span>  adjusted_len = word-><a class="code" href="a02542.html#ae24eb58be06cf275aee411d947fd31ef">reject_map</a>.<a class="code" href="a02618.html#adb462d55dc4b682e0a77090185a58011">length</a> ();</div><div class="line"><a name="l00516"></a><span class="lineno"> 516</span>  <span class="keywordflow">if</span> (adjusted_len > <a class="code" href="a02358.html#a69c6af52a20db78eb5bfe14a1bc70162">crunch_rating_max</a>)</div><div class="line"><a name="l00517"></a><span class="lineno"> 517</span>  adjusted_len = <a class="code" href="a02358.html#a69c6af52a20db78eb5bfe14a1bc70162">crunch_rating_max</a>;</div><div class="line"><a name="l00518"></a><span class="lineno"> 518</span>  rating_per_ch = word-><a class="code" href="a02542.html#a3d42ac7ec121263e757c9b7160dfd50d">best_choice</a>-><a class="code" href="a02606.html#afa672748d2585eea64ab79592dd02eb3">rating</a> () / adjusted_len;</div><div class="line"><a name="l00519"></a><span class="lineno"> 519</span> </div><div class="line"><a name="l00520"></a><span class="lineno"> 520</span>  <span class="keywordflow">if</span> (rating_per_ch > <a class="code" href="a02358.html#a21a76e19dd03c1f03aad1b922fa3b21a">crunch_terrible_rating</a>)</div><div class="line"><a name="l00521"></a><span class="lineno"> 521</span>  crunch_mode = 2;</div><div class="line"><a name="l00522"></a><span class="lineno"> 522</span>  <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="a02358.html#ae69c2f057f0474b533183f618e27d447">crunch_terrible_garbage</a> && (garbage_level == <a class="code" href="a00080.html#ac4a411895d63e3bb0bea788e92894d42a2400fb7991d9c94896464522e10c49ad">G_TERRIBLE</a>))</div><div class="line"><a name="l00523"></a><span class="lineno"> 523</span>  crunch_mode = 3;</div><div class="line"><a name="l00524"></a><span class="lineno"> 524</span>  <span class="keywordflow">else</span> <span class="keywordflow">if</span> ((word-><a class="code" href="a02542.html#a3d42ac7ec121263e757c9b7160dfd50d">best_choice</a>-><a class="code" href="a02606.html#acea3ee4af3377da8f4c10627e4ba42cf">certainty</a> () < <a class="code" href="a02358.html#aa3b5f0beacd8d0d328e66dfe8b850187">crunch_poor_garbage_cert</a>) &&</div><div class="line"><a name="l00525"></a><span class="lineno"> 525</span>  (garbage_level != <a class="code" href="a00080.html#ac4a411895d63e3bb0bea788e92894d42a46d03f2b7d080cc8319a43ef4bad82b3">G_OK</a>))</div><div class="line"><a name="l00526"></a><span class="lineno"> 526</span>  crunch_mode = 4;</div><div class="line"><a name="l00527"></a><span class="lineno"> 527</span>  <span class="keywordflow">else</span> <span class="keywordflow">if</span> ((rating_per_ch > <a class="code" href="a02358.html#aec4f861a8e55288700ee622d3e885540">crunch_poor_garbage_rate</a>) &&</div><div class="line"><a name="l00528"></a><span class="lineno"> 528</span>  (garbage_level != <a class="code" href="a00080.html#ac4a411895d63e3bb0bea788e92894d42a46d03f2b7d080cc8319a43ef4bad82b3">G_OK</a>))</div><div class="line"><a name="l00529"></a><span class="lineno"> 529</span>  crunch_mode = 5;</div><div class="line"><a name="l00530"></a><span class="lineno"> 530</span>  }</div><div class="line"><a name="l00531"></a><span class="lineno"> 531</span>  <span class="keywordflow">if</span> (crunch_mode > 0) {</div><div class="line"><a name="l00532"></a><span class="lineno"> 532</span>  <span class="keywordflow">if</span> (<a class="code" href="a02358.html#a20a1206ce17b07676f829fdee0034eb5">crunch_debug</a> > 2) {</div><div class="line"><a name="l00533"></a><span class="lineno"> 533</span>  <a class="code" href="a00596.html#a0c2bcd4462ec67ab0971b34a0f610f55">tprintf</a> (<span class="stringliteral">"Terrible_word_crunch (%d) on \"%s\"\n"</span>,</div><div class="line"><a name="l00534"></a><span class="lineno"> 534</span>  crunch_mode, word-><a class="code" href="a02542.html#a3d42ac7ec121263e757c9b7160dfd50d">best_choice</a>-><a class="code" href="a02606.html#adf200132afabc2ee6ec256e516011007">unichar_string</a>().<a class="code" href="a02834.html#abf0a7b3c6ae39a46e5441f28f61de5de">string</a>());</div><div class="line"><a name="l00535"></a><span class="lineno"> 535</span>  }</div><div class="line"><a name="l00536"></a><span class="lineno"> 536</span>  <span class="keywordflow">return</span> <span class="keyword">true</span>;</div><div class="line"><a name="l00537"></a><span class="lineno"> 537</span>  }</div><div class="line"><a name="l00538"></a><span class="lineno"> 538</span>  <span class="keywordflow">else</span></div><div class="line"><a name="l00539"></a><span class="lineno"> 539</span>  <span class="keywordflow">return</span> <span class="keyword">false</span>;</div><div class="line"><a name="l00540"></a><span class="lineno"> 540</span> }</div><div class="line"><a name="l00541"></a><span class="lineno"> 541</span> </div><div class="line"><a name="l00542"></a><span class="lineno"><a class="line" href="a02358.html#abaf0e879a8660f0ff78364960b9b9b8f"> 542</a></span> <span class="keywordtype">bool</span> <a class="code" href="a02358.html#abaf0e879a8660f0ff78364960b9b9b8f">Tesseract::potential_word_crunch</a>(<a class="code" href="a02542.html">WERD_RES</a>* word,</div><div class="line"><a name="l00543"></a><span class="lineno"> 543</span>  <a class="code" href="a00080.html#ac4a411895d63e3bb0bea788e92894d42">GARBAGE_LEVEL</a> garbage_level,</div><div class="line"><a name="l00544"></a><span class="lineno"> 544</span>  <span class="keywordtype">bool</span> ok_dict_word) {</div><div class="line"><a name="l00545"></a><span class="lineno"> 545</span>  <span class="keywordtype">float</span> rating_per_ch;</div><div class="line"><a name="l00546"></a><span class="lineno"> 546</span>  <span class="keywordtype">int</span> adjusted_len;</div><div class="line"><a name="l00547"></a><span class="lineno"> 547</span>  <span class="keyword">const</span> <span class="keywordtype">char</span> *str = word-><a class="code" href="a02542.html#a3d42ac7ec121263e757c9b7160dfd50d">best_choice</a>-><a class="code" href="a02606.html#adf200132afabc2ee6ec256e516011007">unichar_string</a>().<a class="code" href="a02834.html#abf0a7b3c6ae39a46e5441f28f61de5de">string</a>();</div><div class="line"><a name="l00548"></a><span class="lineno"> 548</span>  <span class="keyword">const</span> <span class="keywordtype">char</span> *lengths = word-><a class="code" href="a02542.html#a3d42ac7ec121263e757c9b7160dfd50d">best_choice</a>-><a class="code" href="a02606.html#adaecd80cfe44e00e9c4647859b1c87e0">unichar_lengths</a>().<a class="code" href="a02834.html#abf0a7b3c6ae39a46e5441f28f61de5de">string</a>();</div><div class="line"><a name="l00549"></a><span class="lineno"> 549</span>  <span class="keywordtype">bool</span> word_crunchable;</div><div class="line"><a name="l00550"></a><span class="lineno"> 550</span>  <span class="keywordtype">int</span> poor_indicator_count = 0;</div><div class="line"><a name="l00551"></a><span class="lineno"> 551</span> </div><div class="line"><a name="l00552"></a><span class="lineno"> 552</span>  word_crunchable = !<a class="code" href="a02358.html#a3b9dd1d5d1a309b0ce4f1ef34c0a8a2a">crunch_leave_accept_strings</a> ||</div><div class="line"><a name="l00553"></a><span class="lineno"> 553</span>  word-><a class="code" href="a02542.html#ae24eb58be06cf275aee411d947fd31ef">reject_map</a>.<a class="code" href="a02618.html#adb462d55dc4b682e0a77090185a58011">length</a>() < 3 ||</div><div class="line"><a name="l00554"></a><span class="lineno"> 554</span>  (<a class="code" href="a02358.html#a51f2ad8b2d849d90bbcfbfca3067c0f1">acceptable_word_string</a>(*word-><a class="code" href="a02542.html#a053a2aeeddc26a93a41a04fa08dd688a">uch_set</a>,</div><div class="line"><a name="l00555"></a><span class="lineno"> 555</span>  str, lengths) == <a class="code" href="a00074.html#af9ff5a7d7a1b9eeea7ce4106bffa7eeeaab0741a5a5ff9757ca343af255353ba0">AC_UNACCEPTABLE</a> &&</div><div class="line"><a name="l00556"></a><span class="lineno"> 556</span>  !ok_dict_word);</div><div class="line"><a name="l00557"></a><span class="lineno"> 557</span> </div><div class="line"><a name="l00558"></a><span class="lineno"> 558</span>  adjusted_len = word-><a class="code" href="a02542.html#ae24eb58be06cf275aee411d947fd31ef">reject_map</a>.<a class="code" href="a02618.html#adb462d55dc4b682e0a77090185a58011">length</a>();</div><div class="line"><a name="l00559"></a><span class="lineno"> 559</span>  <span class="keywordflow">if</span> (adjusted_len > 10)</div><div class="line"><a name="l00560"></a><span class="lineno"> 560</span>  adjusted_len = 10;</div><div class="line"><a name="l00561"></a><span class="lineno"> 561</span>  rating_per_ch = word-><a class="code" href="a02542.html#a3d42ac7ec121263e757c9b7160dfd50d">best_choice</a>-><a class="code" href="a02606.html#afa672748d2585eea64ab79592dd02eb3">rating</a>() / adjusted_len;</div><div class="line"><a name="l00562"></a><span class="lineno"> 562</span> </div><div class="line"><a name="l00563"></a><span class="lineno"> 563</span>  <span class="keywordflow">if</span> (rating_per_ch > <a class="code" href="a02358.html#ae98cef95f80d5939eaf80b123fd3c402">crunch_pot_poor_rate</a>) {</div><div class="line"><a name="l00564"></a><span class="lineno"> 564</span>  <span class="keywordflow">if</span> (<a class="code" href="a02358.html#a20a1206ce17b07676f829fdee0034eb5">crunch_debug</a> > 2) {</div><div class="line"><a name="l00565"></a><span class="lineno"> 565</span>  <a class="code" href="a00596.html#a0c2bcd4462ec67ab0971b34a0f610f55">tprintf</a>(<span class="stringliteral">"Potential poor rating on \"%s\"\n"</span>,</div><div class="line"><a name="l00566"></a><span class="lineno"> 566</span>  word-><a class="code" href="a02542.html#a3d42ac7ec121263e757c9b7160dfd50d">best_choice</a>-><a class="code" href="a02606.html#adf200132afabc2ee6ec256e516011007">unichar_string</a>().<a class="code" href="a02834.html#abf0a7b3c6ae39a46e5441f28f61de5de">string</a>());</div><div class="line"><a name="l00567"></a><span class="lineno"> 567</span>  }</div><div class="line"><a name="l00568"></a><span class="lineno"> 568</span>  poor_indicator_count++;</div><div class="line"><a name="l00569"></a><span class="lineno"> 569</span>  }</div><div class="line"><a name="l00570"></a><span class="lineno"> 570</span> </div><div class="line"><a name="l00571"></a><span class="lineno"> 571</span>  <span class="keywordflow">if</span> (word_crunchable &&</div><div class="line"><a name="l00572"></a><span class="lineno"> 572</span>  word-><a class="code" href="a02542.html#a3d42ac7ec121263e757c9b7160dfd50d">best_choice</a>-><a class="code" href="a02606.html#acea3ee4af3377da8f4c10627e4ba42cf">certainty</a>() < <a class="code" href="a02358.html#aee487bb533118fcd5f1994e54ba86fff">crunch_pot_poor_cert</a>) {</div><div class="line"><a name="l00573"></a><span class="lineno"> 573</span>  <span class="keywordflow">if</span> (<a class="code" href="a02358.html#a20a1206ce17b07676f829fdee0034eb5">crunch_debug</a> > 2) {</div><div class="line"><a name="l00574"></a><span class="lineno"> 574</span>  <a class="code" href="a00596.html#a0c2bcd4462ec67ab0971b34a0f610f55">tprintf</a>(<span class="stringliteral">"Potential poor cert on \"%s\"\n"</span>,</div><div class="line"><a name="l00575"></a><span class="lineno"> 575</span>  word-><a class="code" href="a02542.html#a3d42ac7ec121263e757c9b7160dfd50d">best_choice</a>-><a class="code" href="a02606.html#adf200132afabc2ee6ec256e516011007">unichar_string</a>().<a class="code" href="a02834.html#abf0a7b3c6ae39a46e5441f28f61de5de">string</a>());</div><div class="line"><a name="l00576"></a><span class="lineno"> 576</span>  }</div><div class="line"><a name="l00577"></a><span class="lineno"> 577</span>  poor_indicator_count++;</div><div class="line"><a name="l00578"></a><span class="lineno"> 578</span>  }</div><div class="line"><a name="l00579"></a><span class="lineno"> 579</span> </div><div class="line"><a name="l00580"></a><span class="lineno"> 580</span>  <span class="keywordflow">if</span> (garbage_level != <a class="code" href="a00080.html#ac4a411895d63e3bb0bea788e92894d42a46d03f2b7d080cc8319a43ef4bad82b3">G_OK</a>) {</div><div class="line"><a name="l00581"></a><span class="lineno"> 581</span>  <span class="keywordflow">if</span> (<a class="code" href="a02358.html#a20a1206ce17b07676f829fdee0034eb5">crunch_debug</a> > 2) {</div><div class="line"><a name="l00582"></a><span class="lineno"> 582</span>  <a class="code" href="a00596.html#a0c2bcd4462ec67ab0971b34a0f610f55">tprintf</a>(<span class="stringliteral">"Potential garbage on \"%s\"\n"</span>,</div><div class="line"><a name="l00583"></a><span class="lineno"> 583</span>  word-><a class="code" href="a02542.html#a3d42ac7ec121263e757c9b7160dfd50d">best_choice</a>-><a class="code" href="a02606.html#adf200132afabc2ee6ec256e516011007">unichar_string</a>().<a class="code" href="a02834.html#abf0a7b3c6ae39a46e5441f28f61de5de">string</a>());</div><div class="line"><a name="l00584"></a><span class="lineno"> 584</span>  }</div><div class="line"><a name="l00585"></a><span class="lineno"> 585</span>  poor_indicator_count++;</div><div class="line"><a name="l00586"></a><span class="lineno"> 586</span>  }</div><div class="line"><a name="l00587"></a><span class="lineno"> 587</span>  <span class="keywordflow">return</span> poor_indicator_count >= <a class="code" href="a02358.html#af5c0420627cd4d8b1273916d8b86c354">crunch_pot_indicators</a>;</div><div class="line"><a name="l00588"></a><span class="lineno"> 588</span> }</div><div class="line"><a name="l00589"></a><span class="lineno"> 589</span> </div><div class="line"><a name="l00590"></a><span class="lineno"><a class="line" href="a02358.html#a06a8ab9064d4c6da290c82e7adf53a8c"> 590</a></span> <span class="keywordtype">void</span> <a class="code" href="a02358.html#a06a8ab9064d4c6da290c82e7adf53a8c">Tesseract::tilde_delete</a>(<a class="code" href="a02546.html">PAGE_RES_IT</a> &page_res_it) {</div><div class="line"><a name="l00591"></a><span class="lineno"> 591</span>  <a class="code" href="a02542.html">WERD_RES</a> *word;</div><div class="line"><a name="l00592"></a><span class="lineno"> 592</span>  <a class="code" href="a02546.html">PAGE_RES_IT</a> copy_it;</div><div class="line"><a name="l00593"></a><span class="lineno"> 593</span>  <span class="keywordtype">bool</span> deleting_from_bol = <span class="keyword">false</span>;</div><div class="line"><a name="l00594"></a><span class="lineno"> 594</span>  <span class="keywordtype">bool</span> marked_delete_point = <span class="keyword">false</span>;</div><div class="line"><a name="l00595"></a><span class="lineno"> 595</span>  int16_t debug_delete_mode;</div><div class="line"><a name="l00596"></a><span class="lineno"> 596</span>  <a class="code" href="a00344.html#affc9a96d31e23e645355e534f11c40e9">CRUNCH_MODE</a> delete_mode;</div><div class="line"><a name="l00597"></a><span class="lineno"> 597</span>  int16_t x_debug_delete_mode;</div><div class="line"><a name="l00598"></a><span class="lineno"> 598</span>  <a class="code" href="a00344.html#affc9a96d31e23e645355e534f11c40e9">CRUNCH_MODE</a> x_delete_mode;</div><div class="line"><a name="l00599"></a><span class="lineno"> 599</span> </div><div class="line"><a name="l00600"></a><span class="lineno"> 600</span>  page_res_it.<a class="code" href="a02546.html#a15febd45d0904bb3c5f7d506368177f0">restart_page</a>();</div><div class="line"><a name="l00601"></a><span class="lineno"> 601</span>  <span class="keywordflow">while</span> (page_res_it.<a class="code" href="a02546.html#a6cdcdaa4b0b1250ab7e14760d4b5f113">word</a>() != <span class="keyword">nullptr</span>) {</div><div class="line"><a name="l00602"></a><span class="lineno"> 602</span>  word = page_res_it.<a class="code" href="a02546.html#a6cdcdaa4b0b1250ab7e14760d4b5f113">word</a>();</div><div class="line"><a name="l00603"></a><span class="lineno"> 603</span> </div><div class="line"><a name="l00604"></a><span class="lineno"> 604</span>  delete_mode = <a class="code" href="a02358.html#add8f08bb0c03f69c777d38e82cb88770">word_deletable</a> (word, debug_delete_mode);</div><div class="line"><a name="l00605"></a><span class="lineno"> 605</span>  <span class="keywordflow">if</span> (delete_mode != <a class="code" href="a00344.html#affc9a96d31e23e645355e534f11c40e9a1eac25752f2c55f1809d11d4ef917ff9">CR_NONE</a>) {</div><div class="line"><a name="l00606"></a><span class="lineno"> 606</span>  <span class="keywordflow">if</span> (word-><a class="code" href="a02542.html#afc15fa7c1b5ad55d6772dea0d6865df1">word</a>-><a class="code" href="a02638.html#aec30b0c876cef5479c5db04aa8897358">flag</a> (<a class="code" href="a00449.html#ad6968adbf8f2cc44adf333ec96efb0beaff21d7c8c8992120fff35942408a00d2">W_BOL</a>) || deleting_from_bol) {</div><div class="line"><a name="l00607"></a><span class="lineno"> 607</span>  <span class="keywordflow">if</span> (<a class="code" href="a02358.html#a20a1206ce17b07676f829fdee0034eb5">crunch_debug</a> > 0) {</div><div class="line"><a name="l00608"></a><span class="lineno"> 608</span>  <a class="code" href="a00596.html#a0c2bcd4462ec67ab0971b34a0f610f55">tprintf</a> (<span class="stringliteral">"BOL CRUNCH DELETING(%d): \"%s\"\n"</span>,</div><div class="line"><a name="l00609"></a><span class="lineno"> 609</span>  debug_delete_mode,</div><div class="line"><a name="l00610"></a><span class="lineno"> 610</span>  word-><a class="code" href="a02542.html#a3d42ac7ec121263e757c9b7160dfd50d">best_choice</a>-><a class="code" href="a02606.html#adf200132afabc2ee6ec256e516011007">unichar_string</a>().<a class="code" href="a02834.html#abf0a7b3c6ae39a46e5441f28f61de5de">string</a>());</div><div class="line"><a name="l00611"></a><span class="lineno"> 611</span>  }</div><div class="line"><a name="l00612"></a><span class="lineno"> 612</span>  word-><a class="code" href="a02542.html#a82d32a9f59bc1c08da9537303c56615b">unlv_crunch_mode</a> = delete_mode;</div><div class="line"><a name="l00613"></a><span class="lineno"> 613</span>  deleting_from_bol = <span class="keyword">true</span>;</div><div class="line"><a name="l00614"></a><span class="lineno"> 614</span>  } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (word-><a class="code" href="a02542.html#afc15fa7c1b5ad55d6772dea0d6865df1">word</a>-><a class="code" href="a02638.html#aec30b0c876cef5479c5db04aa8897358">flag</a>(<a class="code" href="a00449.html#ad6968adbf8f2cc44adf333ec96efb0bea62efb985a62d85e014ee5ab039dd50ce">W_EOL</a>)) {</div><div class="line"><a name="l00615"></a><span class="lineno"> 615</span>  <span class="keywordflow">if</span> (marked_delete_point) {</div><div class="line"><a name="l00616"></a><span class="lineno"> 616</span>  <span class="keywordflow">while</span> (copy_it.<a class="code" href="a02546.html#a6cdcdaa4b0b1250ab7e14760d4b5f113">word</a>() != word) {</div><div class="line"><a name="l00617"></a><span class="lineno"> 617</span>  x_delete_mode = <a class="code" href="a02358.html#add8f08bb0c03f69c777d38e82cb88770">word_deletable</a> (copy_it.<a class="code" href="a02546.html#a6cdcdaa4b0b1250ab7e14760d4b5f113">word</a> (),</div><div class="line"><a name="l00618"></a><span class="lineno"> 618</span>  x_debug_delete_mode);</div><div class="line"><a name="l00619"></a><span class="lineno"> 619</span>  <span class="keywordflow">if</span> (<a class="code" href="a02358.html#a20a1206ce17b07676f829fdee0034eb5">crunch_debug</a> > 0) {</div><div class="line"><a name="l00620"></a><span class="lineno"> 620</span>  <a class="code" href="a00596.html#a0c2bcd4462ec67ab0971b34a0f610f55">tprintf</a> (<span class="stringliteral">"EOL CRUNCH DELETING(%d): \"%s\"\n"</span>,</div><div class="line"><a name="l00621"></a><span class="lineno"> 621</span>  x_debug_delete_mode,</div><div class="line"><a name="l00622"></a><span class="lineno"> 622</span>  copy_it.<a class="code" href="a02546.html#a6cdcdaa4b0b1250ab7e14760d4b5f113">word</a>()-><a class="code" href="a02542.html#a3d42ac7ec121263e757c9b7160dfd50d">best_choice</a>-><a class="code" href="a02606.html#adf200132afabc2ee6ec256e516011007">unichar_string</a>().<a class="code" href="a02834.html#abf0a7b3c6ae39a46e5441f28f61de5de">string</a>());</div><div class="line"><a name="l00623"></a><span class="lineno"> 623</span>  }</div><div class="line"><a name="l00624"></a><span class="lineno"> 624</span>  copy_it.<a class="code" href="a02546.html#a6cdcdaa4b0b1250ab7e14760d4b5f113">word</a> ()-><a class="code" href="a02542.html#a82d32a9f59bc1c08da9537303c56615b">unlv_crunch_mode</a> = x_delete_mode;</div><div class="line"><a name="l00625"></a><span class="lineno"> 625</span>  copy_it.<a class="code" href="a02546.html#ab29005f235cc738eebafb7d9ed6fe70b">forward</a> ();</div><div class="line"><a name="l00626"></a><span class="lineno"> 626</span>  }</div><div class="line"><a name="l00627"></a><span class="lineno"> 627</span>  }</div><div class="line"><a name="l00628"></a><span class="lineno"> 628</span>  <span class="keywordflow">if</span> (<a class="code" href="a02358.html#a20a1206ce17b07676f829fdee0034eb5">crunch_debug</a> > 0) {</div><div class="line"><a name="l00629"></a><span class="lineno"> 629</span>  <a class="code" href="a00596.html#a0c2bcd4462ec67ab0971b34a0f610f55">tprintf</a> (<span class="stringliteral">"EOL CRUNCH DELETING(%d): \"%s\"\n"</span>,</div><div class="line"><a name="l00630"></a><span class="lineno"> 630</span>  debug_delete_mode,</div><div class="line"><a name="l00631"></a><span class="lineno"> 631</span>  word-><a class="code" href="a02542.html#a3d42ac7ec121263e757c9b7160dfd50d">best_choice</a>-><a class="code" href="a02606.html#adf200132afabc2ee6ec256e516011007">unichar_string</a>().<a class="code" href="a02834.html#abf0a7b3c6ae39a46e5441f28f61de5de">string</a>());</div><div class="line"><a name="l00632"></a><span class="lineno"> 632</span>  }</div><div class="line"><a name="l00633"></a><span class="lineno"> 633</span>  word-><a class="code" href="a02542.html#a82d32a9f59bc1c08da9537303c56615b">unlv_crunch_mode</a> = delete_mode;</div><div class="line"><a name="l00634"></a><span class="lineno"> 634</span>  deleting_from_bol = <span class="keyword">false</span>;</div><div class="line"><a name="l00635"></a><span class="lineno"> 635</span>  marked_delete_point = <span class="keyword">false</span>;</div><div class="line"><a name="l00636"></a><span class="lineno"> 636</span>  }</div><div class="line"><a name="l00637"></a><span class="lineno"> 637</span>  <span class="keywordflow">else</span> {</div><div class="line"><a name="l00638"></a><span class="lineno"> 638</span>  <span class="keywordflow">if</span> (!marked_delete_point) {</div><div class="line"><a name="l00639"></a><span class="lineno"> 639</span>  copy_it = page_res_it;</div><div class="line"><a name="l00640"></a><span class="lineno"> 640</span>  marked_delete_point = <span class="keyword">true</span>;</div><div class="line"><a name="l00641"></a><span class="lineno"> 641</span>  }</div><div class="line"><a name="l00642"></a><span class="lineno"> 642</span>  }</div><div class="line"><a name="l00643"></a><span class="lineno"> 643</span>  }</div><div class="line"><a name="l00644"></a><span class="lineno"> 644</span>  <span class="keywordflow">else</span> {</div><div class="line"><a name="l00645"></a><span class="lineno"> 645</span>  deleting_from_bol = <span class="keyword">false</span>;</div><div class="line"><a name="l00646"></a><span class="lineno"> 646</span>  <span class="comment">//Forget earlier potential crunches</span></div><div class="line"><a name="l00647"></a><span class="lineno"> 647</span>  marked_delete_point = <span class="keyword">false</span>;</div><div class="line"><a name="l00648"></a><span class="lineno"> 648</span>  }</div><div class="line"><a name="l00649"></a><span class="lineno"> 649</span>  <span class="comment">/*</span></div><div class="line"><a name="l00650"></a><span class="lineno"> 650</span> <span class="comment"> The following step has been left till now as the tess fails are used to</span></div><div class="line"><a name="l00651"></a><span class="lineno"> 651</span> <span class="comment"> determine if the word is deletable.</span></div><div class="line"><a name="l00652"></a><span class="lineno"> 652</span> <span class="comment"> */</span></div><div class="line"><a name="l00653"></a><span class="lineno"> 653</span>  <span class="keywordflow">if</span> (!<a class="code" href="a02358.html#aefd718b3d3abe04fba6ff083019f8374">crunch_early_merge_tess_fails</a>)</div><div class="line"><a name="l00654"></a><span class="lineno"> 654</span>  word-><a class="code" href="a02542.html#af092edf58a4a718687aa35c6a458cada">merge_tess_fails</a>();</div><div class="line"><a name="l00655"></a><span class="lineno"> 655</span>  page_res_it.<a class="code" href="a02546.html#ab29005f235cc738eebafb7d9ed6fe70b">forward</a> ();</div><div class="line"><a name="l00656"></a><span class="lineno"> 656</span>  }</div><div class="line"><a name="l00657"></a><span class="lineno"> 657</span> }</div><div class="line"><a name="l00658"></a><span class="lineno"> 658</span> </div><div class="line"><a name="l00659"></a><span class="lineno"> 659</span> </div><div class="line"><a name="l00660"></a><span class="lineno"><a class="line" href="a02358.html#a81b3e2c28a090f5a877dd0f67a4080b6"> 660</a></span> <span class="keywordtype">void</span> <a class="code" href="a02358.html#a81b3e2c28a090f5a877dd0f67a4080b6">Tesseract::convert_bad_unlv_chs</a>(<a class="code" href="a02542.html">WERD_RES</a> *word_res) {</div><div class="line"><a name="l00661"></a><span class="lineno"> 661</span>  <span class="keywordtype">int</span> i;</div><div class="line"><a name="l00662"></a><span class="lineno"> 662</span>  <a class="code" href="a00605.html#afedceee7ea132dae3d224db2cf8b5618">UNICHAR_ID</a> unichar_dash = word_res-><a class="code" href="a02542.html#a053a2aeeddc26a93a41a04fa08dd688a">uch_set</a>-><a class="code" href="a03950.html#aeb2253dcb5f01c81fcba5f4af417eadf">unichar_to_id</a>(<span class="stringliteral">"-"</span>);</div><div class="line"><a name="l00663"></a><span class="lineno"> 663</span>  <a class="code" href="a00605.html#afedceee7ea132dae3d224db2cf8b5618">UNICHAR_ID</a> unichar_space = word_res-><a class="code" href="a02542.html#a053a2aeeddc26a93a41a04fa08dd688a">uch_set</a>-><a class="code" href="a03950.html#aeb2253dcb5f01c81fcba5f4af417eadf">unichar_to_id</a>(<span class="stringliteral">" "</span>);</div><div class="line"><a name="l00664"></a><span class="lineno"> 664</span>  <a class="code" href="a00605.html#afedceee7ea132dae3d224db2cf8b5618">UNICHAR_ID</a> unichar_tilde = word_res-><a class="code" href="a02542.html#a053a2aeeddc26a93a41a04fa08dd688a">uch_set</a>-><a class="code" href="a03950.html#aeb2253dcb5f01c81fcba5f4af417eadf">unichar_to_id</a>(<span class="stringliteral">"~"</span>);</div><div class="line"><a name="l00665"></a><span class="lineno"> 665</span>  <a class="code" href="a00605.html#afedceee7ea132dae3d224db2cf8b5618">UNICHAR_ID</a> unichar_pow = word_res-><a class="code" href="a02542.html#a053a2aeeddc26a93a41a04fa08dd688a">uch_set</a>-><a class="code" href="a03950.html#aeb2253dcb5f01c81fcba5f4af417eadf">unichar_to_id</a>(<span class="stringliteral">"^"</span>);</div><div class="line"><a name="l00666"></a><span class="lineno"> 666</span>  <span class="keywordflow">for</span> (i = 0; i < word_res-><a class="code" href="a02542.html#ae24eb58be06cf275aee411d947fd31ef">reject_map</a>.<a class="code" href="a02618.html#adb462d55dc4b682e0a77090185a58011">length</a>(); ++i) {</div><div class="line"><a name="l00667"></a><span class="lineno"> 667</span>  <span class="keywordflow">if</span> (word_res-><a class="code" href="a02542.html#a3d42ac7ec121263e757c9b7160dfd50d">best_choice</a>-><a class="code" href="a02606.html#a76b18095a88a05db299aa84451a5f52c">unichar_id</a>(i) == unichar_tilde) {</div><div class="line"><a name="l00668"></a><span class="lineno"> 668</span>  word_res-><a class="code" href="a02542.html#a3d42ac7ec121263e757c9b7160dfd50d">best_choice</a>-><a class="code" href="a02606.html#a8238d436806c40b2e01b9659dfab5eb3">set_unichar_id</a>(unichar_dash, i);</div><div class="line"><a name="l00669"></a><span class="lineno"> 669</span>  <span class="keywordflow">if</span> (word_res-><a class="code" href="a02542.html#ae24eb58be06cf275aee411d947fd31ef">reject_map</a>[i].accepted ())</div><div class="line"><a name="l00670"></a><span class="lineno"> 670</span>  word_res-><a class="code" href="a02542.html#ae24eb58be06cf275aee411d947fd31ef">reject_map</a>[i].setrej_unlv_rej ();</div><div class="line"><a name="l00671"></a><span class="lineno"> 671</span>  }</div><div class="line"><a name="l00672"></a><span class="lineno"> 672</span>  <span class="keywordflow">if</span> (word_res-><a class="code" href="a02542.html#a3d42ac7ec121263e757c9b7160dfd50d">best_choice</a>-><a class="code" href="a02606.html#a76b18095a88a05db299aa84451a5f52c">unichar_id</a>(i) == unichar_pow) {</div><div class="line"><a name="l00673"></a><span class="lineno"> 673</span>  word_res-><a class="code" href="a02542.html#a3d42ac7ec121263e757c9b7160dfd50d">best_choice</a>-><a class="code" href="a02606.html#a8238d436806c40b2e01b9659dfab5eb3">set_unichar_id</a>(unichar_space, i);</div><div class="line"><a name="l00674"></a><span class="lineno"> 674</span>  <span class="keywordflow">if</span> (word_res-><a class="code" href="a02542.html#ae24eb58be06cf275aee411d947fd31ef">reject_map</a>[i].accepted ())</div><div class="line"><a name="l00675"></a><span class="lineno"> 675</span>  word_res-><a class="code" href="a02542.html#ae24eb58be06cf275aee411d947fd31ef">reject_map</a>[i].setrej_unlv_rej ();</div><div class="line"><a name="l00676"></a><span class="lineno"> 676</span>  }</div><div class="line"><a name="l00677"></a><span class="lineno"> 677</span>  }</div><div class="line"><a name="l00678"></a><span class="lineno"> 678</span> }</div><div class="line"><a name="l00679"></a><span class="lineno"> 679</span> </div><div class="line"><a name="l00680"></a><span class="lineno"><a class="line" href="a02358.html#afad44e1105d7f57e1a99d9076c4a3b25"> 680</a></span> <a class="code" href="a00080.html#ac4a411895d63e3bb0bea788e92894d42">GARBAGE_LEVEL</a> <a class="code" href="a02358.html#afad44e1105d7f57e1a99d9076c4a3b25">Tesseract::garbage_word</a>(<a class="code" href="a02542.html">WERD_RES</a> *word, <a class="code" href="a00530.html#a865cbe4908be24ccc32d2fbd598281d0">BOOL8</a> ok_dict_word) {</div><div class="line"><a name="l00681"></a><span class="lineno"> 681</span>  <span class="keyword">enum</span> STATES</div><div class="line"><a name="l00682"></a><span class="lineno"> 682</span>  {</div><div class="line"><a name="l00683"></a><span class="lineno"> 683</span>  JUNK,</div><div class="line"><a name="l00684"></a><span class="lineno"> 684</span>  FIRST_UPPER,</div><div class="line"><a name="l00685"></a><span class="lineno"> 685</span>  FIRST_LOWER,</div><div class="line"><a name="l00686"></a><span class="lineno"> 686</span>  FIRST_NUM,</div><div class="line"><a name="l00687"></a><span class="lineno"> 687</span>  SUBSEQUENT_UPPER,</div><div class="line"><a name="l00688"></a><span class="lineno"> 688</span>  SUBSEQUENT_LOWER,</div><div class="line"><a name="l00689"></a><span class="lineno"> 689</span>  SUBSEQUENT_NUM</div><div class="line"><a name="l00690"></a><span class="lineno"> 690</span>  };</div><div class="line"><a name="l00691"></a><span class="lineno"> 691</span>  <span class="keyword">const</span> <span class="keywordtype">char</span> *str = word-><a class="code" href="a02542.html#a3d42ac7ec121263e757c9b7160dfd50d">best_choice</a>-><a class="code" href="a02606.html#adf200132afabc2ee6ec256e516011007">unichar_string</a>().<a class="code" href="a02834.html#abf0a7b3c6ae39a46e5441f28f61de5de">string</a>();</div><div class="line"><a name="l00692"></a><span class="lineno"> 692</span>  <span class="keyword">const</span> <span class="keywordtype">char</span> *lengths = word-><a class="code" href="a02542.html#a3d42ac7ec121263e757c9b7160dfd50d">best_choice</a>-><a class="code" href="a02606.html#adaecd80cfe44e00e9c4647859b1c87e0">unichar_lengths</a>().<a class="code" href="a02834.html#abf0a7b3c6ae39a46e5441f28f61de5de">string</a>();</div><div class="line"><a name="l00693"></a><span class="lineno"> 693</span>  STATES state = JUNK;</div><div class="line"><a name="l00694"></a><span class="lineno"> 694</span>  <span class="keywordtype">int</span> len = 0;</div><div class="line"><a name="l00695"></a><span class="lineno"> 695</span>  <span class="keywordtype">int</span> isolated_digits = 0;</div><div class="line"><a name="l00696"></a><span class="lineno"> 696</span>  <span class="keywordtype">int</span> isolated_alphas = 0;</div><div class="line"><a name="l00697"></a><span class="lineno"> 697</span>  <span class="keywordtype">int</span> bad_char_count = 0;</div><div class="line"><a name="l00698"></a><span class="lineno"> 698</span>  <span class="keywordtype">int</span> tess_rejs = 0;</div><div class="line"><a name="l00699"></a><span class="lineno"> 699</span>  <span class="keywordtype">int</span> dodgy_chars = 0;</div><div class="line"><a name="l00700"></a><span class="lineno"> 700</span>  <span class="keywordtype">int</span> ok_chars;</div><div class="line"><a name="l00701"></a><span class="lineno"> 701</span>  <a class="code" href="a00605.html#afedceee7ea132dae3d224db2cf8b5618">UNICHAR_ID</a> last_char = -1;</div><div class="line"><a name="l00702"></a><span class="lineno"> 702</span>  <span class="keywordtype">int</span> alpha_repetition_count = 0;</div><div class="line"><a name="l00703"></a><span class="lineno"> 703</span>  <span class="keywordtype">int</span> longest_alpha_repetition_count = 0;</div><div class="line"><a name="l00704"></a><span class="lineno"> 704</span>  <span class="keywordtype">int</span> longest_lower_run_len = 0;</div><div class="line"><a name="l00705"></a><span class="lineno"> 705</span>  <span class="keywordtype">int</span> lower_string_count = 0;</div><div class="line"><a name="l00706"></a><span class="lineno"> 706</span>  <span class="keywordtype">int</span> longest_upper_run_len = 0;</div><div class="line"><a name="l00707"></a><span class="lineno"> 707</span>  <span class="keywordtype">int</span> upper_string_count = 0;</div><div class="line"><a name="l00708"></a><span class="lineno"> 708</span>  <span class="keywordtype">int</span> total_alpha_count = 0;</div><div class="line"><a name="l00709"></a><span class="lineno"> 709</span>  <span class="keywordtype">int</span> total_digit_count = 0;</div><div class="line"><a name="l00710"></a><span class="lineno"> 710</span> </div><div class="line"><a name="l00711"></a><span class="lineno"> 711</span>  <span class="keywordflow">for</span> (; *str != <span class="charliteral">'\0'</span>; str += *(lengths++)) {</div><div class="line"><a name="l00712"></a><span class="lineno"> 712</span>  len++;</div><div class="line"><a name="l00713"></a><span class="lineno"> 713</span>  <span class="keywordflow">if</span> (word-><a class="code" href="a02542.html#a053a2aeeddc26a93a41a04fa08dd688a">uch_set</a>-><a class="code" href="a03950.html#a55071e756e234d8c51ca08079c1847cd">get_isupper</a> (str, *lengths)) {</div><div class="line"><a name="l00714"></a><span class="lineno"> 714</span>  total_alpha_count++;</div><div class="line"><a name="l00715"></a><span class="lineno"> 715</span>  <span class="keywordflow">switch</span> (state) {</div><div class="line"><a name="l00716"></a><span class="lineno"> 716</span>  <span class="keywordflow">case</span> SUBSEQUENT_UPPER:</div><div class="line"><a name="l00717"></a><span class="lineno"> 717</span>  <span class="keywordflow">case</span> FIRST_UPPER:</div><div class="line"><a name="l00718"></a><span class="lineno"> 718</span>  state = SUBSEQUENT_UPPER;</div><div class="line"><a name="l00719"></a><span class="lineno"> 719</span>  upper_string_count++;</div><div class="line"><a name="l00720"></a><span class="lineno"> 720</span>  <span class="keywordflow">if</span> (longest_upper_run_len < upper_string_count)</div><div class="line"><a name="l00721"></a><span class="lineno"> 721</span>  longest_upper_run_len = upper_string_count;</div><div class="line"><a name="l00722"></a><span class="lineno"> 722</span>  <span class="keywordflow">if</span> (last_char == word-><a class="code" href="a02542.html#a053a2aeeddc26a93a41a04fa08dd688a">uch_set</a>-><a class="code" href="a03950.html#aeb2253dcb5f01c81fcba5f4af417eadf">unichar_to_id</a>(str, *lengths)) {</div><div class="line"><a name="l00723"></a><span class="lineno"> 723</span>  alpha_repetition_count++;</div><div class="line"><a name="l00724"></a><span class="lineno"> 724</span>  <span class="keywordflow">if</span> (longest_alpha_repetition_count < alpha_repetition_count) {</div><div class="line"><a name="l00725"></a><span class="lineno"> 725</span>  longest_alpha_repetition_count = alpha_repetition_count;</div><div class="line"><a name="l00726"></a><span class="lineno"> 726</span>  }</div><div class="line"><a name="l00727"></a><span class="lineno"> 727</span>  }</div><div class="line"><a name="l00728"></a><span class="lineno"> 728</span>  <span class="keywordflow">else</span> {</div><div class="line"><a name="l00729"></a><span class="lineno"> 729</span>  last_char = word-><a class="code" href="a02542.html#a053a2aeeddc26a93a41a04fa08dd688a">uch_set</a>-><a class="code" href="a03950.html#aeb2253dcb5f01c81fcba5f4af417eadf">unichar_to_id</a>(str, *lengths);</div><div class="line"><a name="l00730"></a><span class="lineno"> 730</span>  alpha_repetition_count = 1;</div><div class="line"><a name="l00731"></a><span class="lineno"> 731</span>  }</div><div class="line"><a name="l00732"></a><span class="lineno"> 732</span>  <span class="keywordflow">break</span>;</div><div class="line"><a name="l00733"></a><span class="lineno"> 733</span>  <span class="keywordflow">case</span> FIRST_NUM:</div><div class="line"><a name="l00734"></a><span class="lineno"> 734</span>  isolated_digits++;</div><div class="line"><a name="l00735"></a><span class="lineno"> 735</span>  <span class="keywordflow">default</span>:</div><div class="line"><a name="l00736"></a><span class="lineno"> 736</span>  state = FIRST_UPPER;</div><div class="line"><a name="l00737"></a><span class="lineno"> 737</span>  last_char = word-><a class="code" href="a02542.html#a053a2aeeddc26a93a41a04fa08dd688a">uch_set</a>-><a class="code" href="a03950.html#aeb2253dcb5f01c81fcba5f4af417eadf">unichar_to_id</a>(str, *lengths);</div><div class="line"><a name="l00738"></a><span class="lineno"> 738</span>  alpha_repetition_count = 1;</div><div class="line"><a name="l00739"></a><span class="lineno"> 739</span>  upper_string_count = 1;</div><div class="line"><a name="l00740"></a><span class="lineno"> 740</span>  <span class="keywordflow">break</span>;</div><div class="line"><a name="l00741"></a><span class="lineno"> 741</span>  }</div><div class="line"><a name="l00742"></a><span class="lineno"> 742</span>  }</div><div class="line"><a name="l00743"></a><span class="lineno"> 743</span>  <span class="keywordflow">else</span> <span class="keywordflow">if</span> (word-><a class="code" href="a02542.html#a053a2aeeddc26a93a41a04fa08dd688a">uch_set</a>-><a class="code" href="a03950.html#afb472ed816e5f312692fa670f56dceb6">get_islower</a> (str, *lengths)) {</div><div class="line"><a name="l00744"></a><span class="lineno"> 744</span>  total_alpha_count++;</div><div class="line"><a name="l00745"></a><span class="lineno"> 745</span>  <span class="keywordflow">switch</span> (state) {</div><div class="line"><a name="l00746"></a><span class="lineno"> 746</span>  <span class="keywordflow">case</span> SUBSEQUENT_LOWER:</div><div class="line"><a name="l00747"></a><span class="lineno"> 747</span>  <span class="keywordflow">case</span> FIRST_LOWER:</div><div class="line"><a name="l00748"></a><span class="lineno"> 748</span>  state = SUBSEQUENT_LOWER;</div><div class="line"><a name="l00749"></a><span class="lineno"> 749</span>  lower_string_count++;</div><div class="line"><a name="l00750"></a><span class="lineno"> 750</span>  <span class="keywordflow">if</span> (longest_lower_run_len < lower_string_count)</div><div class="line"><a name="l00751"></a><span class="lineno"> 751</span>  longest_lower_run_len = lower_string_count;</div><div class="line"><a name="l00752"></a><span class="lineno"> 752</span>  <span class="keywordflow">if</span> (last_char == word-><a class="code" href="a02542.html#a053a2aeeddc26a93a41a04fa08dd688a">uch_set</a>-><a class="code" href="a03950.html#aeb2253dcb5f01c81fcba5f4af417eadf">unichar_to_id</a>(str, *lengths)) {</div><div class="line"><a name="l00753"></a><span class="lineno"> 753</span>  alpha_repetition_count++;</div><div class="line"><a name="l00754"></a><span class="lineno"> 754</span>  <span class="keywordflow">if</span> (longest_alpha_repetition_count < alpha_repetition_count) {</div><div class="line"><a name="l00755"></a><span class="lineno"> 755</span>  longest_alpha_repetition_count = alpha_repetition_count;</div><div class="line"><a name="l00756"></a><span class="lineno"> 756</span>  }</div><div class="line"><a name="l00757"></a><span class="lineno"> 757</span>  }</div><div class="line"><a name="l00758"></a><span class="lineno"> 758</span>  <span class="keywordflow">else</span> {</div><div class="line"><a name="l00759"></a><span class="lineno"> 759</span>  last_char = word-><a class="code" href="a02542.html#a053a2aeeddc26a93a41a04fa08dd688a">uch_set</a>-><a class="code" href="a03950.html#aeb2253dcb5f01c81fcba5f4af417eadf">unichar_to_id</a>(str, *lengths);</div><div class="line"><a name="l00760"></a><span class="lineno"> 760</span>  alpha_repetition_count = 1;</div><div class="line"><a name="l00761"></a><span class="lineno"> 761</span>  }</div><div class="line"><a name="l00762"></a><span class="lineno"> 762</span>  <span class="keywordflow">break</span>;</div><div class="line"><a name="l00763"></a><span class="lineno"> 763</span>  <span class="keywordflow">case</span> FIRST_NUM:</div><div class="line"><a name="l00764"></a><span class="lineno"> 764</span>  isolated_digits++;</div><div class="line"><a name="l00765"></a><span class="lineno"> 765</span>  <span class="keywordflow">default</span>:</div><div class="line"><a name="l00766"></a><span class="lineno"> 766</span>  state = FIRST_LOWER;</div><div class="line"><a name="l00767"></a><span class="lineno"> 767</span>  last_char = word-><a class="code" href="a02542.html#a053a2aeeddc26a93a41a04fa08dd688a">uch_set</a>-><a class="code" href="a03950.html#aeb2253dcb5f01c81fcba5f4af417eadf">unichar_to_id</a>(str, *lengths);</div><div class="line"><a name="l00768"></a><span class="lineno"> 768</span>  alpha_repetition_count = 1;</div><div class="line"><a name="l00769"></a><span class="lineno"> 769</span>  lower_string_count = 1;</div><div class="line"><a name="l00770"></a><span class="lineno"> 770</span>  <span class="keywordflow">break</span>;</div><div class="line"><a name="l00771"></a><span class="lineno"> 771</span>  }</div><div class="line"><a name="l00772"></a><span class="lineno"> 772</span>  }</div><div class="line"><a name="l00773"></a><span class="lineno"> 773</span>  <span class="keywordflow">else</span> <span class="keywordflow">if</span> (word-><a class="code" href="a02542.html#a053a2aeeddc26a93a41a04fa08dd688a">uch_set</a>-><a class="code" href="a03950.html#a98079b3ce062183388c653eee9838e3c">get_isdigit</a> (str, *lengths)) {</div><div class="line"><a name="l00774"></a><span class="lineno"> 774</span>  total_digit_count++;</div><div class="line"><a name="l00775"></a><span class="lineno"> 775</span>  <span class="keywordflow">switch</span> (state) {</div><div class="line"><a name="l00776"></a><span class="lineno"> 776</span>  <span class="keywordflow">case</span> FIRST_NUM:</div><div class="line"><a name="l00777"></a><span class="lineno"> 777</span>  state = SUBSEQUENT_NUM;</div><div class="line"><a name="l00778"></a><span class="lineno"> 778</span>  <span class="keywordflow">case</span> SUBSEQUENT_NUM:</div><div class="line"><a name="l00779"></a><span class="lineno"> 779</span>  <span class="keywordflow">break</span>;</div><div class="line"><a name="l00780"></a><span class="lineno"> 780</span>  <span class="keywordflow">case</span> FIRST_UPPER:</div><div class="line"><a name="l00781"></a><span class="lineno"> 781</span>  <span class="keywordflow">case</span> FIRST_LOWER:</div><div class="line"><a name="l00782"></a><span class="lineno"> 782</span>  isolated_alphas++;</div><div class="line"><a name="l00783"></a><span class="lineno"> 783</span>  <span class="keywordflow">default</span>:</div><div class="line"><a name="l00784"></a><span class="lineno"> 784</span>  state = FIRST_NUM;</div><div class="line"><a name="l00785"></a><span class="lineno"> 785</span>  <span class="keywordflow">break</span>;</div><div class="line"><a name="l00786"></a><span class="lineno"> 786</span>  }</div><div class="line"><a name="l00787"></a><span class="lineno"> 787</span>  }</div><div class="line"><a name="l00788"></a><span class="lineno"> 788</span>  <span class="keywordflow">else</span> {</div><div class="line"><a name="l00789"></a><span class="lineno"> 789</span>  <span class="keywordflow">if</span> (*lengths == 1 && *str == <span class="charliteral">' '</span>)</div><div class="line"><a name="l00790"></a><span class="lineno"> 790</span>  tess_rejs++;</div><div class="line"><a name="l00791"></a><span class="lineno"> 791</span>  <span class="keywordflow">else</span></div><div class="line"><a name="l00792"></a><span class="lineno"> 792</span>  bad_char_count++;</div><div class="line"><a name="l00793"></a><span class="lineno"> 793</span>  <span class="keywordflow">switch</span> (state) {</div><div class="line"><a name="l00794"></a><span class="lineno"> 794</span>  <span class="keywordflow">case</span> FIRST_NUM:</div><div class="line"><a name="l00795"></a><span class="lineno"> 795</span>  isolated_digits++;</div><div class="line"><a name="l00796"></a><span class="lineno"> 796</span>  <span class="keywordflow">break</span>;</div><div class="line"><a name="l00797"></a><span class="lineno"> 797</span>  <span class="keywordflow">case</span> FIRST_UPPER:</div><div class="line"><a name="l00798"></a><span class="lineno"> 798</span>  <span class="keywordflow">case</span> FIRST_LOWER:</div><div class="line"><a name="l00799"></a><span class="lineno"> 799</span>  isolated_alphas++;</div><div class="line"><a name="l00800"></a><span class="lineno"> 800</span>  <span class="keywordflow">default</span>:</div><div class="line"><a name="l00801"></a><span class="lineno"> 801</span>  <span class="keywordflow">break</span>;</div><div class="line"><a name="l00802"></a><span class="lineno"> 802</span>  }</div><div class="line"><a name="l00803"></a><span class="lineno"> 803</span>  state = JUNK;</div><div class="line"><a name="l00804"></a><span class="lineno"> 804</span>  }</div><div class="line"><a name="l00805"></a><span class="lineno"> 805</span>  }</div><div class="line"><a name="l00806"></a><span class="lineno"> 806</span> </div><div class="line"><a name="l00807"></a><span class="lineno"> 807</span>  <span class="keywordflow">switch</span> (state) {</div><div class="line"><a name="l00808"></a><span class="lineno"> 808</span>  <span class="keywordflow">case</span> FIRST_NUM:</div><div class="line"><a name="l00809"></a><span class="lineno"> 809</span>  isolated_digits++;</div><div class="line"><a name="l00810"></a><span class="lineno"> 810</span>  <span class="keywordflow">break</span>;</div><div class="line"><a name="l00811"></a><span class="lineno"> 811</span>  <span class="keywordflow">case</span> FIRST_UPPER:</div><div class="line"><a name="l00812"></a><span class="lineno"> 812</span>  <span class="keywordflow">case</span> FIRST_LOWER:</div><div class="line"><a name="l00813"></a><span class="lineno"> 813</span>  isolated_alphas++;</div><div class="line"><a name="l00814"></a><span class="lineno"> 814</span>  <span class="keywordflow">default</span>:</div><div class="line"><a name="l00815"></a><span class="lineno"> 815</span>  <span class="keywordflow">break</span>;</div><div class="line"><a name="l00816"></a><span class="lineno"> 816</span>  }</div><div class="line"><a name="l00817"></a><span class="lineno"> 817</span> </div><div class="line"><a name="l00818"></a><span class="lineno"> 818</span>  <span class="keywordflow">if</span> (<a class="code" href="a02358.html#a260642901c32784e997473bc298346cc">crunch_include_numerals</a>) {</div><div class="line"><a name="l00819"></a><span class="lineno"> 819</span>  total_alpha_count += total_digit_count - isolated_digits;</div><div class="line"><a name="l00820"></a><span class="lineno"> 820</span>  }</div><div class="line"><a name="l00821"></a><span class="lineno"> 821</span> </div><div class="line"><a name="l00822"></a><span class="lineno"> 822</span>  <span class="keywordflow">if</span> (<a class="code" href="a02358.html#a267ae2256478e0caa24cc4eda6f78afa">crunch_leave_ok_strings</a> && len >= 4 &&</div><div class="line"><a name="l00823"></a><span class="lineno"> 823</span>  2 * (total_alpha_count - isolated_alphas) > len &&</div><div class="line"><a name="l00824"></a><span class="lineno"> 824</span>  longest_alpha_repetition_count < <a class="code" href="a02358.html#a2cba6d61cfdced5bdea7461938b45c72">crunch_long_repetitions</a>) {</div><div class="line"><a name="l00825"></a><span class="lineno"> 825</span>  <span class="keywordflow">if</span> ((<a class="code" href="a02358.html#a0fc0f88a88d8cf4837c6b85ab9f1fd00">crunch_accept_ok</a> &&</div><div class="line"><a name="l00826"></a><span class="lineno"> 826</span>  <a class="code" href="a02358.html#a51f2ad8b2d849d90bbcfbfca3067c0f1">acceptable_word_string</a>(*word-><a class="code" href="a02542.html#a053a2aeeddc26a93a41a04fa08dd688a">uch_set</a>, str, lengths) !=</div><div class="line"><a name="l00827"></a><span class="lineno"> 827</span>  <a class="code" href="a00074.html#af9ff5a7d7a1b9eeea7ce4106bffa7eeeaab0741a5a5ff9757ca343af255353ba0">AC_UNACCEPTABLE</a>) ||</div><div class="line"><a name="l00828"></a><span class="lineno"> 828</span>  longest_lower_run_len > <a class="code" href="a02358.html#a62ab8881690e98143d62f1ac528041f8">crunch_leave_lc_strings</a> ||</div><div class="line"><a name="l00829"></a><span class="lineno"> 829</span>  longest_upper_run_len > <a class="code" href="a02358.html#a557bc470ec0edc0bd11b4fb3432b2266">crunch_leave_uc_strings</a>)</div><div class="line"><a name="l00830"></a><span class="lineno"> 830</span>  <span class="keywordflow">return</span> <a class="code" href="a00080.html#ac4a411895d63e3bb0bea788e92894d42ac744add072d392855d098a995acb3751">G_NEVER_CRUNCH</a>;</div><div class="line"><a name="l00831"></a><span class="lineno"> 831</span>  }</div><div class="line"><a name="l00832"></a><span class="lineno"> 832</span>  <span class="keywordflow">if</span> (word-><a class="code" href="a02542.html#ae24eb58be06cf275aee411d947fd31ef">reject_map</a>.<a class="code" href="a02618.html#adb462d55dc4b682e0a77090185a58011">length</a>() > 1 &&</div><div class="line"><a name="l00833"></a><span class="lineno"> 833</span>  strpbrk(str, <span class="stringliteral">" "</span>) == <span class="keyword">nullptr</span> &&</div><div class="line"><a name="l00834"></a><span class="lineno"> 834</span>  (word-><a class="code" href="a02542.html#a3d42ac7ec121263e757c9b7160dfd50d">best_choice</a>-><a class="code" href="a02606.html#a7a606dd5236e78662fccade85d23edee">permuter</a>() == <a class="code" href="a00401.html#a18e2c75cefe9e5b78e8ce41aa5fa25bca616bdbcaed7dd414823b303af5c8b1f1">SYSTEM_DAWG_PERM</a> ||</div><div class="line"><a name="l00835"></a><span class="lineno"> 835</span>  word-><a class="code" href="a02542.html#a3d42ac7ec121263e757c9b7160dfd50d">best_choice</a>-><a class="code" href="a02606.html#a7a606dd5236e78662fccade85d23edee">permuter</a>() == <a class="code" href="a00401.html#a18e2c75cefe9e5b78e8ce41aa5fa25bca4fd9d3b025ecc5ea8f2248fea29543e4">FREQ_DAWG_PERM</a> ||</div><div class="line"><a name="l00836"></a><span class="lineno"> 836</span>  word-><a class="code" href="a02542.html#a3d42ac7ec121263e757c9b7160dfd50d">best_choice</a>-><a class="code" href="a02606.html#a7a606dd5236e78662fccade85d23edee">permuter</a>() == <a class="code" href="a00401.html#a18e2c75cefe9e5b78e8ce41aa5fa25bca5e293e54fa687876197992131e779d54">USER_DAWG_PERM</a> ||</div><div class="line"><a name="l00837"></a><span class="lineno"> 837</span>  word-><a class="code" href="a02542.html#a3d42ac7ec121263e757c9b7160dfd50d">best_choice</a>-><a class="code" href="a02606.html#a7a606dd5236e78662fccade85d23edee">permuter</a>() == <a class="code" href="a00401.html#a18e2c75cefe9e5b78e8ce41aa5fa25bca809574e2067a5304fbd2279d869e9b24">NUMBER_PERM</a> ||</div><div class="line"><a name="l00838"></a><span class="lineno"> 838</span>  <a class="code" href="a02358.html#a51f2ad8b2d849d90bbcfbfca3067c0f1">acceptable_word_string</a>(*word-><a class="code" href="a02542.html#a053a2aeeddc26a93a41a04fa08dd688a">uch_set</a>, str, lengths) !=</div><div class="line"><a name="l00839"></a><span class="lineno"> 839</span>  <a class="code" href="a00074.html#af9ff5a7d7a1b9eeea7ce4106bffa7eeeaab0741a5a5ff9757ca343af255353ba0">AC_UNACCEPTABLE</a> || ok_dict_word))</div><div class="line"><a name="l00840"></a><span class="lineno"> 840</span>  <span class="keywordflow">return</span> <a class="code" href="a00080.html#ac4a411895d63e3bb0bea788e92894d42a46d03f2b7d080cc8319a43ef4bad82b3">G_OK</a>;</div><div class="line"><a name="l00841"></a><span class="lineno"> 841</span> </div><div class="line"><a name="l00842"></a><span class="lineno"> 842</span>  ok_chars = len - bad_char_count - isolated_digits -</div><div class="line"><a name="l00843"></a><span class="lineno"> 843</span>  isolated_alphas - tess_rejs;</div><div class="line"><a name="l00844"></a><span class="lineno"> 844</span> </div><div class="line"><a name="l00845"></a><span class="lineno"> 845</span>  <span class="keywordflow">if</span> (<a class="code" href="a02358.html#a20a1206ce17b07676f829fdee0034eb5">crunch_debug</a> > 3) {</div><div class="line"><a name="l00846"></a><span class="lineno"> 846</span>  <a class="code" href="a00596.html#a0c2bcd4462ec67ab0971b34a0f610f55">tprintf</a>(<span class="stringliteral">"garbage_word: \"%s\"\n"</span>,</div><div class="line"><a name="l00847"></a><span class="lineno"> 847</span>  word-><a class="code" href="a02542.html#a3d42ac7ec121263e757c9b7160dfd50d">best_choice</a>-><a class="code" href="a02606.html#adf200132afabc2ee6ec256e516011007">unichar_string</a>().<a class="code" href="a02834.html#abf0a7b3c6ae39a46e5441f28f61de5de">string</a>());</div><div class="line"><a name="l00848"></a><span class="lineno"> 848</span>  <a class="code" href="a00596.html#a0c2bcd4462ec67ab0971b34a0f610f55">tprintf</a>(<span class="stringliteral">"LEN: %d bad: %d iso_N: %d iso_A: %d rej: %d\n"</span>,</div><div class="line"><a name="l00849"></a><span class="lineno"> 849</span>  len,</div><div class="line"><a name="l00850"></a><span class="lineno"> 850</span>  bad_char_count, isolated_digits, isolated_alphas, tess_rejs);</div><div class="line"><a name="l00851"></a><span class="lineno"> 851</span>  }</div><div class="line"><a name="l00852"></a><span class="lineno"> 852</span>  <span class="keywordflow">if</span> (bad_char_count == 0 &&</div><div class="line"><a name="l00853"></a><span class="lineno"> 853</span>  tess_rejs == 0 &&</div><div class="line"><a name="l00854"></a><span class="lineno"> 854</span>  (len > isolated_digits + isolated_alphas || len <= 2))</div><div class="line"><a name="l00855"></a><span class="lineno"> 855</span>  <span class="keywordflow">return</span> <a class="code" href="a00080.html#ac4a411895d63e3bb0bea788e92894d42a46d03f2b7d080cc8319a43ef4bad82b3">G_OK</a>;</div><div class="line"><a name="l00856"></a><span class="lineno"> 856</span> </div><div class="line"><a name="l00857"></a><span class="lineno"> 857</span>  <span class="keywordflow">if</span> (tess_rejs > ok_chars ||</div><div class="line"><a name="l00858"></a><span class="lineno"> 858</span>  (tess_rejs > 0 && (bad_char_count + tess_rejs) * 2 > len))</div><div class="line"><a name="l00859"></a><span class="lineno"> 859</span>  <span class="keywordflow">return</span> <a class="code" href="a00080.html#ac4a411895d63e3bb0bea788e92894d42a2400fb7991d9c94896464522e10c49ad">G_TERRIBLE</a>;</div><div class="line"><a name="l00860"></a><span class="lineno"> 860</span> </div><div class="line"><a name="l00861"></a><span class="lineno"> 861</span>  <span class="keywordflow">if</span> (len > 4) {</div><div class="line"><a name="l00862"></a><span class="lineno"> 862</span>  dodgy_chars = 2 * tess_rejs + bad_char_count + isolated_digits +</div><div class="line"><a name="l00863"></a><span class="lineno"> 863</span>  isolated_alphas;</div><div class="line"><a name="l00864"></a><span class="lineno"> 864</span>  <span class="keywordflow">if</span> (dodgy_chars > 5 || (dodgy_chars / (<span class="keywordtype">float</span>) len) > 0.5)</div><div class="line"><a name="l00865"></a><span class="lineno"> 865</span>  <span class="keywordflow">return</span> <a class="code" href="a00080.html#ac4a411895d63e3bb0bea788e92894d42a17acba0fc01478524c8214f0da82815a">G_DODGY</a>;</div><div class="line"><a name="l00866"></a><span class="lineno"> 866</span>  <span class="keywordflow">else</span></div><div class="line"><a name="l00867"></a><span class="lineno"> 867</span>  <span class="keywordflow">return</span> <a class="code" href="a00080.html#ac4a411895d63e3bb0bea788e92894d42a46d03f2b7d080cc8319a43ef4bad82b3">G_OK</a>;</div><div class="line"><a name="l00868"></a><span class="lineno"> 868</span>  } <span class="keywordflow">else</span> {</div><div class="line"><a name="l00869"></a><span class="lineno"> 869</span>  dodgy_chars = 2 * tess_rejs + bad_char_count;</div><div class="line"><a name="l00870"></a><span class="lineno"> 870</span>  <span class="keywordflow">if</span> ((len == 4 && dodgy_chars > 2) ||</div><div class="line"><a name="l00871"></a><span class="lineno"> 871</span>  (len == 3 && dodgy_chars > 2) || dodgy_chars >= len)</div><div class="line"><a name="l00872"></a><span class="lineno"> 872</span>  <span class="keywordflow">return</span> <a class="code" href="a00080.html#ac4a411895d63e3bb0bea788e92894d42a17acba0fc01478524c8214f0da82815a">G_DODGY</a>;</div><div class="line"><a name="l00873"></a><span class="lineno"> 873</span>  <span class="keywordflow">else</span></div><div class="line"><a name="l00874"></a><span class="lineno"> 874</span>  <span class="keywordflow">return</span> <a class="code" href="a00080.html#ac4a411895d63e3bb0bea788e92894d42a46d03f2b7d080cc8319a43ef4bad82b3">G_OK</a>;</div><div class="line"><a name="l00875"></a><span class="lineno"> 875</span>  }</div><div class="line"><a name="l00876"></a><span class="lineno"> 876</span> }</div><div class="line"><a name="l00877"></a><span class="lineno"> 877</span> </div><div class="line"><a name="l00878"></a><span class="lineno"> 878</span> </div><div class="line"><a name="l00879"></a><span class="lineno"> 879</span> <span class="comment">/*************************************************************************</span></div><div class="line"><a name="l00880"></a><span class="lineno"> 880</span> <span class="comment"> * word_deletable()</span></div><div class="line"><a name="l00881"></a><span class="lineno"> 881</span> <span class="comment"> * DELETE WERDS AT ENDS OF ROWS IF</span></div><div class="line"><a name="l00882"></a><span class="lineno"> 882</span> <span class="comment"> * Word is crunched &&</span></div><div class="line"><a name="l00883"></a><span class="lineno"> 883</span> <span class="comment"> * ( string length = 0 OR</span></div><div class="line"><a name="l00884"></a><span class="lineno"> 884</span> <span class="comment"> * > 50% of chars are "|" (before merging) OR</span></div><div class="line"><a name="l00885"></a><span class="lineno"> 885</span> <span class="comment"> * certainty < -10 OR</span></div><div class="line"><a name="l00886"></a><span class="lineno"> 886</span> <span class="comment"> * rating /char > 60 OR</span></div><div class="line"><a name="l00887"></a><span class="lineno"> 887</span> <span class="comment"> * TOP of word is more than 0.5 xht BELOW baseline OR</span></div><div class="line"><a name="l00888"></a><span class="lineno"> 888</span> <span class="comment"> * BOTTOM of word is more than 0.5 xht ABOVE xht OR</span></div><div class="line"><a name="l00889"></a><span class="lineno"> 889</span> <span class="comment"> * length of word < 3xht OR</span></div><div class="line"><a name="l00890"></a><span class="lineno"> 890</span> <span class="comment"> * height of word < 0.7 xht OR</span></div><div class="line"><a name="l00891"></a><span class="lineno"> 891</span> <span class="comment"> * height of word > 3.0 xht OR</span></div><div class="line"><a name="l00892"></a><span class="lineno"> 892</span> <span class="comment"> * >75% of the outline BBs have longest dimension < 0.5xht</span></div><div class="line"><a name="l00893"></a><span class="lineno"> 893</span> <span class="comment"> *************************************************************************/</span></div><div class="line"><a name="l00894"></a><span class="lineno"> 894</span> </div><div class="line"><a name="l00895"></a><span class="lineno"><a class="line" href="a02358.html#add8f08bb0c03f69c777d38e82cb88770"> 895</a></span> <a class="code" href="a00344.html#affc9a96d31e23e645355e534f11c40e9">CRUNCH_MODE</a> <a class="code" href="a02358.html#add8f08bb0c03f69c777d38e82cb88770">Tesseract::word_deletable</a>(<a class="code" href="a02542.html">WERD_RES</a> *word, int16_t &delete_mode) {</div><div class="line"><a name="l00896"></a><span class="lineno"> 896</span>  <span class="keywordtype">int</span> word_len = word-><a class="code" href="a02542.html#ae24eb58be06cf275aee411d947fd31ef">reject_map</a>.<a class="code" href="a02618.html#adb462d55dc4b682e0a77090185a58011">length</a> ();</div><div class="line"><a name="l00897"></a><span class="lineno"> 897</span>  <span class="keywordtype">float</span> rating_per_ch;</div><div class="line"><a name="l00898"></a><span class="lineno"> 898</span>  <a class="code" href="a02610.html">TBOX</a> box; <span class="comment">//BB of word</span></div><div class="line"><a name="l00899"></a><span class="lineno"> 899</span> </div><div class="line"><a name="l00900"></a><span class="lineno"> 900</span>  <span class="keywordflow">if</span> (word-><a class="code" href="a02542.html#a82d32a9f59bc1c08da9537303c56615b">unlv_crunch_mode</a> == <a class="code" href="a00344.html#affc9a96d31e23e645355e534f11c40e9a1eac25752f2c55f1809d11d4ef917ff9">CR_NONE</a>) {</div><div class="line"><a name="l00901"></a><span class="lineno"> 901</span>  delete_mode = 0;</div><div class="line"><a name="l00902"></a><span class="lineno"> 902</span>  <span class="keywordflow">return</span> <a class="code" href="a00344.html#affc9a96d31e23e645355e534f11c40e9a1eac25752f2c55f1809d11d4ef917ff9">CR_NONE</a>;</div><div class="line"><a name="l00903"></a><span class="lineno"> 903</span>  }</div><div class="line"><a name="l00904"></a><span class="lineno"> 904</span> </div><div class="line"><a name="l00905"></a><span class="lineno"> 905</span>  <span class="keywordflow">if</span> (word_len == 0) {</div><div class="line"><a name="l00906"></a><span class="lineno"> 906</span>  delete_mode = 1;</div><div class="line"><a name="l00907"></a><span class="lineno"> 907</span>  <span class="keywordflow">return</span> <a class="code" href="a00344.html#affc9a96d31e23e645355e534f11c40e9a1799c83261446306e1d1527f1779d6a4">CR_DELETE</a>;</div><div class="line"><a name="l00908"></a><span class="lineno"> 908</span>  }</div><div class="line"><a name="l00909"></a><span class="lineno"> 909</span> </div><div class="line"><a name="l00910"></a><span class="lineno"> 910</span>  <span class="keywordflow">if</span> (word-><a class="code" href="a02542.html#a211ab5c5a13123ee7bdc7459d3363f9d">rebuild_word</a> != <span class="keyword">nullptr</span>) {</div><div class="line"><a name="l00911"></a><span class="lineno"> 911</span>  <span class="comment">// Cube leaves rebuild_word nullptr.</span></div><div class="line"><a name="l00912"></a><span class="lineno"> 912</span>  box = word-><a class="code" href="a02542.html#a211ab5c5a13123ee7bdc7459d3363f9d">rebuild_word</a>-><a class="code" href="a02402.html#abce755a2629864688cb259a780b01d24">bounding_box</a>();</div><div class="line"><a name="l00913"></a><span class="lineno"> 913</span>  <span class="keywordflow">if</span> (box.<a class="code" href="a02610.html#a72fcb736ed0ddeae95e6a51b3bf8d979">height</a> () < <a class="code" href="a02358.html#a40051cf485581289adcf04cc4733df41">crunch_del_min_ht</a> * <a class="code" href="a00314.html#af974e6755e636c8bc7cbe57e3bcbdd73">kBlnXHeight</a>) {</div><div class="line"><a name="l00914"></a><span class="lineno"> 914</span>  delete_mode = 4;</div><div class="line"><a name="l00915"></a><span class="lineno"> 915</span>  <span class="keywordflow">return</span> <a class="code" href="a00344.html#affc9a96d31e23e645355e534f11c40e9a1799c83261446306e1d1527f1779d6a4">CR_DELETE</a>;</div><div class="line"><a name="l00916"></a><span class="lineno"> 916</span>  }</div><div class="line"><a name="l00917"></a><span class="lineno"> 917</span> </div><div class="line"><a name="l00918"></a><span class="lineno"> 918</span>  <span class="keywordflow">if</span> (<a class="code" href="a02358.html#a691559e07c1664b55eaa73b68c065724">noise_outlines</a>(word-><a class="code" href="a02542.html#a211ab5c5a13123ee7bdc7459d3363f9d">rebuild_word</a>)) {</div><div class="line"><a name="l00919"></a><span class="lineno"> 919</span>  delete_mode = 5;</div><div class="line"><a name="l00920"></a><span class="lineno"> 920</span>  <span class="keywordflow">return</span> <a class="code" href="a00344.html#affc9a96d31e23e645355e534f11c40e9a1799c83261446306e1d1527f1779d6a4">CR_DELETE</a>;</div><div class="line"><a name="l00921"></a><span class="lineno"> 921</span>  }</div><div class="line"><a name="l00922"></a><span class="lineno"> 922</span>  }</div><div class="line"><a name="l00923"></a><span class="lineno"> 923</span> </div><div class="line"><a name="l00924"></a><span class="lineno"> 924</span>  <span class="keywordflow">if</span> ((<a class="code" href="a02358.html#a7179b612b7eb84a9603e2e6caacb09ee">failure_count</a> (word) * 1.5) > word_len) {</div><div class="line"><a name="l00925"></a><span class="lineno"> 925</span>  delete_mode = 2;</div><div class="line"><a name="l00926"></a><span class="lineno"> 926</span>  <span class="keywordflow">return</span> <a class="code" href="a00344.html#affc9a96d31e23e645355e534f11c40e9a223aec7f7b2d11193c90d04d8f589387">CR_LOOSE_SPACE</a>;</div><div class="line"><a name="l00927"></a><span class="lineno"> 927</span>  }</div><div class="line"><a name="l00928"></a><span class="lineno"> 928</span> </div><div class="line"><a name="l00929"></a><span class="lineno"> 929</span>  <span class="keywordflow">if</span> (word-><a class="code" href="a02542.html#a3d42ac7ec121263e757c9b7160dfd50d">best_choice</a>-><a class="code" href="a02606.html#acea3ee4af3377da8f4c10627e4ba42cf">certainty</a> () < <a class="code" href="a02358.html#a5c24b5ef1b42bebf68d3ab54acc94ccf">crunch_del_cert</a>) {</div><div class="line"><a name="l00930"></a><span class="lineno"> 930</span>  delete_mode = 7;</div><div class="line"><a name="l00931"></a><span class="lineno"> 931</span>  <span class="keywordflow">return</span> <a class="code" href="a00344.html#affc9a96d31e23e645355e534f11c40e9a223aec7f7b2d11193c90d04d8f589387">CR_LOOSE_SPACE</a>;</div><div class="line"><a name="l00932"></a><span class="lineno"> 932</span>  }</div><div class="line"><a name="l00933"></a><span class="lineno"> 933</span> </div><div class="line"><a name="l00934"></a><span class="lineno"> 934</span>  rating_per_ch = word-><a class="code" href="a02542.html#a3d42ac7ec121263e757c9b7160dfd50d">best_choice</a>-><a class="code" href="a02606.html#afa672748d2585eea64ab79592dd02eb3">rating</a> () / word_len;</div><div class="line"><a name="l00935"></a><span class="lineno"> 935</span> </div><div class="line"><a name="l00936"></a><span class="lineno"> 936</span>  <span class="keywordflow">if</span> (rating_per_ch > <a class="code" href="a02358.html#a10e3b50d7d9fc570d752d31b05d6971b">crunch_del_rating</a>) {</div><div class="line"><a name="l00937"></a><span class="lineno"> 937</span>  delete_mode = 8;</div><div class="line"><a name="l00938"></a><span class="lineno"> 938</span>  <span class="keywordflow">return</span> <a class="code" href="a00344.html#affc9a96d31e23e645355e534f11c40e9a223aec7f7b2d11193c90d04d8f589387">CR_LOOSE_SPACE</a>;</div><div class="line"><a name="l00939"></a><span class="lineno"> 939</span>  }</div><div class="line"><a name="l00940"></a><span class="lineno"> 940</span> </div><div class="line"><a name="l00941"></a><span class="lineno"> 941</span>  <span class="keywordflow">if</span> (box.<a class="code" href="a02610.html#a5dc64d0677b5d65385bc07a78cf49c4d">top</a> () < <a class="code" href="a00314.html#abe10ce41bf7240ae8a053dea471d6ed5">kBlnBaselineOffset</a> - <a class="code" href="a02358.html#a86f631e39200ed6d92a92ccd6a1de2c9">crunch_del_low_word</a> * <a class="code" href="a00314.html#af974e6755e636c8bc7cbe57e3bcbdd73">kBlnXHeight</a>) {</div><div class="line"><a name="l00942"></a><span class="lineno"> 942</span>  delete_mode = 9;</div><div class="line"><a name="l00943"></a><span class="lineno"> 943</span>  <span class="keywordflow">return</span> <a class="code" href="a00344.html#affc9a96d31e23e645355e534f11c40e9a223aec7f7b2d11193c90d04d8f589387">CR_LOOSE_SPACE</a>;</div><div class="line"><a name="l00944"></a><span class="lineno"> 944</span>  }</div><div class="line"><a name="l00945"></a><span class="lineno"> 945</span> </div><div class="line"><a name="l00946"></a><span class="lineno"> 946</span>  <span class="keywordflow">if</span> (box.<a class="code" href="a02610.html#a9fee4521e71300975cb34ebb21e3fca5">bottom</a> () ></div><div class="line"><a name="l00947"></a><span class="lineno"> 947</span>  <a class="code" href="a00314.html#abe10ce41bf7240ae8a053dea471d6ed5">kBlnBaselineOffset</a> + <a class="code" href="a02358.html#ad6665d769dab6f71751fd64af3837674">crunch_del_high_word</a> * <a class="code" href="a00314.html#af974e6755e636c8bc7cbe57e3bcbdd73">kBlnXHeight</a>) {</div><div class="line"><a name="l00948"></a><span class="lineno"> 948</span>  delete_mode = 10;</div><div class="line"><a name="l00949"></a><span class="lineno"> 949</span>  <span class="keywordflow">return</span> <a class="code" href="a00344.html#affc9a96d31e23e645355e534f11c40e9a223aec7f7b2d11193c90d04d8f589387">CR_LOOSE_SPACE</a>;</div><div class="line"><a name="l00950"></a><span class="lineno"> 950</span>  }</div><div class="line"><a name="l00951"></a><span class="lineno"> 951</span> </div><div class="line"><a name="l00952"></a><span class="lineno"> 952</span>  <span class="keywordflow">if</span> (box.<a class="code" href="a02610.html#a72fcb736ed0ddeae95e6a51b3bf8d979">height</a> () > <a class="code" href="a02358.html#ae8bf52f3bdd158ca70e25231e485ce1a">crunch_del_max_ht</a> * <a class="code" href="a00314.html#af974e6755e636c8bc7cbe57e3bcbdd73">kBlnXHeight</a>) {</div><div class="line"><a name="l00953"></a><span class="lineno"> 953</span>  delete_mode = 11;</div><div class="line"><a name="l00954"></a><span class="lineno"> 954</span>  <span class="keywordflow">return</span> <a class="code" href="a00344.html#affc9a96d31e23e645355e534f11c40e9a223aec7f7b2d11193c90d04d8f589387">CR_LOOSE_SPACE</a>;</div><div class="line"><a name="l00955"></a><span class="lineno"> 955</span>  }</div><div class="line"><a name="l00956"></a><span class="lineno"> 956</span> </div><div class="line"><a name="l00957"></a><span class="lineno"> 957</span>  <span class="keywordflow">if</span> (box.<a class="code" href="a02610.html#a70ef69630cbdc605b7b7d5434549d38c">width</a> () < <a class="code" href="a02358.html#a82fcb38c1bdc5bce93ff69c94ef7e2b9">crunch_del_min_width</a> * <a class="code" href="a00314.html#af974e6755e636c8bc7cbe57e3bcbdd73">kBlnXHeight</a>) {</div><div class="line"><a name="l00958"></a><span class="lineno"> 958</span>  delete_mode = 3;</div><div class="line"><a name="l00959"></a><span class="lineno"> 959</span>  <span class="keywordflow">return</span> <a class="code" href="a00344.html#affc9a96d31e23e645355e534f11c40e9a223aec7f7b2d11193c90d04d8f589387">CR_LOOSE_SPACE</a>;</div><div class="line"><a name="l00960"></a><span class="lineno"> 960</span>  }</div><div class="line"><a name="l00961"></a><span class="lineno"> 961</span> </div><div class="line"><a name="l00962"></a><span class="lineno"> 962</span>  delete_mode = 0;</div><div class="line"><a name="l00963"></a><span class="lineno"> 963</span>  <span class="keywordflow">return</span> <a class="code" href="a00344.html#affc9a96d31e23e645355e534f11c40e9a1eac25752f2c55f1809d11d4ef917ff9">CR_NONE</a>;</div><div class="line"><a name="l00964"></a><span class="lineno"> 964</span> }</div><div class="line"><a name="l00965"></a><span class="lineno"> 965</span> </div><div class="line"><a name="l00966"></a><span class="lineno"><a class="line" href="a02358.html#a7179b612b7eb84a9603e2e6caacb09ee"> 966</a></span> int16_t <a class="code" href="a02358.html#a7179b612b7eb84a9603e2e6caacb09ee">Tesseract::failure_count</a>(<a class="code" href="a02542.html">WERD_RES</a> *word) {</div><div class="line"><a name="l00967"></a><span class="lineno"> 967</span>  <span class="keyword">const</span> <span class="keywordtype">char</span> *str = word-><a class="code" href="a02542.html#a3d42ac7ec121263e757c9b7160dfd50d">best_choice</a>-><a class="code" href="a02606.html#adf200132afabc2ee6ec256e516011007">unichar_string</a>().<a class="code" href="a02834.html#abf0a7b3c6ae39a46e5441f28f61de5de">string</a>();</div><div class="line"><a name="l00968"></a><span class="lineno"> 968</span>  <span class="keywordtype">int</span> tess_rejs = 0;</div><div class="line"><a name="l00969"></a><span class="lineno"> 969</span> </div><div class="line"><a name="l00970"></a><span class="lineno"> 970</span>  <span class="keywordflow">for</span> (; *str != <span class="charliteral">'\0'</span>; str++) {</div><div class="line"><a name="l00971"></a><span class="lineno"> 971</span>  <span class="keywordflow">if</span> (*str == <span class="charliteral">' '</span>)</div><div class="line"><a name="l00972"></a><span class="lineno"> 972</span>  tess_rejs++;</div><div class="line"><a name="l00973"></a><span class="lineno"> 973</span>  }</div><div class="line"><a name="l00974"></a><span class="lineno"> 974</span>  <span class="keywordflow">return</span> tess_rejs;</div><div class="line"><a name="l00975"></a><span class="lineno"> 975</span> }</div><div class="line"><a name="l00976"></a><span class="lineno"> 976</span> </div><div class="line"><a name="l00977"></a><span class="lineno"> 977</span> </div><div class="line"><a name="l00978"></a><span class="lineno"><a class="line" href="a02358.html#a691559e07c1664b55eaa73b68c065724"> 978</a></span> <span class="keywordtype">bool</span> <a class="code" href="a02358.html#a691559e07c1664b55eaa73b68c065724">Tesseract::noise_outlines</a>(<a class="code" href="a02402.html">TWERD</a>* word) {</div><div class="line"><a name="l00979"></a><span class="lineno"> 979</span>  <a class="code" href="a02610.html">TBOX</a> box; <span class="comment">// BB of outline</span></div><div class="line"><a name="l00980"></a><span class="lineno"> 980</span>  int16_t outline_count = 0;</div><div class="line"><a name="l00981"></a><span class="lineno"> 981</span>  int16_t small_outline_count = 0;</div><div class="line"><a name="l00982"></a><span class="lineno"> 982</span>  int16_t max_dimension;</div><div class="line"><a name="l00983"></a><span class="lineno"> 983</span>  <span class="keywordtype">float</span> small_limit = <a class="code" href="a00314.html#af974e6755e636c8bc7cbe57e3bcbdd73">kBlnXHeight</a> * <a class="code" href="a02358.html#a422f7f28537d7127b0965b6224f2891e">crunch_small_outlines_size</a>;</div><div class="line"><a name="l00984"></a><span class="lineno"> 984</span> </div><div class="line"><a name="l00985"></a><span class="lineno"> 985</span>  <span class="keywordflow">for</span> (<span class="keywordtype">int</span> b = 0; b < word-><a class="code" href="a02402.html#a0d5347723ece084faf8f3d0dba6dd219">NumBlobs</a>(); ++b) {</div><div class="line"><a name="l00986"></a><span class="lineno"> 986</span>  <a class="code" href="a02398.html">TBLOB</a>* blob = word-><a class="code" href="a02402.html#a52fba22521039a79d8c1c8182f602dcc">blobs</a>[b];</div><div class="line"><a name="l00987"></a><span class="lineno"> 987</span>  <span class="keywordflow">for</span> (<a class="code" href="a02394.html">TESSLINE</a>* ol = blob-><a class="code" href="a02398.html#a3c9282cad4102157d214bcc6311cda07">outlines</a>; ol != <span class="keyword">nullptr</span>; ol = ol-><a class="code" href="a02394.html#a0fb224d43ea53a791f0957fa92793bef">next</a>) {</div><div class="line"><a name="l00988"></a><span class="lineno"> 988</span>  outline_count++;</div><div class="line"><a name="l00989"></a><span class="lineno"> 989</span>  box = ol->bounding_box();</div><div class="line"><a name="l00990"></a><span class="lineno"> 990</span>  <span class="keywordflow">if</span> (box.<a class="code" href="a02610.html#a72fcb736ed0ddeae95e6a51b3bf8d979">height</a>() > box.<a class="code" href="a02610.html#a70ef69630cbdc605b7b7d5434549d38c">width</a>())</div><div class="line"><a name="l00991"></a><span class="lineno"> 991</span>  max_dimension = box.<a class="code" href="a02610.html#a72fcb736ed0ddeae95e6a51b3bf8d979">height</a>();</div><div class="line"><a name="l00992"></a><span class="lineno"> 992</span>  <span class="keywordflow">else</span></div><div class="line"><a name="l00993"></a><span class="lineno"> 993</span>  max_dimension = box.<a class="code" href="a02610.html#a70ef69630cbdc605b7b7d5434549d38c">width</a>();</div><div class="line"><a name="l00994"></a><span class="lineno"> 994</span>  <span class="keywordflow">if</span> (max_dimension < small_limit)</div><div class="line"><a name="l00995"></a><span class="lineno"> 995</span>  small_outline_count++;</div><div class="line"><a name="l00996"></a><span class="lineno"> 996</span>  }</div><div class="line"><a name="l00997"></a><span class="lineno"> 997</span>  }</div><div class="line"><a name="l00998"></a><span class="lineno"> 998</span>  <span class="keywordflow">return</span> small_outline_count >= outline_count;</div><div class="line"><a name="l00999"></a><span class="lineno"> 999</span> }</div><div class="line"><a name="l01000"></a><span class="lineno"> 1000</span> </div><div class="line"><a name="l01001"></a><span class="lineno"> 1001</span> } <span class="comment">// namespace tesseract</span></div><div class="ttc" id="a02394_html"><div class="ttname"><a href="a02394.html">TESSLINE</a></div><div class="ttdef"><b>Definition:</b> <a href="a00230_source.html#l00187">blobs.h:187</a></div></div>
<div class="ttc" id="a02358_html_acb4b01dca8f419468e5ccf97c451e7cf"><div class="ttname"><a href="a02358.html#acb4b01dca8f419468e5ccf97c451e7cf">tesseract::Tesseract::outlines_2</a></div><div class="ttdeci">char * outlines_2</div><div class="ttdef"><b>Definition:</b> <a href="a00191_source.html#l00929">tesseractclass.h:929</a></div></div>
<div class="ttc" id="a02546_html_a997c382ddd2cf2f539532a1d91780963"><div class="ttname"><a href="a02546.html#a997c382ddd2cf2f539532a1d91780963">PAGE_RES_IT::block</a></div><div class="ttdeci">BLOCK_RES * block() const</div><div class="ttdef"><b>Definition:</b> <a href="a00344_source.html#l00757">pageres.h:757</a></div></div>
<div class="ttc" id="a02606_html_a8238d436806c40b2e01b9659dfab5eb3"><div class="ttname"><a href="a02606.html#a8238d436806c40b2e01b9659dfab5eb3">WERD_CHOICE::set_unichar_id</a></div><div class="ttdeci">void set_unichar_id(UNICHAR_ID unichar_id, int index)</div><div class="ttdef"><b>Definition:</b> <a href="a00401_source.html#l00359">ratngs.h:359</a></div></div>
<div class="ttc" id="a02358_html_a557bc470ec0edc0bd11b4fb3432b2266"><div class="ttname"><a href="a02358.html#a557bc470ec0edc0bd11b4fb3432b2266">tesseract::Tesseract::crunch_leave_uc_strings</a></div><div class="ttdeci">int crunch_leave_uc_strings</div><div class="ttdef"><b>Definition:</b> <a href="a00191_source.html#l00999">tesseractclass.h:999</a></div></div>
<div class="ttc" id="a02358_html_a7179b612b7eb84a9603e2e6caacb09ee"><div class="ttname"><a href="a02358.html#a7179b612b7eb84a9603e2e6caacb09ee">tesseract::Tesseract::failure_count</a></div><div class="ttdeci">int16_t failure_count(WERD_RES *word)</div><div class="ttdef"><b>Definition:</b> <a href="a00077_source.html#l00966">docqual.cpp:966</a></div></div>
<div class="ttc" id="a02242_html_a4b494c625c5aa534c6fa265fb7fe828f"><div class="ttname"><a href="a02242.html#a4b494c625c5aa534c6fa265fb7fe828f">tesseract::DocQualCallbacks::AcceptIfGoodQuality</a></div><div class="ttdeci">void AcceptIfGoodQuality(int index)</div><div class="ttdef"><b>Definition:</b> <a href="a00077_source.html#l00045">docqual.cpp:45</a></div></div>
<div class="ttc" id="a03950_html_afb472ed816e5f312692fa670f56dceb6"><div class="ttname"><a href="a03950.html#afb472ed816e5f312692fa670f56dceb6">UNICHARSET::get_islower</a></div><div class="ttdeci">bool get_islower(UNICHAR_ID unichar_id) const</div><div class="ttdef"><b>Definition:</b> <a href="a00623_source.html#l00493">unicharset.h:493</a></div></div>
<div class="ttc" id="a02618_html_aa86752e4e9277f2a616df08459ea08e3"><div class="ttname"><a href="a02618.html#aa86752e4e9277f2a616df08459ea08e3">REJMAP::rej_word_block_rej</a></div><div class="ttdeci">void rej_word_block_rej()</div><div class="ttdef"><b>Definition:</b> <a href="a00410_source.html#l00435">rejctmap.cpp:435</a></div></div>
<div class="ttc" id="a02542_html_a211ab5c5a13123ee7bdc7459d3363f9d"><div class="ttname"><a href="a02542.html#a211ab5c5a13123ee7bdc7459d3363f9d">WERD_RES::rebuild_word</a></div><div class="ttdeci">TWERD * rebuild_word</div><div class="ttdef"><b>Definition:</b> <a href="a00344_source.html#l00260">pageres.h:260</a></div></div>
<div class="ttc" id="a02394_html_a0fb224d43ea53a791f0957fa92793bef"><div class="ttname"><a href="a02394.html#a0fb224d43ea53a791f0957fa92793bef">TESSLINE::next</a></div><div class="ttdeci">TESSLINE * next</div><div class="ttdef"><b>Definition:</b> <a href="a00230_source.html#l00265">blobs.h:265</a></div></div>
<div class="ttc" id="a00605_html_afedceee7ea132dae3d224db2cf8b5618"><div class="ttname"><a href="a00605.html#afedceee7ea132dae3d224db2cf8b5618">UNICHAR_ID</a></div><div class="ttdeci">int UNICHAR_ID</div><div class="ttdef"><b>Definition:</b> <a href="a00605_source.html#l00035">unichar.h:35</a></div></div>
<div class="ttc" id="a02410_html_a114878e47b1abf1d799350aea31af8e2"><div class="ttname"><a href="a02410.html#a114878e47b1abf1d799350aea31af8e2">tesseract::BoxWord::ProcessMatchedBlobs</a></div><div class="ttdeci">void ProcessMatchedBlobs(const TWERD &other, TessCallback1< int > *cb) const</div><div class="ttdef"><b>Definition:</b> <a href="a00245_source.html#l00190">boxword.cpp:190</a></div></div>
<div class="ttc" id="a00401_html_a18e2c75cefe9e5b78e8ce41aa5fa25bca616bdbcaed7dd414823b303af5c8b1f1"><div class="ttname"><a href="a00401.html#a18e2c75cefe9e5b78e8ce41aa5fa25bca616bdbcaed7dd414823b303af5c8b1f1">SYSTEM_DAWG_PERM</a></div><div class="ttdef"><b>Definition:</b> <a href="a00401_source.html#l00251">ratngs.h:251</a></div></div>
<div class="ttc" id="a00191_html"><div class="ttname"><a href="a00191.html">tesseractclass.h</a></div></div>
<div class="ttc" id="a02402_html"><div class="ttname"><a href="a02402.html">TWERD</a></div><div class="ttdef"><b>Definition:</b> <a href="a00230_source.html#l00402">blobs.h:402</a></div></div>
<div class="ttc" id="a02530_html_a6341c86ed5c02252716d5d902fc42862"><div class="ttname"><a href="a02530.html#a6341c86ed5c02252716d5d902fc42862">PAGE_RES::rej_count</a></div><div class="ttdeci">int32_t rej_count</div><div class="ttdef"><b>Definition:</b> <a href="a00344_source.html#l00080">pageres.h:80</a></div></div>
<div class="ttc" id="a02546_html_a2038f4bd5c4c0eac4dba7f1d6bcdb5bf"><div class="ttname"><a href="a02546.html#a2038f4bd5c4c0eac4dba7f1d6bcdb5bf">PAGE_RES_IT::row</a></div><div class="ttdeci">ROW_RES * row() const</div><div class="ttdef"><b>Definition:</b> <a href="a00344_source.html#l00754">pageres.h:754</a></div></div>
<div class="ttc" id="a02542_html_af171e37da16ed628bf4516e9f934dc08"><div class="ttname"><a href="a02542.html#af171e37da16ed628bf4516e9f934dc08">WERD_RES::bln_boxes</a></div><div class="ttdeci">tesseract::BoxWord * bln_boxes</div><div class="ttdef"><b>Definition:</b> <a href="a00344_source.html#l00198">pageres.h:198</a></div></div>
<div class="ttc" id="a00080_html_ac4a411895d63e3bb0bea788e92894d42a2400fb7991d9c94896464522e10c49ad"><div class="ttname"><a href="a00080.html#ac4a411895d63e3bb0bea788e92894d42a2400fb7991d9c94896464522e10c49ad">G_TERRIBLE</a></div><div class="ttdef"><b>Definition:</b> <a href="a00080_source.html#l00034">docqual.h:34</a></div></div>
<div class="ttc" id="a02538_html_a17e4e343e45d964a85995f998fb6b717"><div class="ttname"><a href="a02538.html#a17e4e343e45d964a85995f998fb6b717">ROW_RES::whole_word_rej_count</a></div><div class="ttdeci">int32_t whole_word_rej_count</div><div class="ttdef"><b>Definition:</b> <a href="a00344_source.html#l00146">pageres.h:146</a></div></div>
<div class="ttc" id="a02834_html_ae2d06687c4bac24187890e5a2357b9d1"><div class="ttname"><a href="a02834.html#ae2d06687c4bac24187890e5a2357b9d1">STRING::unsigned_size</a></div><div class="ttdeci">uint32_t unsigned_size() const</div><div class="ttdef"><b>Definition:</b> <a href="a00584_source.html#l00071">strngs.h:71</a></div></div>
<div class="ttc" id="a02358_html_afe2ceb83896ec93f0add94703dee79ce"><div class="ttname"><a href="a02358.html#afe2ceb83896ec93f0add94703dee79ce">tesseract::Tesseract::tessedit_debug_block_rejection</a></div><div class="ttdeci">bool tessedit_debug_block_rejection</div><div class="ttdef"><b>Definition:</b> <a href="a00191_source.html#l00875">tesseractclass.h:875</a></div></div>
<div class="ttc" id="a02542_html_ae24eb58be06cf275aee411d947fd31ef"><div class="ttname"><a href="a02542.html#ae24eb58be06cf275aee411d947fd31ef">WERD_RES::reject_map</a></div><div class="ttdeci">REJMAP reject_map</div><div class="ttdef"><b>Definition:</b> <a href="a00344_source.html#l00287">pageres.h:287</a></div></div>
<div class="ttc" id="a02618_html_a03037d4a12a4ea33a377cf21c9400139"><div class="ttname"><a href="a02618.html#a03037d4a12a4ea33a377cf21c9400139">REJMAP::rej_word_row_rej</a></div><div class="ttdeci">void rej_word_row_rej()</div><div class="ttdef"><b>Definition:</b> <a href="a00410_source.html#l00444">rejctmap.cpp:444</a></div></div>
<div class="ttc" id="a02834_html_abf0a7b3c6ae39a46e5441f28f61de5de"><div class="ttname"><a href="a02834.html#abf0a7b3c6ae39a46e5441f28f61de5de">STRING::string</a></div><div class="ttdeci">const char * string() const</div><div class="ttdef"><b>Definition:</b> <a href="a00581_source.html#l00196">strngs.cpp:196</a></div></div>
<div class="ttc" id="a02606_html_a7a606dd5236e78662fccade85d23edee"><div class="ttname"><a href="a02606.html#a7a606dd5236e78662fccade85d23edee">WERD_CHOICE::permuter</a></div><div class="ttdeci">uint8_t permuter() const</div><div class="ttdef"><b>Definition:</b> <a href="a00401_source.html#l00346">ratngs.h:346</a></div></div>
<div class="ttc" id="a02358_html_a3b9dd1d5d1a309b0ce4f1ef34c0a8a2a"><div class="ttname"><a href="a02358.html#a3b9dd1d5d1a309b0ce4f1ef34c0a8a2a">tesseract::Tesseract::crunch_leave_accept_strings</a></div><div class="ttdeci">bool crunch_leave_accept_strings</div><div class="ttdef"><b>Definition:</b> <a href="a00191_source.html#l00994">tesseractclass.h:994</a></div></div>
<div class="ttc" id="a02534_html_abdeb810e73f050c499a90c74b3891af3"><div class="ttname"><a href="a02534.html#abdeb810e73f050c499a90c74b3891af3">BLOCK_RES::char_count</a></div><div class="ttdeci">int32_t char_count</div><div class="ttdef"><b>Definition:</b> <a href="a00344_source.html#l00118">pageres.h:118</a></div></div>
<div class="ttc" id="a02402_html_abce755a2629864688cb259a780b01d24"><div class="ttname"><a href="a02402.html#abce755a2629864688cb259a780b01d24">TWERD::bounding_box</a></div><div class="ttdeci">TBOX bounding_box() const</div><div class="ttdef"><b>Definition:</b> <a href="a00227_source.html#l00871">blobs.cpp:871</a></div></div>
<div class="ttc" id="a02358_html_acc3da037182b6ce27acdb8a9503df393"><div class="ttname"><a href="a02358.html#acc3da037182b6ce27acdb8a9503df393">tesseract::Tesseract::terrible_word_crunch</a></div><div class="ttdeci">bool terrible_word_crunch(WERD_RES *word, GARBAGE_LEVEL garbage_level)</div><div class="ttdef"><b>Definition:</b> <a href="a00077_source.html#l00504">docqual.cpp:504</a></div></div>
<div class="ttc" id="a02610_html"><div class="ttname"><a href="a02610.html">TBOX</a></div><div class="ttdef"><b>Definition:</b> <a href="a00407_source.html#l00034">rect.h:34</a></div></div>
<div class="ttc" id="a02618_html_ad48f4dc7ca8fb95f7d938d834f4cbb38"><div class="ttname"><a href="a02618.html#ad48f4dc7ca8fb95f7d938d834f4cbb38">REJMAP::quality_recoverable_rejects</a></div><div class="ttdeci">bool quality_recoverable_rejects()</div><div class="ttdef"><b>Definition:</b> <a href="a00410_source.html#l00302">rejctmap.cpp:302</a></div></div>
<div class="ttc" id="a02402_html_a0d5347723ece084faf8f3d0dba6dd219"><div class="ttname"><a href="a02402.html#a0d5347723ece084faf8f3d0dba6dd219">TWERD::NumBlobs</a></div><div class="ttdeci">int NumBlobs() const</div><div class="ttdef"><b>Definition:</b> <a href="a00230_source.html#l00432">blobs.h:432</a></div></div>
<div class="ttc" id="a02618_html_adb462d55dc4b682e0a77090185a58011"><div class="ttname"><a href="a02618.html#adb462d55dc4b682e0a77090185a58011">REJMAP::length</a></div><div class="ttdeci">int32_t length() const</div><div class="ttdef"><b>Definition:</b> <a href="a00413_source.html#l00223">rejctmap.h:223</a></div></div>
<div class="ttc" id="a00449_html_ad6968adbf8f2cc44adf333ec96efb0bea62efb985a62d85e014ee5ab039dd50ce"><div class="ttname"><a href="a00449.html#ad6968adbf8f2cc44adf333ec96efb0bea62efb985a62d85e014ee5ab039dd50ce">W_EOL</a></div><div class="ttdef"><b>Definition:</b> <a href="a00449_source.html#l00035">werd.h:35</a></div></div>
<div class="ttc" id="a02358_html_a260642901c32784e997473bc298346cc"><div class="ttname"><a href="a02358.html#a260642901c32784e997473bc298346cc">tesseract::Tesseract::crunch_include_numerals</a></div><div class="ttdeci">bool crunch_include_numerals</div><div class="ttdef"><b>Definition:</b> <a href="a00191_source.html#l00995">tesseractclass.h:995</a></div></div>
<div class="ttc" id="a00314_html_af974e6755e636c8bc7cbe57e3bcbdd73"><div class="ttname"><a href="a00314.html#af974e6755e636c8bc7cbe57e3bcbdd73">kBlnXHeight</a></div><div class="ttdeci">const int kBlnXHeight</div><div class="ttdef"><b>Definition:</b> <a href="a00314_source.html#l00024">normalis.h:24</a></div></div>
<div class="ttc" id="a02542_html_af092edf58a4a718687aa35c6a458cada"><div class="ttname"><a href="a02542.html#af092edf58a4a718687aa35c6a458cada">WERD_RES::merge_tess_fails</a></div><div class="ttdeci">void merge_tess_fails()</div><div class="ttdef"><b>Definition:</b> <a href="a00341_source.html#l01073">pageres.cpp:1073</a></div></div>
<div class="ttc" id="a02358_html_a0c689f16fb64963ca30f7b0fddbea414"><div class="ttname"><a href="a02358.html#a0c689f16fb64963ca30f7b0fddbea414">tesseract::Tesseract::tessedit_reject_doc_percent</a></div><div class="ttdeci">double tessedit_reject_doc_percent</div><div class="ttdef"><b>Definition:</b> <a href="a00191_source.html#l00936">tesseractclass.h:936</a></div></div>
<div class="ttc" id="a03950_html_aeb2253dcb5f01c81fcba5f4af417eadf"><div class="ttname"><a href="a03950.html#aeb2253dcb5f01c81fcba5f4af417eadf">UNICHARSET::unichar_to_id</a></div><div class="ttdeci">UNICHAR_ID unichar_to_id(const char *const unichar_repr) const</div><div class="ttdef"><b>Definition:</b> <a href="a00620_source.html#l00209">unicharset.cpp:209</a></div></div>
<div class="ttc" id="a02606_html_afa672748d2585eea64ab79592dd02eb3"><div class="ttname"><a href="a02606.html#afa672748d2585eea64ab79592dd02eb3">WERD_CHOICE::rating</a></div><div class="ttdeci">float rating() const</div><div class="ttdef"><b>Definition:</b> <a href="a00401_source.html#l00327">ratngs.h:327</a></div></div>
<div class="ttc" id="a02358_html_ae1f650e4873b5842f2ae57a3055868c9"><div class="ttname"><a href="a02358.html#ae1f650e4873b5842f2ae57a3055868c9">tesseract::Tesseract::tessedit_reject_block_percent</a></div><div class="ttdeci">double tessedit_reject_block_percent</div><div class="ttdef"><b>Definition:</b> <a href="a00191_source.html#l00938">tesseractclass.h:938</a></div></div>
<div class="ttc" id="a02618_html_a9fb4a691f24ea06370b55650c197db8b"><div class="ttname"><a href="a02618.html#a9fb4a691f24ea06370b55650c197db8b">REJMAP::rej_word_doc_rej</a></div><div class="ttdeci">void rej_word_doc_rej()</div><div class="ttdef"><b>Definition:</b> <a href="a00410_source.html#l00426">rejctmap.cpp:426</a></div></div>
<div class="ttc" id="a02358_html_a40051cf485581289adcf04cc4733df41"><div class="ttname"><a href="a02358.html#a40051cf485581289adcf04cc4733df41">tesseract::Tesseract::crunch_del_min_ht</a></div><div class="ttdeci">double crunch_del_min_ht</div><div class="ttdef"><b>Definition:</b> <a href="a00191_source.html#l00982">tesseractclass.h:982</a></div></div>
<div class="ttc" id="a00587_html_ad000c6729bae0f97075ca10a0b5bf7d6"><div class="ttname"><a href="a00587.html#ad000c6729bae0f97075ca10a0b5bf7d6">NewPermanentTessCallback</a></div><div class="ttdeci">_ConstTessMemberResultCallback_0_0< false, R, T1 >::base * NewPermanentTessCallback(const T1 *obj, R(T2::*member)() const)</div><div class="ttdef"><b>Definition:</b> <a href="a00587_source.html#l00116">tesscallback.h:116</a></div></div>
<div class="ttc" id="a02242_html"><div class="ttname"><a href="a02242.html">tesseract::DocQualCallbacks</a></div><div class="ttdef"><b>Definition:</b> <a href="a00077_source.html#l00031">docqual.cpp:31</a></div></div>
<div class="ttc" id="a02606_html_acea3ee4af3377da8f4c10627e4ba42cf"><div class="ttname"><a href="a02606.html#acea3ee4af3377da8f4c10627e4ba42cf">WERD_CHOICE::certainty</a></div><div class="ttdeci">float certainty() const</div><div class="ttdef"><b>Definition:</b> <a href="a00401_source.html#l00330">ratngs.h:330</a></div></div>
<div class="ttc" id="a00314_html_abe10ce41bf7240ae8a053dea471d6ed5"><div class="ttname"><a href="a00314.html#abe10ce41bf7240ae8a053dea471d6ed5">kBlnBaselineOffset</a></div><div class="ttdeci">const int kBlnBaselineOffset</div><div class="ttdef"><b>Definition:</b> <a href="a00314_source.html#l00025">normalis.h:25</a></div></div>
<div class="ttc" id="a00167_html"><div class="ttname"><a href="a00167.html">reject.h</a></div></div>
<div class="ttc" id="a00344_html_affc9a96d31e23e645355e534f11c40e9a223aec7f7b2d11193c90d04d8f589387"><div class="ttname"><a href="a00344.html#affc9a96d31e23e645355e534f11c40e9a223aec7f7b2d11193c90d04d8f589387">CR_LOOSE_SPACE</a></div><div class="ttdef"><b>Definition:</b> <a href="a00344_source.html#l00163">pageres.h:163</a></div></div>
<div class="ttc" id="a02542_html"><div class="ttname"><a href="a02542.html">WERD_RES</a></div><div class="ttdef"><b>Definition:</b> <a href="a00344_source.html#l00169">pageres.h:169</a></div></div>
<div class="ttc" id="a02358_html_a49a94ed873a2ddeea43f4b12a8774222"><div class="ttname"><a href="a02358.html#a49a94ed873a2ddeea43f4b12a8774222">tesseract::Tesseract::crunch_early_convert_bad_unlv_chs</a></div><div class="ttdeci">bool crunch_early_convert_bad_unlv_chs</div><div class="ttdef"><b>Definition:</b> <a href="a00191_source.html#l00971">tesseractclass.h:971</a></div></div>
<div class="ttc" id="a02358_html_a691559e07c1664b55eaa73b68c065724"><div class="ttname"><a href="a02358.html#a691559e07c1664b55eaa73b68c065724">tesseract::Tesseract::noise_outlines</a></div><div class="ttdeci">bool noise_outlines(TWERD *word)</div><div class="ttdef"><b>Definition:</b> <a href="a00077_source.html#l00978">docqual.cpp:978</a></div></div>
<div class="ttc" id="a02358_html_a2c77d5d94321d7fc717b5376bcb02b79"><div class="ttname"><a href="a02358.html#a2c77d5d94321d7fc717b5376bcb02b79">tesseract::Tesseract::tilde_crunch</a></div><div class="ttdeci">void tilde_crunch(PAGE_RES_IT &page_res_it)</div><div class="ttdef"><b>Definition:</b> <a href="a00077_source.html#l00418">docqual.cpp:418</a></div></div>
<div class="ttc" id="a02358_html_af5c0420627cd4d8b1273916d8b86c354"><div class="ttname"><a href="a02358.html#af5c0420627cd4d8b1273916d8b86c354">tesseract::Tesseract::crunch_pot_indicators</a></div><div class="ttdeci">int crunch_pot_indicators</div><div class="ttdef"><b>Definition:</b> <a href="a00191_source.html#l00990">tesseractclass.h:990</a></div></div>
<div class="ttc" id="a02358_html_a98362ec97923314723dbeb56fd2528fd"><div class="ttname"><a href="a02358.html#a98362ec97923314723dbeb56fd2528fd">tesseract::Tesseract::tessedit_preserve_min_wd_len</a></div><div class="ttdeci">int tessedit_preserve_min_wd_len</div><div class="ttdef"><b>Definition:</b> <a href="a00191_source.html#l00953">tesseractclass.h:953</a></div></div>
<div class="ttc" id="a02638_html_a43b4c52165d4b7fd811eb653c2aa9d8e"><div class="ttname"><a href="a02638.html#a43b4c52165d4b7fd811eb653c2aa9d8e">WERD::space</a></div><div class="ttdeci">uint8_t space()</div><div class="ttdef"><b>Definition:</b> <a href="a00449_source.html#l00102">werd.h:102</a></div></div>
<div class="ttc" id="a02358_html_a73cfd99b1d3cd76679efa1a19a4e1d1a"><div class="ttname"><a href="a02358.html#a73cfd99b1d3cd76679efa1a19a4e1d1a">tesseract::Tesseract::tessedit_reject_row_percent</a></div><div class="ttdeci">double tessedit_reject_row_percent</div><div class="ttdef"><b>Definition:</b> <a href="a00191_source.html#l00940">tesseractclass.h:940</a></div></div>
<div class="ttc" id="a02358_html_a86f631e39200ed6d92a92ccd6a1de2c9"><div class="ttname"><a href="a02358.html#a86f631e39200ed6d92a92ccd6a1de2c9">tesseract::Tesseract::crunch_del_low_word</a></div><div class="ttdeci">double crunch_del_low_word</div><div class="ttdef"><b>Definition:</b> <a href="a00191_source.html#l00987">tesseractclass.h:987</a></div></div>
<div class="ttc" id="a02358_html_a81b3e2c28a090f5a877dd0f67a4080b6"><div class="ttname"><a href="a02358.html#a81b3e2c28a090f5a877dd0f67a4080b6">tesseract::Tesseract::convert_bad_unlv_chs</a></div><div class="ttdeci">void convert_bad_unlv_chs(WERD_RES *word_res)</div><div class="ttdef"><b>Definition:</b> <a href="a00077_source.html#l00660">docqual.cpp:660</a></div></div>
<div class="ttc" id="a02358_html_a69c6af52a20db78eb5bfe14a1bc70162"><div class="ttname"><a href="a02358.html#a69c6af52a20db78eb5bfe14a1bc70162">tesseract::Tesseract::crunch_rating_max</a></div><div class="ttdeci">int crunch_rating_max</div><div class="ttdef"><b>Definition:</b> <a href="a00191_source.html#l00989">tesseractclass.h:989</a></div></div>
<div class="ttc" id="a02242_html_a1d1838a03608183c677257e30aa5ea2a"><div class="ttname"><a href="a02242.html#a1d1838a03608183c677257e30aa5ea2a">tesseract::DocQualCallbacks::accepted_match_count</a></div><div class="ttdeci">int16_t accepted_match_count</div><div class="ttdef"><b>Definition:</b> <a href="a00077_source.html#l00052">docqual.cpp:52</a></div></div>
<div class="ttc" id="a02358_html_acf0428aa8b6b2390e5ba2c5f185b7f49"><div class="ttname"><a href="a02358.html#acf0428aa8b6b2390e5ba2c5f185b7f49">tesseract::Tesseract::tessedit_preserve_blk_rej_perfect_wds</a></div><div class="ttdeci">bool tessedit_preserve_blk_rej_perfect_wds</div><div class="ttdef"><b>Definition:</b> <a href="a00191_source.html#l00945">tesseractclass.h:945</a></div></div>
<div class="ttc" id="a02242_html_afcbe06fefeeaee8eb7f00b8e90a2d769"><div class="ttname"><a href="a02242.html#afcbe06fefeeaee8eb7f00b8e90a2d769">tesseract::DocQualCallbacks::DocQualCallbacks</a></div><div class="ttdeci">DocQualCallbacks(WERD_RES *word0)</div><div class="ttdef"><b>Definition:</b> <a href="a00077_source.html#l00032">docqual.cpp:32</a></div></div>
<div class="ttc" id="a02358_html_afe905eb6b5f607815ccff87755af5d30"><div class="ttname"><a href="a02358.html#afe905eb6b5f607815ccff87755af5d30">tesseract::Tesseract::tessedit_good_doc_still_rowrej_wd</a></div><div class="ttdeci">double tessedit_good_doc_still_rowrej_wd</div><div class="ttdef"><b>Definition:</b> <a href="a00191_source.html#l00957">tesseractclass.h:957</a></div></div>
<div class="ttc" id="a00587_html"><div class="ttname"><a href="a00587.html">tesscallback.h</a></div></div>
<div class="ttc" id="a02358_html_ae8bf52f3bdd158ca70e25231e485ce1a"><div class="ttname"><a href="a02358.html#ae8bf52f3bdd158ca70e25231e485ce1a">tesseract::Tesseract::crunch_del_max_ht</a></div><div class="ttdeci">double crunch_del_max_ht</div><div class="ttdef"><b>Definition:</b> <a href="a00191_source.html#l00983">tesseractclass.h:983</a></div></div>
<div class="ttc" id="a02358_html_ad0d6e09c6386cb0d6d1bc4a34beb23fa"><div class="ttname"><a href="a02358.html#ad0d6e09c6386cb0d6d1bc4a34beb23fa">tesseract::Tesseract::word_blob_quality</a></div><div class="ttdeci">int16_t word_blob_quality(WERD_RES *word, ROW *row)</div><div class="ttdef"><b>Definition:</b> <a href="a00077_source.html#l00061">docqual.cpp:61</a></div></div>
<div class="ttc" id="a02242_html_a7fb05da0218e4e94705cab1d751c7762"><div class="ttname"><a href="a02242.html#a7fb05da0218e4e94705cab1d751c7762">tesseract::DocQualCallbacks::CountAcceptedBlobs</a></div><div class="ttdeci">void CountAcceptedBlobs(int index)</div><div class="ttdef"><b>Definition:</b> <a href="a00077_source.html#l00039">docqual.cpp:39</a></div></div>
<div class="ttc" id="a02610_html_a70ef69630cbdc605b7b7d5434549d38c"><div class="ttname"><a href="a02610.html#a70ef69630cbdc605b7b7d5434549d38c">TBOX::width</a></div><div class="ttdeci">int16_t width() const</div><div class="ttdef"><b>Definition:</b> <a href="a00407_source.html#l00115">rect.h:115</a></div></div>
<div class="ttc" id="a02242_html_a5f143209a4192b1872e2e2430d78e29a"><div class="ttname"><a href="a02242.html#a5f143209a4192b1872e2e2430d78e29a">tesseract::DocQualCallbacks::CountMatchingBlobs</a></div><div class="ttdeci">void CountMatchingBlobs(int index)</div><div class="ttdef"><b>Definition:</b> <a href="a00077_source.html#l00035">docqual.cpp:35</a></div></div>
<div class="ttc" id="a00875_html"><div class="ttname"><a href="a00875.html">globals.h</a></div></div>
<div class="ttc" id="a02546_html_a15febd45d0904bb3c5f7d506368177f0"><div class="ttname"><a href="a02546.html#a15febd45d0904bb3c5f7d506368177f0">PAGE_RES_IT::restart_page</a></div><div class="ttdeci">WERD_RES * restart_page()</div><div class="ttdef"><b>Definition:</b> <a href="a00344_source.html#l00698">pageres.h:698</a></div></div>
<div class="ttc" id="a02534_html_ae7c240d4878247ebdfe78433446751bf"><div class="ttname"><a href="a02534.html#ae7c240d4878247ebdfe78433446751bf">BLOCK_RES::block</a></div><div class="ttdeci">BLOCK * block</div><div class="ttdef"><b>Definition:</b> <a href="a00344_source.html#l00117">pageres.h:117</a></div></div>
<div class="ttc" id="a02358_html_af247aff07d2cc55480e36f278c5a76a8"><div class="ttname"><a href="a02358.html#af247aff07d2cc55480e36f278c5a76a8">tesseract::Tesseract::unrej_good_quality_words</a></div><div class="ttdeci">void unrej_good_quality_words(PAGE_RES_IT &page_res_it)</div><div class="ttdef"><b>Definition:</b> <a href="a00077_source.html#l00161">docqual.cpp:161</a></div></div>
<div class="ttc" id="a02558_html_a6a88fdbd4c9b9c23e17181202575d106"><div class="ttname"><a href="a02558.html#a6a88fdbd4c9b9c23e17181202575d106">PDBLK::index</a></div><div class="ttdeci">int index() const</div><div class="ttdef"><b>Definition:</b> <a href="a00356_source.html#l00068">pdblock.h:68</a></div></div>
<div class="ttc" id="a02358_html_a5c24b5ef1b42bebf68d3ab54acc94ccf"><div class="ttname"><a href="a02358.html#a5c24b5ef1b42bebf68d3ab54acc94ccf">tesseract::Tesseract::crunch_del_cert</a></div><div class="ttdeci">double crunch_del_cert</div><div class="ttdef"><b>Definition:</b> <a href="a00191_source.html#l00981">tesseractclass.h:981</a></div></div>
<div class="ttc" id="a02546_html_a1d1af03a63da4b7f551770e07ca86414"><div class="ttname"><a href="a02546.html#a1d1af03a63da4b7f551770e07ca86414">PAGE_RES_IT::rej_stat_word</a></div><div class="ttdeci">void rej_stat_word()</div><div class="ttdef"><b>Definition:</b> <a href="a00341_source.html#l01674">pageres.cpp:1674</a></div></div>
<div class="ttc" id="a02638_html_aec30b0c876cef5479c5db04aa8897358"><div class="ttname"><a href="a02638.html#aec30b0c876cef5479c5db04aa8897358">WERD::flag</a></div><div class="ttdeci">bool flag(WERD_FLAGS mask) const</div><div class="ttdef"><b>Definition:</b> <a href="a00449_source.html#l00126">werd.h:126</a></div></div>
<div class="ttc" id="a02606_html_adaecd80cfe44e00e9c4647859b1c87e0"><div class="ttname"><a href="a02606.html#adaecd80cfe44e00e9c4647859b1c87e0">WERD_CHOICE::unichar_lengths</a></div><div class="ttdeci">const STRING & unichar_lengths() const</div><div class="ttdef"><b>Definition:</b> <a href="a00401_source.html#l00548">ratngs.h:548</a></div></div>
<div class="ttc" id="a02358_html_a8a848e8a83e73f182d0ef7324afc741f"><div class="ttname"><a href="a02358.html#a8a848e8a83e73f182d0ef7324afc741f">tesseract::Tesseract::unlv_tilde_crunching</a></div><div class="ttdeci">bool unlv_tilde_crunching</div><div class="ttdef"><b>Definition:</b> <a href="a00191_source.html#l00967">tesseractclass.h:967</a></div></div>
<div class="ttc" id="a02610_html_a5dc64d0677b5d65385bc07a78cf49c4d"><div class="ttname"><a href="a02610.html#a5dc64d0677b5d65385bc07a78cf49c4d">TBOX::top</a></div><div class="ttdeci">int16_t top() const</div><div class="ttdef"><b>Definition:</b> <a href="a00407_source.html#l00058">rect.h:58</a></div></div>
<div class="ttc" id="a02546_html_a32f7ecd54106290053205cc118395d8d"><div class="ttname"><a href="a02546.html#a32f7ecd54106290053205cc118395d8d">PAGE_RES_IT::prev_row</a></div><div class="ttdeci">ROW_RES * prev_row() const</div><div class="ttdef"><b>Definition:</b> <a href="a00344_source.html#l00745">pageres.h:745</a></div></div>
<div class="ttc" id="a03950_html_a98079b3ce062183388c653eee9838e3c"><div class="ttname"><a href="a03950.html#a98079b3ce062183388c653eee9838e3c">UNICHARSET::get_isdigit</a></div><div class="ttdeci">bool get_isdigit(UNICHAR_ID unichar_id) const</div><div class="ttdef"><b>Definition:</b> <a href="a00623_source.html#l00507">unicharset.h:507</a></div></div>
<div class="ttc" id="a00344_html_affc9a96d31e23e645355e534f11c40e9"><div class="ttname"><a href="a00344.html#affc9a96d31e23e645355e534f11c40e9">CRUNCH_MODE</a></div><div class="ttdeci">CRUNCH_MODE</div><div class="ttdef"><b>Definition:</b> <a href="a00344_source.html#l00159">pageres.h:159</a></div></div>
<div class="ttc" id="a02358_html_a20a1206ce17b07676f829fdee0034eb5"><div class="ttname"><a href="a02358.html#a20a1206ce17b07676f829fdee0034eb5">tesseract::Tesseract::crunch_debug</a></div><div class="ttdeci">int crunch_debug</div><div class="ttdef"><b>Definition:</b> <a href="a00191_source.html#l01001">tesseractclass.h:1001</a></div></div>
<div class="ttc" id="a02542_html_a82d32a9f59bc1c08da9537303c56615b"><div class="ttname"><a href="a02542.html#a82d32a9f59bc1c08da9537303c56615b">WERD_RES::unlv_crunch_mode</a></div><div class="ttdeci">CRUNCH_MODE unlv_crunch_mode</div><div class="ttdef"><b>Definition:</b> <a href="a00344_source.html#l00310">pageres.h:310</a></div></div>
<div class="ttc" id="a02358_html_a6cc1aac3230938e3e32a76f119ac4565"><div class="ttname"><a href="a02358.html#a6cc1aac3230938e3e32a76f119ac4565">tesseract::Tesseract::safe_dict_word</a></div><div class="ttdeci">int16_t safe_dict_word(const WERD_RES *werd_res)</div><div class="ttdef"><b>Definition:</b> <a href="a00164_source.html#l00612">reject.cpp:612</a></div></div>
<div class="ttc" id="a02358_html_a7124d6d656fc163de05f88b6e31e9681"><div class="ttname"><a href="a02358.html#a7124d6d656fc163de05f88b6e31e9681">tesseract::Tesseract::tessedit_whole_wd_rej_row_percent</a></div><div class="ttdeci">double tessedit_whole_wd_rej_row_percent</div><div class="ttdef"><b>Definition:</b> <a href="a00191_source.html#l00943">tesseractclass.h:943</a></div></div>
<div class="ttc" id="a02582_html"><div class="ttname"><a href="a02582.html">POLY_BLOCK</a></div><div class="ttdef"><b>Definition:</b> <a href="a00374_source.html#l00027">polyblk.h:27</a></div></div>
<div class="ttc" id="a02618_html_a2ddec73fd1a7288568496353d75a00e8"><div class="ttname"><a href="a02618.html#a2ddec73fd1a7288568496353d75a00e8">REJMAP::reject_count</a></div><div class="ttdeci">int16_t reject_count()</div><div class="ttdef"><b>Definition:</b> <a href="a00413_source.html#l00229">rejctmap.h:229</a></div></div>
<div class="ttc" id="a02618_html_a56942b5d4ddd0096c7624d382b1fef90"><div class="ttname"><a href="a02618.html#a56942b5d4ddd0096c7624d382b1fef90">REJMAP::accept_count</a></div><div class="ttdeci">int16_t accept_count()</div><div class="ttdef"><b>Definition:</b> <a href="a00410_source.html#l00281">rejctmap.cpp:281</a></div></div>
<div class="ttc" id="a00344_html_affc9a96d31e23e645355e534f11c40e9a1799c83261446306e1d1527f1779d6a4"><div class="ttname"><a href="a00344.html#affc9a96d31e23e645355e534f11c40e9a1799c83261446306e1d1527f1779d6a4">CR_DELETE</a></div><div class="ttdef"><b>Definition:</b> <a href="a00344_source.html#l00164">pageres.h:164</a></div></div>
<div class="ttc" id="a02358_html_a6c17b9a72b83394d218773f9a297b77a"><div class="ttname"><a href="a02358.html#a6c17b9a72b83394d218773f9a297b77a">tesseract::Tesseract::outlines_odd</a></div><div class="ttdeci">char * outlines_odd</div><div class="ttdef"><b>Definition:</b> <a href="a00191_source.html#l00928">tesseractclass.h:928</a></div></div>
<div class="ttc" id="a00344_html_affc9a96d31e23e645355e534f11c40e9a1eac25752f2c55f1809d11d4ef917ff9"><div class="ttname"><a href="a00344.html#affc9a96d31e23e645355e534f11c40e9a1eac25752f2c55f1809d11d4ef917ff9">CR_NONE</a></div><div class="ttdef"><b>Definition:</b> <a href="a00344_source.html#l00161">pageres.h:161</a></div></div>
<div class="ttc" id="a02358_html_abaf0e879a8660f0ff78364960b9b9b8f"><div class="ttname"><a href="a02358.html#abaf0e879a8660f0ff78364960b9b9b8f">tesseract::Tesseract::potential_word_crunch</a></div><div class="ttdeci">bool potential_word_crunch(WERD_RES *word, GARBAGE_LEVEL garbage_level, bool ok_dict_word)</div><div class="ttdef"><b>Definition:</b> <a href="a00077_source.html#l00542">docqual.cpp:542</a></div></div>
<div class="ttc" id="a02358_html_a1ac173c27cc204ef8efa50dc7476296a"><div class="ttname"><a href="a02358.html#a1ac173c27cc204ef8efa50dc7476296a">tesseract::Tesseract::tessedit_preserve_row_rej_perfect_wds</a></div><div class="ttdeci">bool tessedit_preserve_row_rej_perfect_wds</div><div class="ttdef"><b>Definition:</b> <a href="a00191_source.html#l00947">tesseractclass.h:947</a></div></div>
<div class="ttc" id="a02546_html_a6cdcdaa4b0b1250ab7e14760d4b5f113"><div class="ttname"><a href="a02546.html#a6cdcdaa4b0b1250ab7e14760d4b5f113">PAGE_RES_IT::word</a></div><div class="ttdeci">WERD_RES * word() const</div><div class="ttdef"><b>Definition:</b> <a href="a00344_source.html#l00751">pageres.h:751</a></div></div>
<div class="ttc" id="a02358_html_aeeb8639cc084ba3f46e4c014ad2eaea8"><div class="ttname"><a href="a02358.html#aeeb8639cc084ba3f46e4c014ad2eaea8">tesseract::Tesseract::count_outline_errs</a></div><div class="ttdeci">int16_t count_outline_errs(char c, int16_t outline_count)</div><div class="ttdef"><b>Definition:</b> <a href="a00077_source.html#l00127">docqual.cpp:127</a></div></div>
<div class="ttc" id="a02558_html_a87856f8400f0629dc761fec0f7a17b57"><div class="ttname"><a href="a02558.html#a87856f8400f0629dc761fec0f7a17b57">PDBLK::poly_block</a></div><div class="ttdeci">POLY_BLOCK * poly_block() const</div><div class="ttdef"><b>Definition:</b> <a href="a00356_source.html#l00056">pdblock.h:56</a></div></div>
<div class="ttc" id="a02538_html"><div class="ttname"><a href="a02538.html">ROW_RES</a></div><div class="ttdef"><b>Definition:</b> <a href="a00344_source.html#l00141">pageres.h:141</a></div></div>
<div class="ttc" id="a00080_html_ac4a411895d63e3bb0bea788e92894d42a46d03f2b7d080cc8319a43ef4bad82b3"><div class="ttname"><a href="a00080.html#ac4a411895d63e3bb0bea788e92894d42a46d03f2b7d080cc8319a43ef4bad82b3">G_OK</a></div><div class="ttdef"><b>Definition:</b> <a href="a00080_source.html#l00032">docqual.h:32</a></div></div>
<div class="ttc" id="a02606_html_a76b18095a88a05db299aa84451a5f52c"><div class="ttname"><a href="a02606.html#a76b18095a88a05db299aa84451a5f52c">WERD_CHOICE::unichar_id</a></div><div class="ttdeci">UNICHAR_ID unichar_id(int index) const</div><div class="ttdef"><b>Definition:</b> <a href="a00401_source.html#l00315">ratngs.h:315</a></div></div>
<div class="ttc" id="a00530_html_a865cbe4908be24ccc32d2fbd598281d0"><div class="ttname"><a href="a00530.html#a865cbe4908be24ccc32d2fbd598281d0">BOOL8</a></div><div class="ttdeci">unsigned char BOOL8</div><div class="ttdef"><b>Definition:</b> <a href="a00530_source.html#l00034">host.h:34</a></div></div>
<div class="ttc" id="a02358_html_a4a2be7907ac8c08a04d704b316b2ee1c"><div class="ttname"><a href="a02358.html#a4a2be7907ac8c08a04d704b316b2ee1c">tesseract::Tesseract::quality_rowrej_pc</a></div><div class="ttdeci">double quality_rowrej_pc</div><div class="ttdef"><b>Definition:</b> <a href="a00191_source.html#l00965">tesseractclass.h:965</a></div></div>
<div class="ttc" id="a02526_html"><div class="ttname"><a href="a02526.html">ROW</a></div><div class="ttdef"><b>Definition:</b> <a href="a00332_source.html#l00036">ocrrow.h:36</a></div></div>
<div class="ttc" id="a02182_html_a172c4aa23ba397e24319ae095281cbcc"><div class="ttname"><a href="a02182.html#a172c4aa23ba397e24319ae095281cbcc">GenericVector::empty</a></div><div class="ttdeci">bool empty() const</div><div class="ttdef"><b>Definition:</b> <a href="a00518_source.html#l00090">genericvector.h:90</a></div></div>
<div class="ttc" id="a00596_html_a0c2bcd4462ec67ab0971b34a0f610f55"><div class="ttname"><a href="a00596.html#a0c2bcd4462ec67ab0971b34a0f610f55">tprintf</a></div><div class="ttdeci">DLLSYM void tprintf(const char *format,...)</div><div class="ttdef"><b>Definition:</b> <a href="a00596_source.html#l00037">tprintf.cpp:37</a></div></div>
<div class="ttc" id="a00449_html_ad6968adbf8f2cc44adf333ec96efb0beaff21d7c8c8992120fff35942408a00d2"><div class="ttname"><a href="a00449.html#ad6968adbf8f2cc44adf333ec96efb0beaff21d7c8c8992120fff35942408a00d2">W_BOL</a></div><div class="ttdef"><b>Definition:</b> <a href="a00449_source.html#l00034">werd.h:34</a></div></div>
<div class="ttc" id="a02358_html_a37bfb6999dc3b5d05d4eeafa38571d9f"><div class="ttname"><a href="a02358.html#a37bfb6999dc3b5d05d4eeafa38571d9f">tesseract::Tesseract::word_outline_errs</a></div><div class="ttdeci">int16_t word_outline_errs(WERD_RES *word)</div><div class="ttdef"><b>Definition:</b> <a href="a00077_source.html#l00073">docqual.cpp:73</a></div></div>
<div class="ttc" id="a02530_html_ad89f8ec4b63b4650cd9c35eb1eb82ca7"><div class="ttname"><a href="a02530.html#ad89f8ec4b63b4650cd9c35eb1eb82ca7">PAGE_RES::char_count</a></div><div class="ttdeci">int32_t char_count</div><div class="ttdef"><b>Definition:</b> <a href="a00344_source.html#l00079">pageres.h:79</a></div></div>
<div class="ttc" id="a02582_html_a4eb55be5fc2ed33312e4410f5ee2cf88"><div class="ttname"><a href="a02582.html#a4eb55be5fc2ed33312e4410f5ee2cf88">POLY_BLOCK::IsText</a></div><div class="ttdeci">bool IsText() const</div><div class="ttdef"><b>Definition:</b> <a href="a00374_source.html#l00049">polyblk.h:49</a></div></div>
<div class="ttc" id="a02358_html_a51f2ad8b2d849d90bbcfbfca3067c0f1"><div class="ttname"><a href="a02358.html#a51f2ad8b2d849d90bbcfbfca3067c0f1">tesseract::Tesseract::acceptable_word_string</a></div><div class="ttdeci">ACCEPTABLE_WERD_TYPE acceptable_word_string(const UNICHARSET &char_set, const char *s, const char *lengths)</div><div class="ttdef"><b>Definition:</b> <a href="a00071_source.html#l01764">control.cpp:1764</a></div></div>
<div class="ttc" id="a02398_html_ae6866212174ebb7b1e3f11e1a516c8a2"><div class="ttname"><a href="a02398.html#ae6866212174ebb7b1e3f11e1a516c8a2">TBLOB::NumOutlines</a></div><div class="ttdeci">int NumOutlines() const</div><div class="ttdef"><b>Definition:</b> <a href="a00227_source.html#l00464">blobs.cpp:464</a></div></div>
<div class="ttc" id="a02358_html_a267ae2256478e0caa24cc4eda6f78afa"><div class="ttname"><a href="a02358.html#a267ae2256478e0caa24cc4eda6f78afa">tesseract::Tesseract::crunch_leave_ok_strings</a></div><div class="ttdeci">bool crunch_leave_ok_strings</div><div class="ttdef"><b>Definition:</b> <a href="a00191_source.html#l00991">tesseractclass.h:991</a></div></div>
<div class="ttc" id="a02546_html_aab221a373111c4be685444b5633e22a5"><div class="ttname"><a href="a02546.html#aab221a373111c4be685444b5633e22a5">PAGE_RES_IT::page_res</a></div><div class="ttdeci">PAGE_RES * page_res</div><div class="ttdef"><b>Definition:</b> <a href="a00344_source.html#l00677">pageres.h:677</a></div></div>
<div class="ttc" id="a02358_html_a0fc0f88a88d8cf4837c6b85ab9f1fd00"><div class="ttname"><a href="a02358.html#a0fc0f88a88d8cf4837c6b85ab9f1fd00">tesseract::Tesseract::crunch_accept_ok</a></div><div class="ttdeci">bool crunch_accept_ok</div><div class="ttdef"><b>Definition:</b> <a href="a00191_source.html#l00992">tesseractclass.h:992</a></div></div>
<div class="ttc" id="a02358_html_ad6665d769dab6f71751fd64af3837674"><div class="ttname"><a href="a02358.html#ad6665d769dab6f71751fd64af3837674">tesseract::Tesseract::crunch_del_high_word</a></div><div class="ttdeci">double crunch_del_high_word</div><div class="ttdef"><b>Definition:</b> <a href="a00191_source.html#l00986">tesseractclass.h:986</a></div></div>
<div class="ttc" id="a01629_html"><div class="ttname"><a href="a01629.html">tesseract</a></div><div class="ttdef"><b>Definition:</b> <a href="a00005_source.html#l00094">baseapi.cpp:94</a></div></div>
<div class="ttc" id="a02358_html_a2cba6d61cfdced5bdea7461938b45c72"><div class="ttname"><a href="a02358.html#a2cba6d61cfdced5bdea7461938b45c72">tesseract::Tesseract::crunch_long_repetitions</a></div><div class="ttdeci">int crunch_long_repetitions</div><div class="ttdef"><b>Definition:</b> <a href="a00191_source.html#l01000">tesseractclass.h:1000</a></div></div>
<div class="ttc" id="a00080_html_ac4a411895d63e3bb0bea788e92894d42"><div class="ttname"><a href="a00080.html#ac4a411895d63e3bb0bea788e92894d42">GARBAGE_LEVEL</a></div><div class="ttdeci">GARBAGE_LEVEL</div><div class="ttdef"><b>Definition:</b> <a href="a00080_source.html#l00029">docqual.h:29</a></div></div>
<div class="ttc" id="a02402_html_a52fba22521039a79d8c1c8182f602dcc"><div class="ttname"><a href="a02402.html#a52fba22521039a79d8c1c8182f602dcc">TWERD::blobs</a></div><div class="ttdeci">GenericVector< TBLOB * > blobs</div><div class="ttdef"><b>Definition:</b> <a href="a00230_source.html#l00443">blobs.h:443</a></div></div>
<div class="ttc" id="a02358_html_a21a76e19dd03c1f03aad1b922fa3b21a"><div class="ttname"><a href="a02358.html#a21a76e19dd03c1f03aad1b922fa3b21a">tesseract::Tesseract::crunch_terrible_rating</a></div><div class="ttdeci">double crunch_terrible_rating</div><div class="ttdef"><b>Definition:</b> <a href="a00191_source.html#l00972">tesseractclass.h:972</a></div></div>
<div class="ttc" id="a02542_html_a9cc40e9e6308d5483012acd05ec9f217"><div class="ttname"><a href="a02542.html#a9cc40e9e6308d5483012acd05ec9f217">WERD_RES::reject_spaces</a></div><div class="ttdeci">bool reject_spaces</div><div class="ttdef"><b>Definition:</b> <a href="a00344_source.html#l00336">pageres.h:336</a></div></div>
<div class="ttc" id="a02358_html_aefd718b3d3abe04fba6ff083019f8374"><div class="ttname"><a href="a02358.html#aefd718b3d3abe04fba6ff083019f8374">tesseract::Tesseract::crunch_early_merge_tess_fails</a></div><div class="ttdeci">bool crunch_early_merge_tess_fails</div><div class="ttdef"><b>Definition:</b> <a href="a00191_source.html#l00970">tesseractclass.h:970</a></div></div>
<div class="ttc" id="a00401_html_a18e2c75cefe9e5b78e8ce41aa5fa25bca809574e2067a5304fbd2279d869e9b24"><div class="ttname"><a href="a00401.html#a18e2c75cefe9e5b78e8ce41aa5fa25bca809574e2067a5304fbd2279d869e9b24">NUMBER_PERM</a></div><div class="ttdef"><b>Definition:</b> <a href="a00401_source.html#l00249">ratngs.h:249</a></div></div>
<div class="ttc" id="a02530_html_a34f10ee1831fe9d88c00fc332b201bdc"><div class="ttname"><a href="a02530.html#a34f10ee1831fe9d88c00fc332b201bdc">PAGE_RES::rejected</a></div><div class="ttdeci">bool rejected</div><div class="ttdef"><b>Definition:</b> <a href="a00344_source.html#l00082">pageres.h:82</a></div></div>
<div class="ttc" id="a02546_html"><div class="ttname"><a href="a02546.html">PAGE_RES_IT</a></div><div class="ttdef"><b>Definition:</b> <a href="a00344_source.html#l00675">pageres.h:675</a></div></div>
<div class="ttc" id="a02358_html_aec01ad16a705e92500c6dc8f209ab9f8"><div class="ttname"><a href="a02358.html#aec01ad16a705e92500c6dc8f209ab9f8">tesseract::Tesseract::tessedit_unrej_any_wd</a></div><div class="ttdeci">bool tessedit_unrej_any_wd</div><div class="ttdef"><b>Definition:</b> <a href="a00191_source.html#l00869">tesseractclass.h:869</a></div></div>
<div class="ttc" id="a02834_html"><div class="ttname"><a href="a02834.html">STRING</a></div><div class="ttdef"><b>Definition:</b> <a href="a00584_source.html#l00045">strngs.h:45</a></div></div>
<div class="ttc" id="a02358_html_a82fcb38c1bdc5bce93ff69c94ef7e2b9"><div class="ttname"><a href="a02358.html#a82fcb38c1bdc5bce93ff69c94ef7e2b9">tesseract::Tesseract::crunch_del_min_width</a></div><div class="ttdeci">double crunch_del_min_width</div><div class="ttdef"><b>Definition:</b> <a href="a00191_source.html#l00984">tesseractclass.h:984</a></div></div>
<div class="ttc" id="a02534_html"><div class="ttname"><a href="a02534.html">BLOCK_RES</a></div><div class="ttdef"><b>Definition:</b> <a href="a00344_source.html#l00115">pageres.h:115</a></div></div>
<div class="ttc" id="a02358_html_a3528122ae883323b4d2a57870d9ddd7b"><div class="ttname"><a href="a02358.html#a3528122ae883323b4d2a57870d9ddd7b">tesseract::Tesseract::doc_and_block_rejection</a></div><div class="ttdeci">void doc_and_block_rejection(PAGE_RES_IT &page_res_it, bool good_quality_doc)</div><div class="ttdef"><b>Definition:</b> <a href="a00077_source.html#l00233">docqual.cpp:233</a></div></div>
<div class="ttc" id="a02358_html_aa3b5f0beacd8d0d328e66dfe8b850187"><div class="ttname"><a href="a02358.html#aa3b5f0beacd8d0d328e66dfe8b850187">tesseract::Tesseract::crunch_poor_garbage_cert</a></div><div class="ttdeci">double crunch_poor_garbage_cert</div><div class="ttdef"><b>Definition:</b> <a href="a00191_source.html#l00975">tesseractclass.h:975</a></div></div>
<div class="ttc" id="a02358_html_ab72bc025f4efb212ec99ee21091d7f10"><div class="ttname"><a href="a02358.html#ab72bc025f4efb212ec99ee21091d7f10">tesseract::Tesseract::tessedit_good_quality_unrej</a></div><div class="ttdeci">bool tessedit_good_quality_unrej</div><div class="ttdef"><b>Definition:</b> <a href="a00191_source.html#l00933">tesseractclass.h:933</a></div></div>
<div class="ttc" id="a02534_html_a441fdfc65ad274a7490eb17c87c24a77"><div class="ttname"><a href="a02534.html#a441fdfc65ad274a7490eb17c87c24a77">BLOCK_RES::rej_count</a></div><div class="ttdeci">int32_t rej_count</div><div class="ttdef"><b>Definition:</b> <a href="a00344_source.html#l00119">pageres.h:119</a></div></div>
<div class="ttc" id="a02358_html_a00cc24fc46a2c217ff7e614f4ac0db39"><div class="ttname"><a href="a02358.html#a00cc24fc46a2c217ff7e614f4ac0db39">tesseract::Tesseract::tessedit_dont_blkrej_good_wds</a></div><div class="ttdeci">bool tessedit_dont_blkrej_good_wds</div><div class="ttdef"><b>Definition:</b> <a href="a00191_source.html#l00949">tesseractclass.h:949</a></div></div>
<div class="ttc" id="a00344_html_affc9a96d31e23e645355e534f11c40e9ad0198ebd5b9e3299dd94f0c5f4d3e003"><div class="ttname"><a href="a00344.html#affc9a96d31e23e645355e534f11c40e9ad0198ebd5b9e3299dd94f0c5f4d3e003">CR_KEEP_SPACE</a></div><div class="ttdef"><b>Definition:</b> <a href="a00344_source.html#l00162">pageres.h:162</a></div></div>
<div class="ttc" id="a02542_html_a053a2aeeddc26a93a41a04fa08dd688a"><div class="ttname"><a href="a02542.html#a053a2aeeddc26a93a41a04fa08dd688a">WERD_RES::uch_set</a></div><div class="ttdeci">const UNICHARSET * uch_set</div><div class="ttdef"><b>Definition:</b> <a href="a00344_source.html#l00206">pageres.h:206</a></div></div>
<div class="ttc" id="a02358_html_a06a8ab9064d4c6da290c82e7adf53a8c"><div class="ttname"><a href="a02358.html#a06a8ab9064d4c6da290c82e7adf53a8c">tesseract::Tesseract::tilde_delete</a></div><div class="ttdeci">void tilde_delete(PAGE_RES_IT &page_res_it)</div><div class="ttdef"><b>Definition:</b> <a href="a00077_source.html#l00590">docqual.cpp:590</a></div></div>
<div class="ttc" id="a02606_html_adf200132afabc2ee6ec256e516011007"><div class="ttname"><a href="a02606.html#adf200132afabc2ee6ec256e516011007">WERD_CHOICE::unichar_string</a></div><div class="ttdeci">const STRING & unichar_string() const</div><div class="ttdef"><b>Definition:</b> <a href="a00401_source.html#l00541">ratngs.h:541</a></div></div>
<div class="ttc" id="a02358_html_a62ab8881690e98143d62f1ac528041f8"><div class="ttname"><a href="a02358.html#a62ab8881690e98143d62f1ac528041f8">tesseract::Tesseract::crunch_leave_lc_strings</a></div><div class="ttdeci">int crunch_leave_lc_strings</div><div class="ttdef"><b>Definition:</b> <a href="a00191_source.html#l00997">tesseractclass.h:997</a></div></div>
<div class="ttc" id="a02358_html_a91dd02088541c2b02ff3b70810c71eff"><div class="ttname"><a href="a02358.html#a91dd02088541c2b02ff3b70810c71eff">tesseract::Tesseract::check_debug_pt</a></div><div class="ttdeci">bool check_debug_pt(WERD_RES *word, int location)</div><div class="ttdef"><b>Definition:</b> <a href="a00071_source.html#l01868">control.cpp:1868</a></div></div>
<div class="ttc" id="a02242_html_abb2699970b61241200641216fd972ed6"><div class="ttname"><a href="a02242.html#abb2699970b61241200641216fd972ed6">tesseract::DocQualCallbacks::match_count</a></div><div class="ttdeci">int16_t match_count</div><div class="ttdef"><b>Definition:</b> <a href="a00077_source.html#l00051">docqual.cpp:51</a></div></div>
<div class="ttc" id="a00401_html_a18e2c75cefe9e5b78e8ce41aa5fa25bca5e293e54fa687876197992131e779d54"><div class="ttname"><a href="a00401.html#a18e2c75cefe9e5b78e8ce41aa5fa25bca5e293e54fa687876197992131e779d54">USER_DAWG_PERM</a></div><div class="ttdef"><b>Definition:</b> <a href="a00401_source.html#l00253">ratngs.h:253</a></div></div>
<div class="ttc" id="a02358_html_a1ede84f4a4f39a9b6f5376ea36907b98"><div class="ttname"><a href="a02358.html#a1ede84f4a4f39a9b6f5376ea36907b98">tesseract::Tesseract::tessedit_dont_rowrej_good_wds</a></div><div class="ttdeci">bool tessedit_dont_rowrej_good_wds</div><div class="ttdef"><b>Definition:</b> <a href="a00191_source.html#l00951">tesseractclass.h:951</a></div></div>
<div class="ttc" id="a02358_html_aad38132f39f060b3bf998f316abb4d76"><div class="ttname"><a href="a02358.html#aad38132f39f060b3bf998f316abb4d76">tesseract::Tesseract::tessedit_use_reject_spaces</a></div><div class="ttdeci">bool tessedit_use_reject_spaces</div><div class="ttdef"><b>Definition:</b> <a href="a00191_source.html#l00934">tesseractclass.h:934</a></div></div>
<div class="ttc" id="a02358_html_aec4f861a8e55288700ee622d3e885540"><div class="ttname"><a href="a02358.html#aec4f861a8e55288700ee622d3e885540">tesseract::Tesseract::crunch_poor_garbage_rate</a></div><div class="ttdeci">double crunch_poor_garbage_rate</div><div class="ttdef"><b>Definition:</b> <a href="a00191_source.html#l00976">tesseractclass.h:976</a></div></div>
<div class="ttc" id="a02358_html_a9771a56b87e31325c043fa195d6885ec"><div class="ttname"><a href="a02358.html#a9771a56b87e31325c043fa195d6885ec">tesseract::Tesseract::tessedit_debug_doc_rejection</a></div><div class="ttdeci">bool tessedit_debug_doc_rejection</div><div class="ttdef"><b>Definition:</b> <a href="a00191_source.html#l00960">tesseractclass.h:960</a></div></div>
<div class="ttc" id="a02358_html_a6c2fe027fce0afe0a8b4b4e3f10266a4"><div class="ttname"><a href="a02358.html#a6c2fe027fce0afe0a8b4b4e3f10266a4">tesseract::Tesseract::quality_based_rejection</a></div><div class="ttdeci">void quality_based_rejection(PAGE_RES_IT &page_res_it, bool good_quality_doc)</div><div class="ttdef"><b>Definition:</b> <a href="a00077_source.html#l00139">docqual.cpp:139</a></div></div>
<div class="ttc" id="a02546_html_ab29005f235cc738eebafb7d9ed6fe70b"><div class="ttname"><a href="a02546.html#ab29005f235cc738eebafb7d9ed6fe70b">PAGE_RES_IT::forward</a></div><div class="ttdeci">WERD_RES * forward()</div><div class="ttdef"><b>Definition:</b> <a href="a00344_source.html#l00731">pageres.h:731</a></div></div>
<div class="ttc" id="a03950_html_a55071e756e234d8c51ca08079c1847cd"><div class="ttname"><a href="a03950.html#a55071e756e234d8c51ca08079c1847cd">UNICHARSET::get_isupper</a></div><div class="ttdeci">bool get_isupper(UNICHAR_ID unichar_id) const</div><div class="ttdef"><b>Definition:</b> <a href="a00623_source.html#l00500">unicharset.h:500</a></div></div>
<div class="ttc" id="a02358_html_a40dee9aa1298b5edcd042b9ec45aeb59"><div class="ttname"><a href="a02358.html#a40dee9aa1298b5edcd042b9ec45aeb59">tesseract::Tesseract::bland_unrej</a></div><div class="ttdeci">bool bland_unrej</div><div class="ttdef"><b>Definition:</b> <a href="a00191_source.html#l00963">tesseractclass.h:963</a></div></div>
<div class="ttc" id="a02358_html_afad44e1105d7f57e1a99d9076c4a3b25"><div class="ttname"><a href="a02358.html#afad44e1105d7f57e1a99d9076c4a3b25">tesseract::Tesseract::garbage_word</a></div><div class="ttdeci">GARBAGE_LEVEL garbage_word(WERD_RES *word, BOOL8 ok_dict_word)</div><div class="ttdef"><b>Definition:</b> <a href="a00077_source.html#l00680">docqual.cpp:680</a></div></div>
<div class="ttc" id="a02538_html_afca7c9bf18393a8a1a6a2f8648d250c4"><div class="ttname"><a href="a02538.html#afca7c9bf18393a8a1a6a2f8648d250c4">ROW_RES::char_count</a></div><div class="ttdeci">int32_t char_count</div><div class="ttdef"><b>Definition:</b> <a href="a00344_source.html#l00144">pageres.h:144</a></div></div>
<div class="ttc" id="a00077_html_a1b9934928e2b953ee5e91abb58cf043f"><div class="ttname"><a href="a00077.html#a1b9934928e2b953ee5e91abb58cf043f">reject_whole_page</a></div><div class="ttdeci">void reject_whole_page(PAGE_RES_IT &page_res_it)</div><div class="ttdef"><b>Definition:</b> <a href="a00077_source.html#l00407">docqual.cpp:407</a></div></div>
<div class="ttc" id="a02398_html"><div class="ttname"><a href="a02398.html">TBLOB</a></div><div class="ttdef"><b>Definition:</b> <a href="a00230_source.html#l00268">blobs.h:268</a></div></div>
<div class="ttc" id="a02358_html_ade40da20d4ed20ac262fb25b50757623"><div class="ttname"><a href="a02358.html#ade40da20d4ed20ac262fb25b50757623">tesseract::Tesseract::tessedit_row_rej_good_docs</a></div><div class="ttdeci">bool tessedit_row_rej_good_docs</div><div class="ttdef"><b>Definition:</b> <a href="a00191_source.html#l00955">tesseractclass.h:955</a></div></div>
<div class="ttc" id="a02358_html_add8f08bb0c03f69c777d38e82cb88770"><div class="ttname"><a href="a02358.html#add8f08bb0c03f69c777d38e82cb88770">tesseract::Tesseract::word_deletable</a></div><div class="ttdeci">CRUNCH_MODE word_deletable(WERD_RES *word, int16_t &delete_mode)</div><div class="ttdef"><b>Definition:</b> <a href="a00077_source.html#l00895">docqual.cpp:895</a></div></div>
<div class="ttc" id="a02358_html_a99a1e1a4cd1134ecab8028de820ae57a"><div class="ttname"><a href="a02358.html#a99a1e1a4cd1134ecab8028de820ae57a">tesseract::Tesseract::word_char_quality</a></div><div class="ttdeci">void word_char_quality(WERD_RES *word, ROW *row, int16_t *match_count, int16_t *accepted_match_count)</div><div class="ttdef"><b>Definition:</b> <a href="a00077_source.html#l00093">docqual.cpp:93</a></div></div>
<div class="ttc" id="a02358_html_a422f7f28537d7127b0965b6224f2891e"><div class="ttname"><a href="a02358.html#a422f7f28537d7127b0965b6224f2891e">tesseract::Tesseract::crunch_small_outlines_size</a></div><div class="ttdeci">double crunch_small_outlines_size</div><div class="ttdef"><b>Definition:</b> <a href="a00191_source.html#l00988">tesseractclass.h:988</a></div></div>
<div class="ttc" id="a00080_html"><div class="ttname"><a href="a00080.html">docqual.h</a></div></div>
<div class="ttc" id="a00080_html_ac4a411895d63e3bb0bea788e92894d42ac744add072d392855d098a995acb3751"><div class="ttname"><a href="a00080.html#ac4a411895d63e3bb0bea788e92894d42ac744add072d392855d098a995acb3751">G_NEVER_CRUNCH</a></div><div class="ttdef"><b>Definition:</b> <a href="a00080_source.html#l00031">docqual.h:31</a></div></div>
<div class="ttc" id="a00401_html_a18e2c75cefe9e5b78e8ce41aa5fa25bca4fd9d3b025ecc5ea8f2248fea29543e4"><div class="ttname"><a href="a00401.html#a18e2c75cefe9e5b78e8ce41aa5fa25bca4fd9d3b025ecc5ea8f2248fea29543e4">FREQ_DAWG_PERM</a></div><div class="ttdef"><b>Definition:</b> <a href="a00401_source.html#l00254">ratngs.h:254</a></div></div>
<div class="ttc" id="a02538_html_a51d1ba1dfd848e692d39bf08f4e53042"><div class="ttname"><a href="a02538.html#a51d1ba1dfd848e692d39bf08f4e53042">ROW_RES::rej_count</a></div><div class="ttdeci">int32_t rej_count</div><div class="ttdef"><b>Definition:</b> <a href="a00344_source.html#l00145">pageres.h:145</a></div></div>
<div class="ttc" id="a02610_html_a9fee4521e71300975cb34ebb21e3fca5"><div class="ttname"><a href="a02610.html#a9fee4521e71300975cb34ebb21e3fca5">TBOX::bottom</a></div><div class="ttdeci">int16_t bottom() const</div><div class="ttdef"><b>Definition:</b> <a href="a00407_source.html#l00065">rect.h:65</a></div></div>
<div class="ttc" id="a02398_html_a3c9282cad4102157d214bcc6311cda07"><div class="ttname"><a href="a02398.html#a3c9282cad4102157d214bcc6311cda07">TBLOB::outlines</a></div><div class="ttdeci">TESSLINE * outlines</div><div class="ttdef"><b>Definition:</b> <a href="a00230_source.html#l00384">blobs.h:384</a></div></div>
<div class="ttc" id="a00074_html_af9ff5a7d7a1b9eeea7ce4106bffa7eeeaab0741a5a5ff9757ca343af255353ba0"><div class="ttname"><a href="a00074.html#af9ff5a7d7a1b9eeea7ce4106bffa7eeeaab0741a5a5ff9757ca343af255353ba0">AC_UNACCEPTABLE</a></div><div class="ttdoc">Unacceptable word. </div><div class="ttdef"><b>Definition:</b> <a href="a00074_source.html#l00030">control.h:30</a></div></div>
<div class="ttc" id="a00080_html_ac4a411895d63e3bb0bea788e92894d42a17acba0fc01478524c8214f0da82815a"><div class="ttname"><a href="a00080.html#ac4a411895d63e3bb0bea788e92894d42a17acba0fc01478524c8214f0da82815a">G_DODGY</a></div><div class="ttdef"><b>Definition:</b> <a href="a00080_source.html#l00033">docqual.h:33</a></div></div>
<div class="ttc" id="a02358_html_a10e3b50d7d9fc570d752d31b05d6971b"><div class="ttname"><a href="a02358.html#a10e3b50d7d9fc570d752d31b05d6971b">tesseract::Tesseract::crunch_del_rating</a></div><div class="ttdeci">double crunch_del_rating</div><div class="ttdef"><b>Definition:</b> <a href="a00191_source.html#l00980">tesseractclass.h:980</a></div></div>
<div class="ttc" id="a02514_html_a9e4346e037f2cc01c3c51d888531da74"><div class="ttname"><a href="a02514.html#a9e4346e037f2cc01c3c51d888531da74">BLOCK::pdblk</a></div><div class="ttdeci">PDBLK pdblk</div><div class="ttdef"><b>Definition:</b> <a href="a00320_source.html#l00192">ocrblock.h:192</a></div></div>
<div class="ttc" id="a02834_html_a7a1f2a841e8d01d5a8c05bc3ab8064eb"><div class="ttname"><a href="a02834.html#a7a1f2a841e8d01d5a8c05bc3ab8064eb">STRING::length</a></div><div class="ttdeci">int32_t length() const</div><div class="ttdef"><b>Definition:</b> <a href="a00581_source.html#l00191">strngs.cpp:191</a></div></div>
<div class="ttc" id="a00197_html"><div class="ttname"><a href="a00197.html">tessvars.h</a></div></div>
<div class="ttc" id="a02542_html_a3d42ac7ec121263e757c9b7160dfd50d"><div class="ttname"><a href="a02542.html#a3d42ac7ec121263e757c9b7160dfd50d">WERD_RES::best_choice</a></div><div class="ttdeci">WERD_CHOICE * best_choice</div><div class="ttdef"><b>Definition:</b> <a href="a00344_source.html#l00235">pageres.h:235</a></div></div>
<div class="ttc" id="a02610_html_a72fcb736ed0ddeae95e6a51b3bf8d979"><div class="ttname"><a href="a02610.html#a72fcb736ed0ddeae95e6a51b3bf8d979">TBOX::height</a></div><div class="ttdeci">int16_t height() const</div><div class="ttdef"><b>Definition:</b> <a href="a00407_source.html#l00108">rect.h:108</a></div></div>
<div class="ttc" id="a02358_html_ae69c2f057f0474b533183f618e27d447"><div class="ttname"><a href="a02358.html#ae69c2f057f0474b533183f618e27d447">tesseract::Tesseract::crunch_terrible_garbage</a></div><div class="ttdeci">bool crunch_terrible_garbage</div><div class="ttdef"><b>Definition:</b> <a href="a00191_source.html#l00973">tesseractclass.h:973</a></div></div>
<div class="ttc" id="a02358_html_ab156ed65c76c10dadacfc1121624ebc2"><div class="ttname"><a href="a02358.html#ab156ed65c76c10dadacfc1121624ebc2">tesseract::Tesseract::unrej_good_chs</a></div><div class="ttdeci">void unrej_good_chs(WERD_RES *word, ROW *row)</div><div class="ttdef"><b>Definition:</b> <a href="a00077_source.html#l00116">docqual.cpp:116</a></div></div>
<div class="ttc" id="a02242_html_a06e04c42b1ff2e5ffa24923e9f34e84e"><div class="ttname"><a href="a02242.html#a06e04c42b1ff2e5ffa24923e9f34e84e">tesseract::DocQualCallbacks::word</a></div><div class="ttdeci">WERD_RES * word</div><div class="ttdef"><b>Definition:</b> <a href="a00077_source.html#l00050">docqual.cpp:50</a></div></div>
<div class="ttc" id="a02358_html_ae98cef95f80d5939eaf80b123fd3c402"><div class="ttname"><a href="a02358.html#ae98cef95f80d5939eaf80b123fd3c402">tesseract::Tesseract::crunch_pot_poor_rate</a></div><div class="ttdeci">double crunch_pot_poor_rate</div><div class="ttdef"><b>Definition:</b> <a href="a00191_source.html#l00977">tesseractclass.h:977</a></div></div>
<div class="ttc" id="a02538_html_ad3a856f3e9217c47b8f2f54cd3908721"><div class="ttname"><a href="a02538.html#ad3a856f3e9217c47b8f2f54cd3908721">ROW_RES::row</a></div><div class="ttdeci">ROW * row</div><div class="ttdef"><b>Definition:</b> <a href="a00344_source.html#l00143">pageres.h:143</a></div></div>
<div class="ttc" id="a02358_html_aee487bb533118fcd5f1994e54ba86fff"><div class="ttname"><a href="a02358.html#aee487bb533118fcd5f1994e54ba86fff">tesseract::Tesseract::crunch_pot_poor_cert</a></div><div class="ttdeci">double crunch_pot_poor_cert</div><div class="ttdef"><b>Definition:</b> <a href="a00191_source.html#l00978">tesseractclass.h:978</a></div></div>
<div class="ttc" id="a02542_html_afc15fa7c1b5ad55d6772dea0d6865df1"><div class="ttname"><a href="a02542.html#afc15fa7c1b5ad55d6772dea0d6865df1">WERD_RES::word</a></div><div class="ttdeci">WERD * word</div><div class="ttdef"><b>Definition:</b> <a href="a00344_source.html#l00189">pageres.h:189</a></div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="navelem"><a class="el" href="dir_fce9a394c0d2c636e610a0a34fe30580.html">tesseract-ocr.master</a></li><li class="navelem"><a class="el" href="dir_fd2783e80b2d56815818e17a68fc4d98.html">src</a></li><li class="navelem"><a class="el" href="dir_f676e76c9a53ee7edd5046de803da784.html">ccmain</a></li><li class="navelem"><a class="el" href="a00077.html">docqual.cpp</a></li>
<li class="footer">Generated on Mon Oct 29 2018 11:03:42 for tesseract by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.14 </li>
</ul>
</div>
</body>
</html>