-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy patha00089_source.html
242 lines (240 loc) · 184 KB
/
a00089_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
<!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/fixspace.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('a00089_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">fixspace.cpp</div> </div>
</div><!--header-->
<div class="contents">
<a href="a00089.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: fixspace.cpp (Formerly fixspace.c)</span></div><div class="line"><a name="l00003"></a><span class="lineno"> 3</span> <span class="comment"> * Description: Implements a pass over the page res, exploring the alternative</span></div><div class="line"><a name="l00004"></a><span class="lineno"> 4</span> <span class="comment"> * spacing possibilities, trying to use context to improve the</span></div><div class="line"><a name="l00005"></a><span class="lineno"> 5</span> <span class="comment"> * word spacing</span></div><div class="line"><a name="l00006"></a><span class="lineno"> 6</span> <span class="comment"> * Author: Phil Cheatle</span></div><div class="line"><a name="l00007"></a><span class="lineno"> 7</span> <span class="comment"> * Created: Thu Oct 21 11:38:43 BST 1993</span></div><div class="line"><a name="l00008"></a><span class="lineno"> 8</span> <span class="comment"> *</span></div><div class="line"><a name="l00009"></a><span class="lineno"> 9</span> <span class="comment"> * (C) Copyright 1993, Hewlett-Packard Ltd.</span></div><div class="line"><a name="l00010"></a><span class="lineno"> 10</span> <span class="comment"> ** Licensed under the Apache License, Version 2.0 (the "License");</span></div><div class="line"><a name="l00011"></a><span class="lineno"> 11</span> <span class="comment"> ** you may not use this file except in compliance with the License.</span></div><div class="line"><a name="l00012"></a><span class="lineno"> 12</span> <span class="comment"> ** You may obtain a copy of the License at</span></div><div class="line"><a name="l00013"></a><span class="lineno"> 13</span> <span class="comment"> ** http://www.apache.org/licenses/LICENSE-2.0</span></div><div class="line"><a name="l00014"></a><span class="lineno"> 14</span> <span class="comment"> ** Unless required by applicable law or agreed to in writing, software</span></div><div class="line"><a name="l00015"></a><span class="lineno"> 15</span> <span class="comment"> ** distributed under the License is distributed on an "AS IS" BASIS,</span></div><div class="line"><a name="l00016"></a><span class="lineno"> 16</span> <span class="comment"> ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</span></div><div class="line"><a name="l00017"></a><span class="lineno"> 17</span> <span class="comment"> ** See the License for the specific language governing permissions and</span></div><div class="line"><a name="l00018"></a><span class="lineno"> 18</span> <span class="comment"> ** limitations under the License.</span></div><div class="line"><a name="l00019"></a><span class="lineno"> 19</span> <span class="comment"> *</span></div><div class="line"><a name="l00020"></a><span class="lineno"> 20</span> <span class="comment"> **********************************************************************/</span></div><div class="line"><a name="l00021"></a><span class="lineno"> 21</span> </div><div class="line"><a name="l00022"></a><span class="lineno"> 22</span> <span class="preprocessor">#include "<a class="code" href="a00092.html">fixspace.h</a>"</span></div><div class="line"><a name="l00023"></a><span class="lineno"> 23</span> <span class="preprocessor">#include <cstdint></span> <span class="comment">// for INT16_MAX, int16_t, int32_t</span></div><div class="line"><a name="l00024"></a><span class="lineno"> 24</span> <span class="preprocessor">#include "<a class="code" href="a00230.html">blobs.h</a>"</span> <span class="comment">// for TWERD, TBLOB, TESSLINE</span></div><div class="line"><a name="l00025"></a><span class="lineno"> 25</span> <span class="preprocessor">#include "<a class="code" href="a00248.html">boxword.h</a>"</span> <span class="comment">// for BoxWord</span></div><div class="line"><a name="l00026"></a><span class="lineno"> 26</span> <span class="preprocessor">#include "<a class="code" href="a00503.html">errcode.h</a>"</span> <span class="comment">// for ASSERT_HOST</span></div><div class="line"><a name="l00027"></a><span class="lineno"> 27</span> <span class="preprocessor">#include "<a class="code" href="a00530.html">host.h</a>"</span> <span class="comment">// for FALSE, TRUE</span></div><div class="line"><a name="l00028"></a><span class="lineno"> 28</span> <span class="preprocessor">#include "<a class="code" href="a00314.html">normalis.h</a>"</span> <span class="comment">// for kBlnXHeight, kBlnBaselineOffset</span></div><div class="line"><a name="l00029"></a><span class="lineno"> 29</span> <span class="preprocessor">#include "<a class="code" href="a00551.html">ocrclass.h</a>"</span> <span class="comment">// for ETEXT_DESC</span></div><div class="line"><a name="l00030"></a><span class="lineno"> 30</span> <span class="preprocessor">#include "<a class="code" href="a00344.html">pageres.h</a>"</span> <span class="comment">// for WERD_RES_IT, WERD_RES, WERD_RES_LIST</span></div><div class="line"><a name="l00031"></a><span class="lineno"> 31</span> <span class="preprocessor">#include "<a class="code" href="a00557.html">params.h</a>"</span> <span class="comment">// for IntParam, StringParam, BoolParam, Doub...</span></div><div class="line"><a name="l00032"></a><span class="lineno"> 32</span> <span class="preprocessor">#include "<a class="code" href="a00401.html">ratngs.h</a>"</span> <span class="comment">// for WERD_CHOICE, FREQ_DAWG_PERM, NUMBER_PERM</span></div><div class="line"><a name="l00033"></a><span class="lineno"> 33</span> <span class="preprocessor">#include "<a class="code" href="a00407.html">rect.h</a>"</span> <span class="comment">// for TBOX</span></div><div class="line"><a name="l00034"></a><span class="lineno"> 34</span> <span class="preprocessor">#include "<a class="code" href="a00437.html">stepblob.h</a>"</span> <span class="comment">// for C_BLOB_IT, C_BLOB_LIST, C_BLOB</span></div><div class="line"><a name="l00035"></a><span class="lineno"> 35</span> <span class="preprocessor">#include "<a class="code" href="a00584.html">strngs.h</a>"</span> <span class="comment">// for STRING</span></div><div class="line"><a name="l00036"></a><span class="lineno"> 36</span> <span class="preprocessor">#include "<a class="code" href="a00191.html">tesseractclass.h</a>"</span> <span class="comment">// for Tesseract, TesseractStats, WordData</span></div><div class="line"><a name="l00037"></a><span class="lineno"> 37</span> <span class="preprocessor">#include "<a class="code" href="a00197.html">tessvars.h</a>"</span> <span class="comment">// for debug_fp</span></div><div class="line"><a name="l00038"></a><span class="lineno"> 38</span> <span class="preprocessor">#include "<a class="code" href="a00599.html">tprintf.h</a>"</span> <span class="comment">// for tprintf</span></div><div class="line"><a name="l00039"></a><span class="lineno"> 39</span> <span class="preprocessor">#include "<a class="code" href="a00605.html">unichar.h</a>"</span> <span class="comment">// for UNICHAR_ID</span></div><div class="line"><a name="l00040"></a><span class="lineno"> 40</span> <span class="preprocessor">#include "<a class="code" href="a00623.html">unicharset.h</a>"</span> <span class="comment">// for UNICHARSET</span></div><div class="line"><a name="l00041"></a><span class="lineno"> 41</span> <span class="preprocessor">#include "<a class="code" href="a00449.html">werd.h</a>"</span> <span class="comment">// for WERD, W_EOL, W_FUZZY_NON, W_FUZZY_SP</span></div><div class="line"><a name="l00042"></a><span class="lineno"> 42</span> </div><div class="line"><a name="l00043"></a><span class="lineno"> 43</span> <span class="keyword">class </span><a class="code" href="a02514.html">BLOCK</a>;</div><div class="line"><a name="l00044"></a><span class="lineno"> 44</span> <span class="keyword">class </span><a class="code" href="a02526.html">ROW</a>;</div><div class="line"><a name="l00045"></a><span class="lineno"> 45</span> </div><div class="line"><a name="l00046"></a><span class="lineno"><a class="line" href="a00089.html#a943a2c8946e26cd62fd7a455b7e53c04"> 46</a></span> <span class="preprocessor">#define PERFECT_WERDS 999</span></div><div class="line"><a name="l00047"></a><span class="lineno"><a class="line" href="a00089.html#a22abbfce8776ec4773a672fd1544d21c"> 47</a></span> <span class="preprocessor">#define MAXSPACING 128 </span><span class="comment">/*max expected spacing in pix */</span><span class="preprocessor"></span></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> <span class="keyword">namespace </span><a class="code" href="a01629.html">tesseract</a> {</div><div class="line"><a name="l00050"></a><span class="lineno"> 50</span> </div><div class="line"><a name="l00051"></a><span class="lineno"> 51</span> <span class="comment">/**********************************************************************</span></div><div class="line"><a name="l00052"></a><span class="lineno"> 52</span> <span class="comment"> * c_blob_comparator()</span></div><div class="line"><a name="l00053"></a><span class="lineno"> 53</span> <span class="comment"> *</span></div><div class="line"><a name="l00054"></a><span class="lineno"> 54</span> <span class="comment"> * Blob comparator used to sort a blob list so that blobs are in increasing</span></div><div class="line"><a name="l00055"></a><span class="lineno"> 55</span> <span class="comment"> * order of left edge.</span></div><div class="line"><a name="l00056"></a><span class="lineno"> 56</span> <span class="comment"> **********************************************************************/</span></div><div class="line"><a name="l00057"></a><span class="lineno"> 57</span> </div><div class="line"><a name="l00058"></a><span class="lineno"> 58</span> <span class="keyword">static</span> <span class="keywordtype">int</span> c_blob_comparator( <span class="comment">// sort blobs</span></div><div class="line"><a name="l00059"></a><span class="lineno"> 59</span>  <span class="keyword">const</span> <span class="keywordtype">void</span> *blob1p, <span class="comment">// ptr to ptr to blob1</span></div><div class="line"><a name="l00060"></a><span class="lineno"> 60</span>  <span class="keyword">const</span> <span class="keywordtype">void</span> *blob2p <span class="comment">// ptr to ptr to blob2</span></div><div class="line"><a name="l00061"></a><span class="lineno"> 61</span>  ) {</div><div class="line"><a name="l00062"></a><span class="lineno"> 62</span>  <span class="keyword">const</span> <a class="code" href="a02634.html">C_BLOB</a> *blob1 = *<span class="keyword">reinterpret_cast<</span><span class="keyword">const </span><a class="code" href="a02634.html">C_BLOB</a>* const*<span class="keyword">></span>(blob1p);</div><div class="line"><a name="l00063"></a><span class="lineno"> 63</span>  <span class="keyword">const</span> <a class="code" href="a02634.html">C_BLOB</a> *blob2 = *<span class="keyword">reinterpret_cast<</span><span class="keyword">const </span><a class="code" href="a02634.html">C_BLOB</a>* const*<span class="keyword">></span>(blob2p);</div><div class="line"><a name="l00064"></a><span class="lineno"> 64</span> </div><div class="line"><a name="l00065"></a><span class="lineno"> 65</span>  <span class="keywordflow">return</span> blob1-><a class="code" href="a02634.html#a50bd7e9c66492bebdba6aadcc806bf93">bounding_box</a> ().<a class="code" href="a02610.html#a8e9dce0d30d2213598cd4befe0028c99">left</a> () - blob2-><a class="code" href="a02634.html#a50bd7e9c66492bebdba6aadcc806bf93">bounding_box</a> ().<a class="code" href="a02610.html#a8e9dce0d30d2213598cd4befe0028c99">left</a> ();</div><div class="line"><a name="l00066"></a><span class="lineno"> 66</span> }</div><div class="line"><a name="l00067"></a><span class="lineno"> 67</span> </div><div class="line"><a name="l00078"></a><span class="lineno"><a class="line" href="a02358.html#ae08214652c8e5a05331ae2a095a57849"> 78</a></span> <span class="keywordtype">void</span> <a class="code" href="a02358.html#ae08214652c8e5a05331ae2a095a57849">Tesseract::fix_fuzzy_spaces</a>(<a class="code" href="a02786.html">ETEXT_DESC</a> *monitor,</div><div class="line"><a name="l00079"></a><span class="lineno"> 79</span>  int32_t word_count,</div><div class="line"><a name="l00080"></a><span class="lineno"> 80</span>  <a class="code" href="a02530.html">PAGE_RES</a> *page_res) {</div><div class="line"><a name="l00081"></a><span class="lineno"> 81</span>  BLOCK_RES_IT block_res_it;</div><div class="line"><a name="l00082"></a><span class="lineno"> 82</span>  ROW_RES_IT row_res_it;</div><div class="line"><a name="l00083"></a><span class="lineno"> 83</span>  WERD_RES_IT word_res_it_from;</div><div class="line"><a name="l00084"></a><span class="lineno"> 84</span>  WERD_RES_IT word_res_it_to;</div><div class="line"><a name="l00085"></a><span class="lineno"> 85</span>  <a class="code" href="a02542.html">WERD_RES</a> *word_res;</div><div class="line"><a name="l00086"></a><span class="lineno"> 86</span>  WERD_RES_LIST fuzzy_space_words;</div><div class="line"><a name="l00087"></a><span class="lineno"> 87</span>  int16_t new_length;</div><div class="line"><a name="l00088"></a><span class="lineno"> 88</span>  <span class="keywordtype">bool</span> prevent_null_wd_fixsp; <span class="comment">// DON'T process blobless wds</span></div><div class="line"><a name="l00089"></a><span class="lineno"> 89</span>  int32_t word_index; <span class="comment">// current word</span></div><div class="line"><a name="l00090"></a><span class="lineno"> 90</span> </div><div class="line"><a name="l00091"></a><span class="lineno"> 91</span>  block_res_it.set_to_list(&page_res-><a class="code" href="a02530.html#aa7b060bebb1b720f66121026c42e2195">block_res_list</a>);</div><div class="line"><a name="l00092"></a><span class="lineno"> 92</span>  word_index = 0;</div><div class="line"><a name="l00093"></a><span class="lineno"> 93</span>  <span class="keywordflow">for</span> (block_res_it.mark_cycle_pt(); !block_res_it.cycled_list();</div><div class="line"><a name="l00094"></a><span class="lineno"> 94</span>  block_res_it.forward()) {</div><div class="line"><a name="l00095"></a><span class="lineno"> 95</span>  row_res_it.set_to_list(&block_res_it.data()->row_res_list);</div><div class="line"><a name="l00096"></a><span class="lineno"> 96</span>  <span class="keywordflow">for</span> (row_res_it.mark_cycle_pt(); !row_res_it.cycled_list();</div><div class="line"><a name="l00097"></a><span class="lineno"> 97</span>  row_res_it.forward()) {</div><div class="line"><a name="l00098"></a><span class="lineno"> 98</span>  word_res_it_from.set_to_list(&row_res_it.data()->word_res_list);</div><div class="line"><a name="l00099"></a><span class="lineno"> 99</span>  <span class="keywordflow">while</span> (!word_res_it_from.at_last()) {</div><div class="line"><a name="l00100"></a><span class="lineno"> 100</span>  word_res = word_res_it_from.data();</div><div class="line"><a name="l00101"></a><span class="lineno"> 101</span>  <span class="keywordflow">while</span> (!word_res_it_from.at_last() &&</div><div class="line"><a name="l00102"></a><span class="lineno"> 102</span>  !(word_res-><a class="code" href="a02542.html#a3d0f242e487b778a2139957e7ca3cc0b">combination</a> ||</div><div class="line"><a name="l00103"></a><span class="lineno"> 103</span>  word_res_it_from.data_relative(1)->word->flag(<a class="code" href="a00449.html#ad6968adbf8f2cc44adf333ec96efb0bea675eadd051ea82d1f288751799bfa31c">W_FUZZY_NON</a>) ||</div><div class="line"><a name="l00104"></a><span class="lineno"> 104</span>  word_res_it_from.data_relative(1)->word->flag(<a class="code" href="a00449.html#ad6968adbf8f2cc44adf333ec96efb0bea3580884b5b0335502fb928db4a0a2024">W_FUZZY_SP</a>))) {</div><div class="line"><a name="l00105"></a><span class="lineno"> 105</span>  <a class="code" href="a02358.html#a29c537a9b369b926c319225343684199">fix_sp_fp_word</a>(word_res_it_from, row_res_it.data()->row,</div><div class="line"><a name="l00106"></a><span class="lineno"> 106</span>  block_res_it.data()->block);</div><div class="line"><a name="l00107"></a><span class="lineno"> 107</span>  word_res = word_res_it_from.forward();</div><div class="line"><a name="l00108"></a><span class="lineno"> 108</span>  word_index++;</div><div class="line"><a name="l00109"></a><span class="lineno"> 109</span>  <span class="keywordflow">if</span> (monitor != <span class="keyword">nullptr</span>) {</div><div class="line"><a name="l00110"></a><span class="lineno"> 110</span>  monitor-><a class="code" href="a02786.html#a3b103545a36543dd4f16c496838d99eb">ocr_alive</a> = <a class="code" href="a00014.html#aa8cecfc5c5c054d2875c03e77b7be15d">TRUE</a>;</div><div class="line"><a name="l00111"></a><span class="lineno"> 111</span>  monitor-><a class="code" href="a02786.html#a469c1ab091847e37969871bd89cf1005">progress</a> = 90 + 5 * word_index / word_count;</div><div class="line"><a name="l00112"></a><span class="lineno"> 112</span>  <span class="keywordflow">if</span> (monitor-><a class="code" href="a02786.html#a84e8d7c830a6b08ad1ebdbdf872c887a">deadline_exceeded</a>() ||</div><div class="line"><a name="l00113"></a><span class="lineno"> 113</span>  (monitor-><a class="code" href="a02786.html#afcea4319ceed9b37f3c43eec9ec5d55a">cancel</a> != <span class="keyword">nullptr</span> &&</div><div class="line"><a name="l00114"></a><span class="lineno"> 114</span>  (*monitor-><a class="code" href="a02786.html#afcea4319ceed9b37f3c43eec9ec5d55a">cancel</a>)(monitor-><a class="code" href="a02786.html#a4844a3e9868a0fde7ad2fcaa37f5c5f1">cancel_this</a>, stats_.<a class="code" href="a02350.html#a2ffb76e8ef50a240ee744901405252bc">dict_words</a>)))</div><div class="line"><a name="l00115"></a><span class="lineno"> 115</span>  <span class="keywordflow">return</span>;</div><div class="line"><a name="l00116"></a><span class="lineno"> 116</span>  }</div><div class="line"><a name="l00117"></a><span class="lineno"> 117</span>  }</div><div class="line"><a name="l00118"></a><span class="lineno"> 118</span> </div><div class="line"><a name="l00119"></a><span class="lineno"> 119</span>  <span class="keywordflow">if</span> (!word_res_it_from.at_last()) {</div><div class="line"><a name="l00120"></a><span class="lineno"> 120</span>  word_res_it_to = word_res_it_from;</div><div class="line"><a name="l00121"></a><span class="lineno"> 121</span>  prevent_null_wd_fixsp =</div><div class="line"><a name="l00122"></a><span class="lineno"> 122</span>  word_res-><a class="code" href="a02542.html#afc15fa7c1b5ad55d6772dea0d6865df1">word</a>-><a class="code" href="a02638.html#a174baefaa99afbfdbf444e4199f3b529">cblob_list</a>()->empty();</div><div class="line"><a name="l00123"></a><span class="lineno"> 123</span>  <span class="keywordflow">if</span> (<a class="code" href="a02358.html#a91dd02088541c2b02ff3b70810c71eff">check_debug_pt</a>(word_res, 60))</div><div class="line"><a name="l00124"></a><span class="lineno"> 124</span>  <a class="code" href="a02358.html#a84ce57f4e554cefb5162ba46aed84e3d">debug_fix_space_level</a>.set_value(10);</div><div class="line"><a name="l00125"></a><span class="lineno"> 125</span>  word_res_it_to.forward();</div><div class="line"><a name="l00126"></a><span class="lineno"> 126</span>  word_index++;</div><div class="line"><a name="l00127"></a><span class="lineno"> 127</span>  <span class="keywordflow">if</span> (monitor != <span class="keyword">nullptr</span>) {</div><div class="line"><a name="l00128"></a><span class="lineno"> 128</span>  monitor-><a class="code" href="a02786.html#a3b103545a36543dd4f16c496838d99eb">ocr_alive</a> = <a class="code" href="a00014.html#aa8cecfc5c5c054d2875c03e77b7be15d">TRUE</a>;</div><div class="line"><a name="l00129"></a><span class="lineno"> 129</span>  monitor-><a class="code" href="a02786.html#a469c1ab091847e37969871bd89cf1005">progress</a> = 90 + 5 * word_index / word_count;</div><div class="line"><a name="l00130"></a><span class="lineno"> 130</span>  <span class="keywordflow">if</span> (monitor-><a class="code" href="a02786.html#a84e8d7c830a6b08ad1ebdbdf872c887a">deadline_exceeded</a>() ||</div><div class="line"><a name="l00131"></a><span class="lineno"> 131</span>  (monitor-><a class="code" href="a02786.html#afcea4319ceed9b37f3c43eec9ec5d55a">cancel</a> != <span class="keyword">nullptr</span> &&</div><div class="line"><a name="l00132"></a><span class="lineno"> 132</span>  (*monitor-><a class="code" href="a02786.html#afcea4319ceed9b37f3c43eec9ec5d55a">cancel</a>)(monitor-><a class="code" href="a02786.html#a4844a3e9868a0fde7ad2fcaa37f5c5f1">cancel_this</a>, stats_.<a class="code" href="a02350.html#a2ffb76e8ef50a240ee744901405252bc">dict_words</a>)))</div><div class="line"><a name="l00133"></a><span class="lineno"> 133</span>  <span class="keywordflow">return</span>;</div><div class="line"><a name="l00134"></a><span class="lineno"> 134</span>  }</div><div class="line"><a name="l00135"></a><span class="lineno"> 135</span>  <span class="keywordflow">while</span> (!word_res_it_to.at_last () &&</div><div class="line"><a name="l00136"></a><span class="lineno"> 136</span>  (word_res_it_to.data_relative(1)->word->flag(<a class="code" href="a00449.html#ad6968adbf8f2cc44adf333ec96efb0bea675eadd051ea82d1f288751799bfa31c">W_FUZZY_NON</a>) ||</div><div class="line"><a name="l00137"></a><span class="lineno"> 137</span>  word_res_it_to.data_relative(1)->word->flag(<a class="code" href="a00449.html#ad6968adbf8f2cc44adf333ec96efb0bea3580884b5b0335502fb928db4a0a2024">W_FUZZY_SP</a>))) {</div><div class="line"><a name="l00138"></a><span class="lineno"> 138</span>  <span class="keywordflow">if</span> (<a class="code" href="a02358.html#a91dd02088541c2b02ff3b70810c71eff">check_debug_pt</a>(word_res, 60))</div><div class="line"><a name="l00139"></a><span class="lineno"> 139</span>  <a class="code" href="a02358.html#a84ce57f4e554cefb5162ba46aed84e3d">debug_fix_space_level</a>.set_value(10);</div><div class="line"><a name="l00140"></a><span class="lineno"> 140</span>  <span class="keywordflow">if</span> (word_res-><a class="code" href="a02542.html#afc15fa7c1b5ad55d6772dea0d6865df1">word</a>-><a class="code" href="a02638.html#a174baefaa99afbfdbf444e4199f3b529">cblob_list</a>()->empty())</div><div class="line"><a name="l00141"></a><span class="lineno"> 141</span>  prevent_null_wd_fixsp = <span class="keyword">true</span>;</div><div class="line"><a name="l00142"></a><span class="lineno"> 142</span>  word_res = word_res_it_to.forward();</div><div class="line"><a name="l00143"></a><span class="lineno"> 143</span>  }</div><div class="line"><a name="l00144"></a><span class="lineno"> 144</span>  <span class="keywordflow">if</span> (<a class="code" href="a02358.html#a91dd02088541c2b02ff3b70810c71eff">check_debug_pt</a>(word_res, 60))</div><div class="line"><a name="l00145"></a><span class="lineno"> 145</span>  <a class="code" href="a02358.html#a84ce57f4e554cefb5162ba46aed84e3d">debug_fix_space_level</a>.set_value(10);</div><div class="line"><a name="l00146"></a><span class="lineno"> 146</span>  <span class="keywordflow">if</span> (word_res-><a class="code" href="a02542.html#afc15fa7c1b5ad55d6772dea0d6865df1">word</a>-><a class="code" href="a02638.html#a174baefaa99afbfdbf444e4199f3b529">cblob_list</a>()->empty())</div><div class="line"><a name="l00147"></a><span class="lineno"> 147</span>  prevent_null_wd_fixsp = <span class="keyword">true</span>;</div><div class="line"><a name="l00148"></a><span class="lineno"> 148</span>  <span class="keywordflow">if</span> (prevent_null_wd_fixsp) {</div><div class="line"><a name="l00149"></a><span class="lineno"> 149</span>  word_res_it_from = word_res_it_to;</div><div class="line"><a name="l00150"></a><span class="lineno"> 150</span>  } <span class="keywordflow">else</span> {</div><div class="line"><a name="l00151"></a><span class="lineno"> 151</span>  fuzzy_space_words.assign_to_sublist(&word_res_it_from,</div><div class="line"><a name="l00152"></a><span class="lineno"> 152</span>  &word_res_it_to);</div><div class="line"><a name="l00153"></a><span class="lineno"> 153</span>  <a class="code" href="a02358.html#a5651e88a55922ff44e3e64bc089f393d">fix_fuzzy_space_list</a>(fuzzy_space_words,</div><div class="line"><a name="l00154"></a><span class="lineno"> 154</span>  row_res_it.data()->row,</div><div class="line"><a name="l00155"></a><span class="lineno"> 155</span>  block_res_it.data()->block);</div><div class="line"><a name="l00156"></a><span class="lineno"> 156</span>  new_length = fuzzy_space_words.length();</div><div class="line"><a name="l00157"></a><span class="lineno"> 157</span>  word_res_it_from.add_list_before(&fuzzy_space_words);</div><div class="line"><a name="l00158"></a><span class="lineno"> 158</span>  <span class="keywordflow">for</span> (;</div><div class="line"><a name="l00159"></a><span class="lineno"> 159</span>  !word_res_it_from.at_last() && new_length > 0;</div><div class="line"><a name="l00160"></a><span class="lineno"> 160</span>  new_length--) {</div><div class="line"><a name="l00161"></a><span class="lineno"> 161</span>  word_res_it_from.forward();</div><div class="line"><a name="l00162"></a><span class="lineno"> 162</span>  }</div><div class="line"><a name="l00163"></a><span class="lineno"> 163</span>  }</div><div class="line"><a name="l00164"></a><span class="lineno"> 164</span>  <span class="keywordflow">if</span> (<a class="code" href="a02358.html#a5439cd8199c72bfc34530cc41c252a64">test_pt</a>)</div><div class="line"><a name="l00165"></a><span class="lineno"> 165</span>  <a class="code" href="a02358.html#a84ce57f4e554cefb5162ba46aed84e3d">debug_fix_space_level</a>.set_value(0);</div><div class="line"><a name="l00166"></a><span class="lineno"> 166</span>  }</div><div class="line"><a name="l00167"></a><span class="lineno"> 167</span>  <a class="code" href="a02358.html#a29c537a9b369b926c319225343684199">fix_sp_fp_word</a>(word_res_it_from, row_res_it.data()->row,</div><div class="line"><a name="l00168"></a><span class="lineno"> 168</span>  block_res_it.data()->block);</div><div class="line"><a name="l00169"></a><span class="lineno"> 169</span>  <span class="comment">// Last word in row</span></div><div class="line"><a name="l00170"></a><span class="lineno"> 170</span>  }</div><div class="line"><a name="l00171"></a><span class="lineno"> 171</span>  }</div><div class="line"><a name="l00172"></a><span class="lineno"> 172</span>  }</div><div class="line"><a name="l00173"></a><span class="lineno"> 173</span> }</div><div class="line"><a name="l00174"></a><span class="lineno"> 174</span> </div><div class="line"><a name="l00175"></a><span class="lineno"><a class="line" href="a02358.html#a5651e88a55922ff44e3e64bc089f393d"> 175</a></span> <span class="keywordtype">void</span> <a class="code" href="a02358.html#a5651e88a55922ff44e3e64bc089f393d">Tesseract::fix_fuzzy_space_list</a>(WERD_RES_LIST &best_perm,</div><div class="line"><a name="l00176"></a><span class="lineno"> 176</span>  <a class="code" href="a02526.html">ROW</a> *row,</div><div class="line"><a name="l00177"></a><span class="lineno"> 177</span>  <a class="code" href="a02514.html">BLOCK</a>* block) {</div><div class="line"><a name="l00178"></a><span class="lineno"> 178</span>  int16_t best_score;</div><div class="line"><a name="l00179"></a><span class="lineno"> 179</span>  WERD_RES_LIST current_perm;</div><div class="line"><a name="l00180"></a><span class="lineno"> 180</span>  int16_t current_score;</div><div class="line"><a name="l00181"></a><span class="lineno"> 181</span>  <span class="keywordtype">bool</span> improved = <span class="keyword">false</span>;</div><div class="line"><a name="l00182"></a><span class="lineno"> 182</span> </div><div class="line"><a name="l00183"></a><span class="lineno"> 183</span>  best_score = <a class="code" href="a02358.html#aa4047f6ce76f44d45d1081874f620e55">eval_word_spacing</a>(best_perm); <span class="comment">// default score</span></div><div class="line"><a name="l00184"></a><span class="lineno"> 184</span>  <a class="code" href="a02358.html#a5db19e9dc0edbab33a470cb20ebd2e56">dump_words</a>(best_perm, best_score, 1, improved);</div><div class="line"><a name="l00185"></a><span class="lineno"> 185</span> </div><div class="line"><a name="l00186"></a><span class="lineno"> 186</span>  <span class="keywordflow">if</span> (best_score != <a class="code" href="a00089.html#a943a2c8946e26cd62fd7a455b7e53c04">PERFECT_WERDS</a>)</div><div class="line"><a name="l00187"></a><span class="lineno"> 187</span>  <a class="code" href="a00089.html#aa9c4bc6127388800d066093c261667ea">initialise_search</a>(best_perm, current_perm);</div><div class="line"><a name="l00188"></a><span class="lineno"> 188</span> </div><div class="line"><a name="l00189"></a><span class="lineno"> 189</span>  <span class="keywordflow">while</span> ((best_score != <a class="code" href="a00089.html#a943a2c8946e26cd62fd7a455b7e53c04">PERFECT_WERDS</a>) && !current_perm.empty()) {</div><div class="line"><a name="l00190"></a><span class="lineno"> 190</span>  <a class="code" href="a02358.html#add15a5ad3d01e0903c71fcab8abd8cf4">match_current_words</a>(current_perm, row, block);</div><div class="line"><a name="l00191"></a><span class="lineno"> 191</span>  current_score = <a class="code" href="a02358.html#aa4047f6ce76f44d45d1081874f620e55">eval_word_spacing</a>(current_perm);</div><div class="line"><a name="l00192"></a><span class="lineno"> 192</span>  <a class="code" href="a02358.html#a5db19e9dc0edbab33a470cb20ebd2e56">dump_words</a>(current_perm, current_score, 2, improved);</div><div class="line"><a name="l00193"></a><span class="lineno"> 193</span>  <span class="keywordflow">if</span> (current_score > best_score) {</div><div class="line"><a name="l00194"></a><span class="lineno"> 194</span>  best_perm.clear();</div><div class="line"><a name="l00195"></a><span class="lineno"> 195</span>  best_perm.deep_copy(&current_perm, &<a class="code" href="a02542.html#a11b3e5ebfef7835732e2085742891363">WERD_RES::deep_copy</a>);</div><div class="line"><a name="l00196"></a><span class="lineno"> 196</span>  best_score = current_score;</div><div class="line"><a name="l00197"></a><span class="lineno"> 197</span>  improved = <span class="keyword">true</span>;</div><div class="line"><a name="l00198"></a><span class="lineno"> 198</span>  }</div><div class="line"><a name="l00199"></a><span class="lineno"> 199</span>  <span class="keywordflow">if</span> (current_score < <a class="code" href="a00089.html#a943a2c8946e26cd62fd7a455b7e53c04">PERFECT_WERDS</a>)</div><div class="line"><a name="l00200"></a><span class="lineno"> 200</span>  <a class="code" href="a00089.html#a7373a91e50199f38d52143e22c269f92">transform_to_next_perm</a>(current_perm);</div><div class="line"><a name="l00201"></a><span class="lineno"> 201</span>  }</div><div class="line"><a name="l00202"></a><span class="lineno"> 202</span>  <a class="code" href="a02358.html#a5db19e9dc0edbab33a470cb20ebd2e56">dump_words</a>(best_perm, best_score, 3, improved);</div><div class="line"><a name="l00203"></a><span class="lineno"> 203</span> }</div><div class="line"><a name="l00204"></a><span class="lineno"> 204</span> </div><div class="line"><a name="l00205"></a><span class="lineno"> 205</span> } <span class="comment">// namespace tesseract</span></div><div class="line"><a name="l00206"></a><span class="lineno"> 206</span> </div><div class="line"><a name="l00207"></a><span class="lineno"><a class="line" href="a00092.html#aa9c4bc6127388800d066093c261667ea"> 207</a></span> <span class="keywordtype">void</span> <a class="code" href="a00089.html#aa9c4bc6127388800d066093c261667ea">initialise_search</a>(WERD_RES_LIST &src_list, WERD_RES_LIST &new_list) {</div><div class="line"><a name="l00208"></a><span class="lineno"> 208</span>  WERD_RES_IT src_it(&src_list);</div><div class="line"><a name="l00209"></a><span class="lineno"> 209</span>  WERD_RES_IT new_it(&new_list);</div><div class="line"><a name="l00210"></a><span class="lineno"> 210</span>  <a class="code" href="a02542.html">WERD_RES</a> *src_wd;</div><div class="line"><a name="l00211"></a><span class="lineno"> 211</span>  <a class="code" href="a02542.html">WERD_RES</a> *new_wd;</div><div class="line"><a name="l00212"></a><span class="lineno"> 212</span> </div><div class="line"><a name="l00213"></a><span class="lineno"> 213</span>  <span class="keywordflow">for</span> (src_it.mark_cycle_pt(); !src_it.cycled_list(); src_it.forward()) {</div><div class="line"><a name="l00214"></a><span class="lineno"> 214</span>  src_wd = src_it.data();</div><div class="line"><a name="l00215"></a><span class="lineno"> 215</span>  <span class="keywordflow">if</span> (!src_wd-><a class="code" href="a02542.html#a3d0f242e487b778a2139957e7ca3cc0b">combination</a>) {</div><div class="line"><a name="l00216"></a><span class="lineno"> 216</span>  new_wd = <a class="code" href="a02542.html#a11b3e5ebfef7835732e2085742891363">WERD_RES::deep_copy</a>(src_wd);</div><div class="line"><a name="l00217"></a><span class="lineno"> 217</span>  new_wd-><a class="code" href="a02542.html#a3d0f242e487b778a2139957e7ca3cc0b">combination</a> = <span class="keyword">false</span>;</div><div class="line"><a name="l00218"></a><span class="lineno"> 218</span>  new_wd-><a class="code" href="a02542.html#a4ffd6b844b62d19df43effdc3faec8e3">part_of_combo</a> = <span class="keyword">false</span>;</div><div class="line"><a name="l00219"></a><span class="lineno"> 219</span>  new_it.add_after_then_move(new_wd);</div><div class="line"><a name="l00220"></a><span class="lineno"> 220</span>  }</div><div class="line"><a name="l00221"></a><span class="lineno"> 221</span>  }</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> <span class="keyword">namespace </span><a class="code" href="a01629.html">tesseract</a> {</div><div class="line"><a name="l00226"></a><span class="lineno"><a class="line" href="a02358.html#add15a5ad3d01e0903c71fcab8abd8cf4"> 226</a></span> <span class="keywordtype">void</span> <a class="code" href="a02358.html#add15a5ad3d01e0903c71fcab8abd8cf4">Tesseract::match_current_words</a>(WERD_RES_LIST &words, <a class="code" href="a02526.html">ROW</a> *row,</div><div class="line"><a name="l00227"></a><span class="lineno"> 227</span>  <a class="code" href="a02514.html">BLOCK</a>* block) {</div><div class="line"><a name="l00228"></a><span class="lineno"> 228</span>  WERD_RES_IT word_it(&words);</div><div class="line"><a name="l00229"></a><span class="lineno"> 229</span>  <a class="code" href="a02542.html">WERD_RES</a> *word;</div><div class="line"><a name="l00230"></a><span class="lineno"> 230</span>  <span class="comment">// Since we are not using PAGE_RES to iterate over words, we need to update</span></div><div class="line"><a name="l00231"></a><span class="lineno"> 231</span>  <span class="comment">// prev_word_best_choice_ before calling classify_word_pass2().</span></div><div class="line"><a name="l00232"></a><span class="lineno"> 232</span>  <a class="code" href="a04866.html#a143608f482c6c0c4f312740e6a5f5fd9">prev_word_best_choice_</a> = <span class="keyword">nullptr</span>;</div><div class="line"><a name="l00233"></a><span class="lineno"> 233</span>  <span class="keywordflow">for</span> (word_it.mark_cycle_pt(); !word_it.cycled_list(); word_it.forward()) {</div><div class="line"><a name="l00234"></a><span class="lineno"> 234</span>  word = word_it.data();</div><div class="line"><a name="l00235"></a><span class="lineno"> 235</span>  <span class="keywordflow">if</span> ((!word-><a class="code" href="a02542.html#a4ffd6b844b62d19df43effdc3faec8e3">part_of_combo</a>) && (word-><a class="code" href="a02542.html#a3a92c8c9750d78631d75998f008f366a">box_word</a> == <span class="keyword">nullptr</span>)) {</div><div class="line"><a name="l00236"></a><span class="lineno"> 236</span>  <a class="code" href="a02354.html">WordData</a> word_data(block, row, word);</div><div class="line"><a name="l00237"></a><span class="lineno"> 237</span>  <a class="code" href="a02358.html#a2e84c55acc11dc7d1840d0aac4984e6a">SetupWordPassN</a>(2, &word_data);</div><div class="line"><a name="l00238"></a><span class="lineno"> 238</span>  <a class="code" href="a02358.html#a0ed7f2173b7ac61d85a0660821a03572">classify_word_and_language</a>(2, <span class="keyword">nullptr</span>, &word_data);</div><div class="line"><a name="l00239"></a><span class="lineno"> 239</span>  }</div><div class="line"><a name="l00240"></a><span class="lineno"> 240</span>  <a class="code" href="a04866.html#a143608f482c6c0c4f312740e6a5f5fd9">prev_word_best_choice_</a> = word-><a class="code" href="a02542.html#a3d42ac7ec121263e757c9b7160dfd50d">best_choice</a>;</div><div class="line"><a name="l00241"></a><span class="lineno"> 241</span>  }</div><div class="line"><a name="l00242"></a><span class="lineno"> 242</span> }</div><div class="line"><a name="l00243"></a><span class="lineno"> 243</span> </div><div class="line"><a name="l00269"></a><span class="lineno"><a class="line" href="a02358.html#aa4047f6ce76f44d45d1081874f620e55"> 269</a></span> int16_t <a class="code" href="a02358.html#aa4047f6ce76f44d45d1081874f620e55">Tesseract::eval_word_spacing</a>(WERD_RES_LIST &word_res_list) {</div><div class="line"><a name="l00270"></a><span class="lineno"> 270</span>  WERD_RES_IT word_res_it(&word_res_list);</div><div class="line"><a name="l00271"></a><span class="lineno"> 271</span>  int16_t total_score = 0;</div><div class="line"><a name="l00272"></a><span class="lineno"> 272</span>  int16_t word_count = 0;</div><div class="line"><a name="l00273"></a><span class="lineno"> 273</span>  int16_t done_word_count = 0;</div><div class="line"><a name="l00274"></a><span class="lineno"> 274</span>  int16_t word_len;</div><div class="line"><a name="l00275"></a><span class="lineno"> 275</span>  int16_t i;</div><div class="line"><a name="l00276"></a><span class="lineno"> 276</span>  int16_t offset;</div><div class="line"><a name="l00277"></a><span class="lineno"> 277</span>  <a class="code" href="a02542.html">WERD_RES</a> *word; <span class="comment">// current word</span></div><div class="line"><a name="l00278"></a><span class="lineno"> 278</span>  int16_t prev_word_score = 0;</div><div class="line"><a name="l00279"></a><span class="lineno"> 279</span>  <span class="keywordtype">bool</span> prev_word_done = <span class="keyword">false</span>;</div><div class="line"><a name="l00280"></a><span class="lineno"> 280</span>  <span class="keywordtype">bool</span> prev_char_1 = <span class="keyword">false</span>; <span class="comment">// prev ch a "1/I/l"?</span></div><div class="line"><a name="l00281"></a><span class="lineno"> 281</span>  <span class="keywordtype">bool</span> prev_char_digit = <span class="keyword">false</span>; <span class="comment">// prev ch 2..9 or 0</span></div><div class="line"><a name="l00282"></a><span class="lineno"> 282</span>  <span class="keywordtype">bool</span> current_char_1 = <span class="keyword">false</span>;</div><div class="line"><a name="l00283"></a><span class="lineno"> 283</span>  <span class="keywordtype">bool</span> current_word_ok_so_far;</div><div class="line"><a name="l00284"></a><span class="lineno"> 284</span>  <a class="code" href="a02834.html">STRING</a> punct_chars = <span class="stringliteral">"!\"`',.:;"</span>;</div><div class="line"><a name="l00285"></a><span class="lineno"> 285</span>  <span class="keywordtype">bool</span> prev_char_punct = <span class="keyword">false</span>;</div><div class="line"><a name="l00286"></a><span class="lineno"> 286</span>  <span class="keywordtype">bool</span> current_char_punct = <span class="keyword">false</span>;</div><div class="line"><a name="l00287"></a><span class="lineno"> 287</span>  <span class="keywordtype">bool</span> word_done = <span class="keyword">false</span>;</div><div class="line"><a name="l00288"></a><span class="lineno"> 288</span> </div><div class="line"><a name="l00289"></a><span class="lineno"> 289</span>  <span class="keywordflow">do</span> {</div><div class="line"><a name="l00290"></a><span class="lineno"> 290</span>  word = word_res_it.data();</div><div class="line"><a name="l00291"></a><span class="lineno"> 291</span>  word_done = <a class="code" href="a02358.html#a0d8d0ea277fd39e9a268ff4d9355a86f">fixspace_thinks_word_done</a>(word);</div><div class="line"><a name="l00292"></a><span class="lineno"> 292</span>  word_count++;</div><div class="line"><a name="l00293"></a><span class="lineno"> 293</span>  <span class="keywordflow">if</span> (word-><a class="code" href="a02542.html#a91228b4814b63ea8efdf17a2e8a9a0f3">tess_failed</a>) {</div><div class="line"><a name="l00294"></a><span class="lineno"> 294</span>  total_score += prev_word_score;</div><div class="line"><a name="l00295"></a><span class="lineno"> 295</span>  <span class="keywordflow">if</span> (prev_word_done)</div><div class="line"><a name="l00296"></a><span class="lineno"> 296</span>  done_word_count++;</div><div class="line"><a name="l00297"></a><span class="lineno"> 297</span>  prev_word_score = 0;</div><div class="line"><a name="l00298"></a><span class="lineno"> 298</span>  prev_char_1 = <span class="keyword">false</span>;</div><div class="line"><a name="l00299"></a><span class="lineno"> 299</span>  prev_char_digit = <span class="keyword">false</span>;</div><div class="line"><a name="l00300"></a><span class="lineno"> 300</span>  prev_word_done = <span class="keyword">false</span>;</div><div class="line"><a name="l00301"></a><span class="lineno"> 301</span>  } <span class="keywordflow">else</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="comment"> Can we add the prev word score and potentially count this word?</span></div><div class="line"><a name="l00304"></a><span class="lineno"> 304</span> <span class="comment"> Yes IF it didn't end in a 1 when the first char of this word is a digit</span></div><div class="line"><a name="l00305"></a><span class="lineno"> 305</span> <span class="comment"> AND it didn't end in a digit when the first char of this word is a 1</span></div><div class="line"><a name="l00306"></a><span class="lineno"> 306</span> <span class="comment"> */</span></div><div class="line"><a name="l00307"></a><span class="lineno"> 307</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="l00308"></a><span class="lineno"> 308</span>  current_word_ok_so_far = <span class="keyword">false</span>;</div><div class="line"><a name="l00309"></a><span class="lineno"> 309</span>  <span class="keywordflow">if</span> (!((prev_char_1 && <a class="code" href="a02358.html#a69ec5a78d7bd4cebf62c2ec108f84431">digit_or_numeric_punct</a>(word, 0)) ||</div><div class="line"><a name="l00310"></a><span class="lineno"> 310</span>  (prev_char_digit && (</div><div class="line"><a name="l00311"></a><span class="lineno"> 311</span>  (word_done &&</div><div class="line"><a name="l00312"></a><span class="lineno"> 312</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>()[0] == 1 &&</div><div class="line"><a name="l00313"></a><span class="lineno"> 313</span>  word-><a class="code" href="a02542.html#a3d42ac7ec121263e757c9b7160dfd50d">best_choice</a>-><a class="code" href="a02606.html#adf200132afabc2ee6ec256e516011007">unichar_string</a>()[0] == <span class="charliteral">'1'</span>) ||</div><div class="line"><a name="l00314"></a><span class="lineno"> 314</span>  (!word_done && <a class="code" href="a02834.html">STRING</a>(<a class="code" href="a02358.html#ad6f2d3b057387aecbf3763ea1b19eb7c">conflict_set_I_l_1</a>).<a class="code" href="a02834.html#ac8c4ceca1e688adcdf188aef108dc18b">contains</a>(</div><div class="line"><a name="l00315"></a><span class="lineno"> 315</span>  word-><a class="code" href="a02542.html#a3d42ac7ec121263e757c9b7160dfd50d">best_choice</a>-><a class="code" href="a02606.html#adf200132afabc2ee6ec256e516011007">unichar_string</a>()[0])))))) {</div><div class="line"><a name="l00316"></a><span class="lineno"> 316</span>  total_score += prev_word_score;</div><div class="line"><a name="l00317"></a><span class="lineno"> 317</span>  <span class="keywordflow">if</span> (prev_word_done)</div><div class="line"><a name="l00318"></a><span class="lineno"> 318</span>  done_word_count++;</div><div class="line"><a name="l00319"></a><span class="lineno"> 319</span>  current_word_ok_so_far = word_done;</div><div class="line"><a name="l00320"></a><span class="lineno"> 320</span>  }</div><div class="line"><a name="l00321"></a><span class="lineno"> 321</span> </div><div class="line"><a name="l00322"></a><span class="lineno"> 322</span>  <span class="keywordflow">if</span> (current_word_ok_so_far) {</div><div class="line"><a name="l00323"></a><span class="lineno"> 323</span>  prev_word_done = <span class="keyword">true</span>;</div><div class="line"><a name="l00324"></a><span class="lineno"> 324</span>  prev_word_score = word_len;</div><div class="line"><a name="l00325"></a><span class="lineno"> 325</span>  } <span class="keywordflow">else</span> {</div><div class="line"><a name="l00326"></a><span class="lineno"> 326</span>  prev_word_done = <span class="keyword">false</span>;</div><div class="line"><a name="l00327"></a><span class="lineno"> 327</span>  prev_word_score = 0;</div><div class="line"><a name="l00328"></a><span class="lineno"> 328</span>  }</div><div class="line"><a name="l00329"></a><span class="lineno"> 329</span> </div><div class="line"><a name="l00330"></a><span class="lineno"> 330</span>  <span class="comment">/* Add 1 to total score for every joined 1 regardless of context and</span></div><div class="line"><a name="l00331"></a><span class="lineno"> 331</span> <span class="comment"> rejtn */</span></div><div class="line"><a name="l00332"></a><span class="lineno"> 332</span>  <span class="keywordflow">for</span> (i = 0, prev_char_1 = <span class="keyword">false</span>; i < word_len; i++) {</div><div class="line"><a name="l00333"></a><span class="lineno"> 333</span>  current_char_1 = word-><a class="code" href="a02542.html#a3d42ac7ec121263e757c9b7160dfd50d">best_choice</a>-><a class="code" href="a02606.html#adf200132afabc2ee6ec256e516011007">unichar_string</a>()[i] == <span class="charliteral">'1'</span>;</div><div class="line"><a name="l00334"></a><span class="lineno"> 334</span>  <span class="keywordflow">if</span> (prev_char_1 || (current_char_1 && (i > 0)))</div><div class="line"><a name="l00335"></a><span class="lineno"> 335</span>  total_score++;</div><div class="line"><a name="l00336"></a><span class="lineno"> 336</span>  prev_char_1 = current_char_1;</div><div class="line"><a name="l00337"></a><span class="lineno"> 337</span>  }</div><div class="line"><a name="l00338"></a><span class="lineno"> 338</span> </div><div class="line"><a name="l00339"></a><span class="lineno"> 339</span>  <span class="comment">/* Add 1 to total score for every joined punctuation regardless of context</span></div><div class="line"><a name="l00340"></a><span class="lineno"> 340</span> <span class="comment"> and rejtn */</span></div><div class="line"><a name="l00341"></a><span class="lineno"> 341</span>  <span class="keywordflow">if</span> (<a class="code" href="a02358.html#a4701b35a81d1af098b643453569c439f">tessedit_prefer_joined_punct</a>) {</div><div class="line"><a name="l00342"></a><span class="lineno"> 342</span>  <span class="keywordflow">for</span> (i = 0, offset = 0, prev_char_punct = <span class="keyword">false</span>; i < word_len;</div><div class="line"><a name="l00343"></a><span class="lineno"> 343</span>  offset += word-><a class="code" href="a02542.html#a3d42ac7ec121263e757c9b7160dfd50d">best_choice</a>-><a class="code" href="a02606.html#adaecd80cfe44e00e9c4647859b1c87e0">unichar_lengths</a>()[i++]) {</div><div class="line"><a name="l00344"></a><span class="lineno"> 344</span>  current_char_punct =</div><div class="line"><a name="l00345"></a><span class="lineno"> 345</span>  punct_chars.<a class="code" href="a02834.html#ac8c4ceca1e688adcdf188aef108dc18b">contains</a>(word-><a class="code" href="a02542.html#a3d42ac7ec121263e757c9b7160dfd50d">best_choice</a>-><a class="code" href="a02606.html#adf200132afabc2ee6ec256e516011007">unichar_string</a>()[offset]);</div><div class="line"><a name="l00346"></a><span class="lineno"> 346</span>  <span class="keywordflow">if</span> (prev_char_punct || (current_char_punct && i > 0))</div><div class="line"><a name="l00347"></a><span class="lineno"> 347</span>  total_score++;</div><div class="line"><a name="l00348"></a><span class="lineno"> 348</span>  prev_char_punct = current_char_punct;</div><div class="line"><a name="l00349"></a><span class="lineno"> 349</span>  }</div><div class="line"><a name="l00350"></a><span class="lineno"> 350</span>  }</div><div class="line"><a name="l00351"></a><span class="lineno"> 351</span>  prev_char_digit = <a class="code" href="a02358.html#a69ec5a78d7bd4cebf62c2ec108f84431">digit_or_numeric_punct</a>(word, word_len - 1);</div><div class="line"><a name="l00352"></a><span class="lineno"> 352</span>  <span class="keywordflow">for</span> (i = 0, offset = 0; i < word_len - 1;</div><div class="line"><a name="l00353"></a><span class="lineno"> 353</span>  offset += word-><a class="code" href="a02542.html#a3d42ac7ec121263e757c9b7160dfd50d">best_choice</a>-><a class="code" href="a02606.html#adaecd80cfe44e00e9c4647859b1c87e0">unichar_lengths</a>()[i++]);</div><div class="line"><a name="l00354"></a><span class="lineno"> 354</span>  prev_char_1 =</div><div class="line"><a name="l00355"></a><span class="lineno"> 355</span>  ((word_done && (word-><a class="code" href="a02542.html#a3d42ac7ec121263e757c9b7160dfd50d">best_choice</a>-><a class="code" href="a02606.html#adf200132afabc2ee6ec256e516011007">unichar_string</a>()[offset] == <span class="charliteral">'1'</span>))</div><div class="line"><a name="l00356"></a><span class="lineno"> 356</span>  || (!word_done && <a class="code" href="a02834.html">STRING</a>(<a class="code" href="a02358.html#ad6f2d3b057387aecbf3763ea1b19eb7c">conflict_set_I_l_1</a>).<a class="code" href="a02834.html#ac8c4ceca1e688adcdf188aef108dc18b">contains</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>()[offset])));</div><div class="line"><a name="l00358"></a><span class="lineno"> 358</span>  }</div><div class="line"><a name="l00359"></a><span class="lineno"> 359</span>  <span class="comment">/* Find next word */</span></div><div class="line"><a name="l00360"></a><span class="lineno"> 360</span>  <span class="keywordflow">do</span> {</div><div class="line"><a name="l00361"></a><span class="lineno"> 361</span>  word_res_it.forward();</div><div class="line"><a name="l00362"></a><span class="lineno"> 362</span>  } <span class="keywordflow">while</span> (word_res_it.data()->part_of_combo);</div><div class="line"><a name="l00363"></a><span class="lineno"> 363</span>  } <span class="keywordflow">while</span> (!word_res_it.at_first());</div><div class="line"><a name="l00364"></a><span class="lineno"> 364</span>  total_score += prev_word_score;</div><div class="line"><a name="l00365"></a><span class="lineno"> 365</span>  <span class="keywordflow">if</span> (prev_word_done)</div><div class="line"><a name="l00366"></a><span class="lineno"> 366</span>  done_word_count++;</div><div class="line"><a name="l00367"></a><span class="lineno"> 367</span>  <span class="keywordflow">if</span> (done_word_count == word_count)</div><div class="line"><a name="l00368"></a><span class="lineno"> 368</span>  <span class="keywordflow">return</span> <a class="code" href="a00089.html#a943a2c8946e26cd62fd7a455b7e53c04">PERFECT_WERDS</a>;</div><div class="line"><a name="l00369"></a><span class="lineno"> 369</span>  <span class="keywordflow">else</span></div><div class="line"><a name="l00370"></a><span class="lineno"> 370</span>  <span class="keywordflow">return</span> total_score;</div><div class="line"><a name="l00371"></a><span class="lineno"> 371</span> }</div><div class="line"><a name="l00372"></a><span class="lineno"> 372</span> </div><div class="line"><a name="l00373"></a><span class="lineno"><a class="line" href="a02358.html#a69ec5a78d7bd4cebf62c2ec108f84431"> 373</a></span> <span class="keywordtype">bool</span> <a class="code" href="a02358.html#a69ec5a78d7bd4cebf62c2ec108f84431">Tesseract::digit_or_numeric_punct</a>(<a class="code" href="a02542.html">WERD_RES</a> *word, <span class="keywordtype">int</span> char_position) {</div><div class="line"><a name="l00374"></a><span class="lineno"> 374</span>  <span class="keywordtype">int</span> i;</div><div class="line"><a name="l00375"></a><span class="lineno"> 375</span>  <span class="keywordtype">int</span> offset;</div><div class="line"><a name="l00376"></a><span class="lineno"> 376</span> </div><div class="line"><a name="l00377"></a><span class="lineno"> 377</span>  <span class="keywordflow">for</span> (i = 0, offset = 0; i < char_position;</div><div class="line"><a name="l00378"></a><span class="lineno"> 378</span>  offset += word-><a class="code" href="a02542.html#a3d42ac7ec121263e757c9b7160dfd50d">best_choice</a>-><a class="code" href="a02606.html#adaecd80cfe44e00e9c4647859b1c87e0">unichar_lengths</a>()[i++]);</div><div class="line"><a name="l00379"></a><span class="lineno"> 379</span>  <span class="keywordflow">return</span> (</div><div class="line"><a name="l00380"></a><span class="lineno"> 380</span>  word-><a class="code" href="a02542.html#a053a2aeeddc26a93a41a04fa08dd688a">uch_set</a>-><a class="code" href="a03950.html#a98079b3ce062183388c653eee9838e3c">get_isdigit</a>(</div><div class="line"><a name="l00381"></a><span class="lineno"> 381</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>() + offset,</div><div class="line"><a name="l00382"></a><span class="lineno"> 382</span>  word-><a class="code" href="a02542.html#a3d42ac7ec121263e757c9b7160dfd50d">best_choice</a>-><a class="code" href="a02606.html#adaecd80cfe44e00e9c4647859b1c87e0">unichar_lengths</a>()[i]) ||</div><div class="line"><a name="l00383"></a><span class="lineno"> 383</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="l00384"></a><span class="lineno"> 384</span>  <a class="code" href="a02834.html">STRING</a>(<a class="code" href="a02358.html#af53f5a112178df66fe23baca0d082d68">numeric_punctuation</a>).<a class="code" href="a02834.html#ac8c4ceca1e688adcdf188aef108dc18b">contains</a>(</div><div class="line"><a name="l00385"></a><span class="lineno"> 385</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>()[offset])));</div><div class="line"><a name="l00386"></a><span class="lineno"> 386</span> }</div><div class="line"><a name="l00387"></a><span class="lineno"> 387</span> </div><div class="line"><a name="l00388"></a><span class="lineno"> 388</span> } <span class="comment">// namespace tesseract</span></div><div class="line"><a name="l00389"></a><span class="lineno"> 389</span> </div><div class="line"><a name="l00390"></a><span class="lineno"> 390</span> </div><div class="line"><a name="l00402"></a><span class="lineno"><a class="line" href="a00092.html#a7373a91e50199f38d52143e22c269f92"> 402</a></span> <span class="keywordtype">void</span> <a class="code" href="a00089.html#a7373a91e50199f38d52143e22c269f92">transform_to_next_perm</a>(WERD_RES_LIST &words) {</div><div class="line"><a name="l00403"></a><span class="lineno"> 403</span>  WERD_RES_IT word_it(&words);</div><div class="line"><a name="l00404"></a><span class="lineno"> 404</span>  WERD_RES_IT prev_word_it(&words);</div><div class="line"><a name="l00405"></a><span class="lineno"> 405</span>  <a class="code" href="a02542.html">WERD_RES</a> *word;</div><div class="line"><a name="l00406"></a><span class="lineno"> 406</span>  <a class="code" href="a02542.html">WERD_RES</a> *prev_word;</div><div class="line"><a name="l00407"></a><span class="lineno"> 407</span>  <a class="code" href="a02542.html">WERD_RES</a> *combo;</div><div class="line"><a name="l00408"></a><span class="lineno"> 408</span>  <a class="code" href="a02638.html">WERD</a> *copy_word;</div><div class="line"><a name="l00409"></a><span class="lineno"> 409</span>  int16_t prev_right = -INT16_MAX;</div><div class="line"><a name="l00410"></a><span class="lineno"> 410</span>  <a class="code" href="a02610.html">TBOX</a> box;</div><div class="line"><a name="l00411"></a><span class="lineno"> 411</span>  int16_t gap;</div><div class="line"><a name="l00412"></a><span class="lineno"> 412</span>  int16_t min_gap = INT16_MAX;</div><div class="line"><a name="l00413"></a><span class="lineno"> 413</span> </div><div class="line"><a name="l00414"></a><span class="lineno"> 414</span>  <span class="keywordflow">for</span> (word_it.mark_cycle_pt(); !word_it.cycled_list(); word_it.forward()) {</div><div class="line"><a name="l00415"></a><span class="lineno"> 415</span>  word = word_it.data();</div><div class="line"><a name="l00416"></a><span class="lineno"> 416</span>  <span class="keywordflow">if</span> (!word-><a class="code" href="a02542.html#a4ffd6b844b62d19df43effdc3faec8e3">part_of_combo</a>) {</div><div class="line"><a name="l00417"></a><span class="lineno"> 417</span>  box = word-><a class="code" href="a02542.html#afc15fa7c1b5ad55d6772dea0d6865df1">word</a>-><a class="code" href="a02638.html#ad35a2fd78555195a3dedcdd01094d0d4">bounding_box</a>();</div><div class="line"><a name="l00418"></a><span class="lineno"> 418</span>  <span class="keywordflow">if</span> (prev_right > -INT16_MAX) {</div><div class="line"><a name="l00419"></a><span class="lineno"> 419</span>  gap = box.<a class="code" href="a02610.html#a8e9dce0d30d2213598cd4befe0028c99">left</a>() - prev_right;</div><div class="line"><a name="l00420"></a><span class="lineno"> 420</span>  <span class="keywordflow">if</span> (gap < min_gap)</div><div class="line"><a name="l00421"></a><span class="lineno"> 421</span>  min_gap = gap;</div><div class="line"><a name="l00422"></a><span class="lineno"> 422</span>  }</div><div class="line"><a name="l00423"></a><span class="lineno"> 423</span>  prev_right = box.<a class="code" href="a02610.html#af74fa3bf628c9426cd6f1141a87dc2e0">right</a>();</div><div class="line"><a name="l00424"></a><span class="lineno"> 424</span>  }</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>  <span class="keywordflow">if</span> (min_gap < INT16_MAX) {</div><div class="line"><a name="l00427"></a><span class="lineno"> 427</span>  prev_right = -INT16_MAX; <span class="comment">// back to start</span></div><div class="line"><a name="l00428"></a><span class="lineno"> 428</span>  word_it.set_to_list(&words);</div><div class="line"><a name="l00429"></a><span class="lineno"> 429</span>  <span class="comment">// Note: we can't use cycle_pt due to inserted combos at start of list.</span></div><div class="line"><a name="l00430"></a><span class="lineno"> 430</span>  <span class="keywordflow">for</span> (; (prev_right == -INT16_MAX) || !word_it.at_first();</div><div class="line"><a name="l00431"></a><span class="lineno"> 431</span>  word_it.forward()) {</div><div class="line"><a name="l00432"></a><span class="lineno"> 432</span>  word = word_it.data();</div><div class="line"><a name="l00433"></a><span class="lineno"> 433</span>  <span class="keywordflow">if</span> (!word-><a class="code" href="a02542.html#a4ffd6b844b62d19df43effdc3faec8e3">part_of_combo</a>) {</div><div class="line"><a name="l00434"></a><span class="lineno"> 434</span>  box = word-><a class="code" href="a02542.html#afc15fa7c1b5ad55d6772dea0d6865df1">word</a>-><a class="code" href="a02638.html#ad35a2fd78555195a3dedcdd01094d0d4">bounding_box</a>();</div><div class="line"><a name="l00435"></a><span class="lineno"> 435</span>  <span class="keywordflow">if</span> (prev_right > -INT16_MAX) {</div><div class="line"><a name="l00436"></a><span class="lineno"> 436</span>  gap = box.<a class="code" href="a02610.html#a8e9dce0d30d2213598cd4befe0028c99">left</a>() - prev_right;</div><div class="line"><a name="l00437"></a><span class="lineno"> 437</span>  <span class="keywordflow">if</span> (gap <= min_gap) {</div><div class="line"><a name="l00438"></a><span class="lineno"> 438</span>  prev_word = prev_word_it.data();</div><div class="line"><a name="l00439"></a><span class="lineno"> 439</span>  <span class="keywordflow">if</span> (prev_word-><a class="code" href="a02542.html#a3d0f242e487b778a2139957e7ca3cc0b">combination</a>) {</div><div class="line"><a name="l00440"></a><span class="lineno"> 440</span>  combo = prev_word;</div><div class="line"><a name="l00441"></a><span class="lineno"> 441</span>  } <span class="keywordflow">else</span> {</div><div class="line"><a name="l00442"></a><span class="lineno"> 442</span>  <span class="comment">/* Make a new combination and insert before</span></div><div class="line"><a name="l00443"></a><span class="lineno"> 443</span> <span class="comment"> * the first word being joined. */</span></div><div class="line"><a name="l00444"></a><span class="lineno"> 444</span>  copy_word = <span class="keyword">new</span> <a class="code" href="a02638.html">WERD</a>;</div><div class="line"><a name="l00445"></a><span class="lineno"> 445</span>  *copy_word = *(prev_word-><a class="code" href="a02542.html#afc15fa7c1b5ad55d6772dea0d6865df1">word</a>);</div><div class="line"><a name="l00446"></a><span class="lineno"> 446</span>  <span class="comment">// deep copy</span></div><div class="line"><a name="l00447"></a><span class="lineno"> 447</span>  combo = <span class="keyword">new</span> <a class="code" href="a02542.html">WERD_RES</a>(copy_word);</div><div class="line"><a name="l00448"></a><span class="lineno"> 448</span>  combo-><a class="code" href="a02542.html#a3d0f242e487b778a2139957e7ca3cc0b">combination</a> = <a class="code" href="a00014.html#aa8cecfc5c5c054d2875c03e77b7be15d">TRUE</a>;</div><div class="line"><a name="l00449"></a><span class="lineno"> 449</span>  combo-><a class="code" href="a02542.html#a42ec9dbb998f7da714ace13ee30cb86e">x_height</a> = prev_word-><a class="code" href="a02542.html#a42ec9dbb998f7da714ace13ee30cb86e">x_height</a>;</div><div class="line"><a name="l00450"></a><span class="lineno"> 450</span>  prev_word-><a class="code" href="a02542.html#a4ffd6b844b62d19df43effdc3faec8e3">part_of_combo</a> = <span class="keyword">true</span>;</div><div class="line"><a name="l00451"></a><span class="lineno"> 451</span>  prev_word_it.add_before_then_move(combo);</div><div class="line"><a name="l00452"></a><span class="lineno"> 452</span>  }</div><div class="line"><a name="l00453"></a><span class="lineno"> 453</span>  combo-><a class="code" href="a02542.html#afc15fa7c1b5ad55d6772dea0d6865df1">word</a>-><a class="code" href="a02638.html#aa84fa612a8864def8df4b7df26168aca">set_flag</a>(<a class="code" href="a00449.html#ad6968adbf8f2cc44adf333ec96efb0bea62efb985a62d85e014ee5ab039dd50ce">W_EOL</a>, 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="l00454"></a><span class="lineno"> 454</span>  <span class="keywordflow">if</span> (word-><a class="code" href="a02542.html#a3d0f242e487b778a2139957e7ca3cc0b">combination</a>) {</div><div class="line"><a name="l00455"></a><span class="lineno"> 455</span>  combo-><a class="code" href="a02542.html#afc15fa7c1b5ad55d6772dea0d6865df1">word</a>-><a class="code" href="a02638.html#ad856eb3b9230d14fe8f013bfd03d8828">join_on</a>(word-><a class="code" href="a02542.html#afc15fa7c1b5ad55d6772dea0d6865df1">word</a>);</div><div class="line"><a name="l00456"></a><span class="lineno"> 456</span>  <span class="comment">// Move blobs to combo</span></div><div class="line"><a name="l00457"></a><span class="lineno"> 457</span>  <span class="comment">// old combo no longer needed</span></div><div class="line"><a name="l00458"></a><span class="lineno"> 458</span>  <span class="keyword">delete</span> word_it.extract();</div><div class="line"><a name="l00459"></a><span class="lineno"> 459</span>  } <span class="keywordflow">else</span> {</div><div class="line"><a name="l00460"></a><span class="lineno"> 460</span>  <span class="comment">// Copy current wd to combo</span></div><div class="line"><a name="l00461"></a><span class="lineno"> 461</span>  combo-><a class="code" href="a02542.html#a3badcd252947547aadeb3d2bfe2f980b">copy_on</a>(word);</div><div class="line"><a name="l00462"></a><span class="lineno"> 462</span>  word-><a class="code" href="a02542.html#a4ffd6b844b62d19df43effdc3faec8e3">part_of_combo</a> = <span class="keyword">true</span>;</div><div class="line"><a name="l00463"></a><span class="lineno"> 463</span>  }</div><div class="line"><a name="l00464"></a><span class="lineno"> 464</span>  combo-><a class="code" href="a02542.html#a2bd2ff4f993746fc87d3ee88357a4a88">done</a> = <a class="code" href="a00014.html#aa93f0eb578d23995850d61f7d61c55c1">FALSE</a>;</div><div class="line"><a name="l00465"></a><span class="lineno"> 465</span>  combo-><a class="code" href="a02542.html#a6ef9853bc0dca7249a30c897bcba4aba">ClearResults</a>();</div><div class="line"><a name="l00466"></a><span class="lineno"> 466</span>  } <span class="keywordflow">else</span> {</div><div class="line"><a name="l00467"></a><span class="lineno"> 467</span>  prev_word_it = word_it; <span class="comment">// catch up</span></div><div class="line"><a name="l00468"></a><span class="lineno"> 468</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>  prev_right = box.<a class="code" href="a02610.html#af74fa3bf628c9426cd6f1141a87dc2e0">right</a>();</div><div class="line"><a name="l00471"></a><span class="lineno"> 471</span>  }</div><div class="line"><a name="l00472"></a><span class="lineno"> 472</span>  }</div><div class="line"><a name="l00473"></a><span class="lineno"> 473</span>  } <span class="keywordflow">else</span> {</div><div class="line"><a name="l00474"></a><span class="lineno"> 474</span>  words.clear(); <span class="comment">// signal termination</span></div><div class="line"><a name="l00475"></a><span class="lineno"> 475</span>  }</div><div class="line"><a name="l00476"></a><span class="lineno"> 476</span> }</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> <span class="keyword">namespace </span><a class="code" href="a01629.html">tesseract</a> {</div><div class="line"><a name="l00479"></a><span class="lineno"><a class="line" href="a02358.html#a5db19e9dc0edbab33a470cb20ebd2e56"> 479</a></span> <span class="keywordtype">void</span> <a class="code" href="a02358.html#a5db19e9dc0edbab33a470cb20ebd2e56">Tesseract::dump_words</a>(WERD_RES_LIST &perm, int16_t score,</div><div class="line"><a name="l00480"></a><span class="lineno"> 480</span>  int16_t mode, <span class="keywordtype">bool</span> improved) {</div><div class="line"><a name="l00481"></a><span class="lineno"> 481</span>  WERD_RES_IT word_res_it(&perm);</div><div class="line"><a name="l00482"></a><span class="lineno"> 482</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#a84ce57f4e554cefb5162ba46aed84e3d">debug_fix_space_level</a> > 0) {</div><div class="line"><a name="l00484"></a><span class="lineno"> 484</span>  <span class="keywordflow">if</span> (mode == 1) {</div><div class="line"><a name="l00485"></a><span class="lineno"> 485</span>  stats_.<a class="code" href="a02350.html#aaddff0b5e3101637acc25da59fe97065">dump_words_str</a> = <span class="stringliteral">""</span>;</div><div class="line"><a name="l00486"></a><span class="lineno"> 486</span>  <span class="keywordflow">for</span> (word_res_it.mark_cycle_pt(); !word_res_it.cycled_list();</div><div class="line"><a name="l00487"></a><span class="lineno"> 487</span>  word_res_it.forward()) {</div><div class="line"><a name="l00488"></a><span class="lineno"> 488</span>  <span class="keywordflow">if</span> (!word_res_it.data()->part_of_combo) {</div><div class="line"><a name="l00489"></a><span class="lineno"> 489</span>  stats_.<a class="code" href="a02350.html#aaddff0b5e3101637acc25da59fe97065">dump_words_str</a> +=</div><div class="line"><a name="l00490"></a><span class="lineno"> 490</span>  word_res_it.data()->best_choice->unichar_string();</div><div class="line"><a name="l00491"></a><span class="lineno"> 491</span>  stats_.<a class="code" href="a02350.html#aaddff0b5e3101637acc25da59fe97065">dump_words_str</a> += <span class="charliteral">' '</span>;</div><div class="line"><a name="l00492"></a><span class="lineno"> 492</span>  }</div><div class="line"><a name="l00493"></a><span class="lineno"> 493</span>  }</div><div class="line"><a name="l00494"></a><span class="lineno"> 494</span>  }</div><div class="line"><a name="l00495"></a><span class="lineno"> 495</span> </div><div class="line"><a name="l00496"></a><span class="lineno"> 496</span>  <span class="keywordflow">if</span> (<a class="code" href="a02358.html#a84ce57f4e554cefb5162ba46aed84e3d">debug_fix_space_level</a> > 1) {</div><div class="line"><a name="l00497"></a><span class="lineno"> 497</span>  <span class="keywordflow">switch</span> (mode) {</div><div class="line"><a name="l00498"></a><span class="lineno"> 498</span>  <span class="keywordflow">case</span> 1:</div><div class="line"><a name="l00499"></a><span class="lineno"> 499</span>  <a class="code" href="a00596.html#a0c2bcd4462ec67ab0971b34a0f610f55">tprintf</a>(<span class="stringliteral">"EXTRACTED (%d): \""</span>, score);</div><div class="line"><a name="l00500"></a><span class="lineno"> 500</span>  <span class="keywordflow">break</span>;</div><div class="line"><a name="l00501"></a><span class="lineno"> 501</span>  <span class="keywordflow">case</span> 2:</div><div class="line"><a name="l00502"></a><span class="lineno"> 502</span>  <a class="code" href="a00596.html#a0c2bcd4462ec67ab0971b34a0f610f55">tprintf</a>(<span class="stringliteral">"TESTED (%d): \""</span>, score);</div><div class="line"><a name="l00503"></a><span class="lineno"> 503</span>  <span class="keywordflow">break</span>;</div><div class="line"><a name="l00504"></a><span class="lineno"> 504</span>  <span class="keywordflow">case</span> 3:</div><div class="line"><a name="l00505"></a><span class="lineno"> 505</span>  <a class="code" href="a00596.html#a0c2bcd4462ec67ab0971b34a0f610f55">tprintf</a>(<span class="stringliteral">"RETURNED (%d): \""</span>, score);</div><div class="line"><a name="l00506"></a><span class="lineno"> 506</span>  <span class="keywordflow">break</span>;</div><div class="line"><a name="l00507"></a><span class="lineno"> 507</span>  }</div><div class="line"><a name="l00508"></a><span class="lineno"> 508</span> </div><div class="line"><a name="l00509"></a><span class="lineno"> 509</span>  <span class="keywordflow">for</span> (word_res_it.mark_cycle_pt(); !word_res_it.cycled_list();</div><div class="line"><a name="l00510"></a><span class="lineno"> 510</span>  word_res_it.forward()) {</div><div class="line"><a name="l00511"></a><span class="lineno"> 511</span>  <span class="keywordflow">if</span> (!word_res_it.data()->part_of_combo) {</div><div class="line"><a name="l00512"></a><span class="lineno"> 512</span>  <a class="code" href="a00596.html#a0c2bcd4462ec67ab0971b34a0f610f55">tprintf</a>(<span class="stringliteral">"%s/%1d "</span>,</div><div class="line"><a name="l00513"></a><span class="lineno"> 513</span>  word_res_it.data()->best_choice->unichar_string().string(),</div><div class="line"><a name="l00514"></a><span class="lineno"> 514</span>  (int)word_res_it.data()->best_choice->permuter());</div><div class="line"><a name="l00515"></a><span class="lineno"> 515</span>  }</div><div class="line"><a name="l00516"></a><span class="lineno"> 516</span>  }</div><div class="line"><a name="l00517"></a><span class="lineno"> 517</span>  <a class="code" href="a00596.html#a0c2bcd4462ec67ab0971b34a0f610f55">tprintf</a>(<span class="stringliteral">"\"\n"</span>);</div><div class="line"><a name="l00518"></a><span class="lineno"> 518</span>  } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (improved) {</div><div class="line"><a name="l00519"></a><span class="lineno"> 519</span>  <a class="code" href="a00596.html#a0c2bcd4462ec67ab0971b34a0f610f55">tprintf</a>(<span class="stringliteral">"FIX SPACING \"%s\" => \""</span>, stats_.<a class="code" href="a02350.html#aaddff0b5e3101637acc25da59fe97065">dump_words_str</a>.<a class="code" href="a02834.html#abf0a7b3c6ae39a46e5441f28f61de5de">string</a>());</div><div class="line"><a name="l00520"></a><span class="lineno"> 520</span>  <span class="keywordflow">for</span> (word_res_it.mark_cycle_pt(); !word_res_it.cycled_list();</div><div class="line"><a name="l00521"></a><span class="lineno"> 521</span>  word_res_it.forward()) {</div><div class="line"><a name="l00522"></a><span class="lineno"> 522</span>  <span class="keywordflow">if</span> (!word_res_it.data()->part_of_combo) {</div><div class="line"><a name="l00523"></a><span class="lineno"> 523</span>  <a class="code" href="a00596.html#a0c2bcd4462ec67ab0971b34a0f610f55">tprintf</a>(<span class="stringliteral">"%s/%1d "</span>,</div><div class="line"><a name="l00524"></a><span class="lineno"> 524</span>  word_res_it.data()->best_choice->unichar_string().string(),</div><div class="line"><a name="l00525"></a><span class="lineno"> 525</span>  (int)word_res_it.data()->best_choice->permuter());</div><div class="line"><a name="l00526"></a><span class="lineno"> 526</span>  }</div><div class="line"><a name="l00527"></a><span class="lineno"> 527</span>  }</div><div class="line"><a name="l00528"></a><span class="lineno"> 528</span>  <a class="code" href="a00596.html#a0c2bcd4462ec67ab0971b34a0f610f55">tprintf</a>(<span class="stringliteral">"\"\n"</span>);</div><div class="line"><a name="l00529"></a><span class="lineno"> 529</span>  }</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> }</div><div class="line"><a name="l00532"></a><span class="lineno"> 532</span> </div><div class="line"><a name="l00533"></a><span class="lineno"><a class="line" href="a02358.html#a0d8d0ea277fd39e9a268ff4d9355a86f"> 533</a></span> <span class="keywordtype">bool</span> <a class="code" href="a02358.html#a0d8d0ea277fd39e9a268ff4d9355a86f">Tesseract::fixspace_thinks_word_done</a>(<a class="code" href="a02542.html">WERD_RES</a> *word) {</div><div class="line"><a name="l00534"></a><span class="lineno"> 534</span>  <span class="keywordflow">if</span> (word-><a class="code" href="a02542.html#a2bd2ff4f993746fc87d3ee88357a4a88">done</a>)</div><div class="line"><a name="l00535"></a><span class="lineno"> 535</span>  <span class="keywordflow">return</span> <span class="keyword">true</span>;</div><div class="line"><a name="l00536"></a><span class="lineno"> 536</span> </div><div class="line"><a name="l00537"></a><span class="lineno"> 537</span>  <span class="comment">/*</span></div><div class="line"><a name="l00538"></a><span class="lineno"> 538</span> <span class="comment"> Use all the standard pass 2 conditions for mode 5 in set_done() in</span></div><div class="line"><a name="l00539"></a><span class="lineno"> 539</span> <span class="comment"> reject.c BUT DON'T REJECT IF THE WERD IS AMBIGUOUS - FOR SPACING WE DON'T</span></div><div class="line"><a name="l00540"></a><span class="lineno"> 540</span> <span class="comment"> CARE WHETHER WE HAVE of/at on/an etc.</span></div><div class="line"><a name="l00541"></a><span class="lineno"> 541</span> <span class="comment"> */</span></div><div class="line"><a name="l00542"></a><span class="lineno"> 542</span>  <span class="keywordflow">if</span> (<a class="code" href="a02358.html#a2a520c49b2c4ab5efc33da01795b8c87">fixsp_done_mode</a> > 0 &&</div><div class="line"><a name="l00543"></a><span class="lineno"> 543</span>  (word-><a class="code" href="a02542.html#aa7f56655eb0e5164f2d2e85906475cb1">tess_accepted</a> ||</div><div class="line"><a name="l00544"></a><span class="lineno"> 544</span>  (<a class="code" href="a02358.html#a2a520c49b2c4ab5efc33da01795b8c87">fixsp_done_mode</a> == 2 && 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="l00545"></a><span class="lineno"> 545</span>  <a class="code" href="a02358.html#a2a520c49b2c4ab5efc33da01795b8c87">fixsp_done_mode</a> == 3) &&</div><div class="line"><a name="l00546"></a><span class="lineno"> 546</span>  (strchr(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="charliteral">' '</span>) == <span class="keyword">nullptr</span>) &&</div><div class="line"><a name="l00547"></a><span class="lineno"> 547</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="l00548"></a><span class="lineno"> 548</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="l00549"></a><span class="lineno"> 549</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="l00550"></a><span class="lineno"> 550</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="l00551"></a><span class="lineno"> 551</span>  <span class="keywordflow">return</span> <span class="keyword">true</span>;</div><div class="line"><a name="l00552"></a><span class="lineno"> 552</span>  } <span class="keywordflow">else</span> {</div><div class="line"><a name="l00553"></a><span class="lineno"> 553</span>  <span class="keywordflow">return</span> <span class="keyword">false</span>;</div><div class="line"><a name="l00554"></a><span class="lineno"> 554</span>  }</div><div class="line"><a name="l00555"></a><span class="lineno"> 555</span> }</div><div class="line"><a name="l00556"></a><span class="lineno"> 556</span> </div><div class="line"><a name="l00557"></a><span class="lineno"> 557</span> </div><div class="line"><a name="l00565"></a><span class="lineno"><a class="line" href="a02358.html#a29c537a9b369b926c319225343684199"> 565</a></span> <span class="keywordtype">void</span> <a class="code" href="a02358.html#a29c537a9b369b926c319225343684199">Tesseract::fix_sp_fp_word</a>(WERD_RES_IT &word_res_it, <a class="code" href="a02526.html">ROW</a> *row,</div><div class="line"><a name="l00566"></a><span class="lineno"> 566</span>  <a class="code" href="a02514.html">BLOCK</a>* block) {</div><div class="line"><a name="l00567"></a><span class="lineno"> 567</span>  <a class="code" href="a02542.html">WERD_RES</a> *word_res;</div><div class="line"><a name="l00568"></a><span class="lineno"> 568</span>  WERD_RES_LIST sub_word_list;</div><div class="line"><a name="l00569"></a><span class="lineno"> 569</span>  WERD_RES_IT sub_word_list_it(&sub_word_list);</div><div class="line"><a name="l00570"></a><span class="lineno"> 570</span>  int16_t blob_index;</div><div class="line"><a name="l00571"></a><span class="lineno"> 571</span>  int16_t new_length;</div><div class="line"><a name="l00572"></a><span class="lineno"> 572</span>  <span class="keywordtype">float</span> junk;</div><div class="line"><a name="l00573"></a><span class="lineno"> 573</span> </div><div class="line"><a name="l00574"></a><span class="lineno"> 574</span>  word_res = word_res_it.data();</div><div class="line"><a name="l00575"></a><span class="lineno"> 575</span>  <span class="keywordflow">if</span> (word_res-><a class="code" href="a02542.html#afc15fa7c1b5ad55d6772dea0d6865df1">word</a>-><a class="code" href="a02638.html#aec30b0c876cef5479c5db04aa8897358">flag</a>(<a class="code" href="a00449.html#ad6968adbf8f2cc44adf333ec96efb0beaa20dcde8552519bb81c4206b0e57a8ce">W_REP_CHAR</a>) ||</div><div class="line"><a name="l00576"></a><span class="lineno"> 576</span>  word_res-><a class="code" href="a02542.html#a3d0f242e487b778a2139957e7ca3cc0b">combination</a> ||</div><div class="line"><a name="l00577"></a><span class="lineno"> 577</span>  word_res-><a class="code" href="a02542.html#a4ffd6b844b62d19df43effdc3faec8e3">part_of_combo</a> ||</div><div class="line"><a name="l00578"></a><span class="lineno"> 578</span>  !word_res-><a class="code" href="a02542.html#afc15fa7c1b5ad55d6772dea0d6865df1">word</a>-><a class="code" href="a02638.html#aec30b0c876cef5479c5db04aa8897358">flag</a>(<a class="code" href="a00449.html#ad6968adbf8f2cc44adf333ec96efb0beac5f734536428e7e43dffe5c87d72d14e">W_DONT_CHOP</a>))</div><div class="line"><a name="l00579"></a><span class="lineno"> 579</span>  <span class="keywordflow">return</span>;</div><div class="line"><a name="l00580"></a><span class="lineno"> 580</span> </div><div class="line"><a name="l00581"></a><span class="lineno"> 581</span>  blob_index = <a class="code" href="a02358.html#a27ea491fc724617d13aff2993aad3916">worst_noise_blob</a>(word_res, &junk);</div><div class="line"><a name="l00582"></a><span class="lineno"> 582</span>  <span class="keywordflow">if</span> (blob_index < 0)</div><div class="line"><a name="l00583"></a><span class="lineno"> 583</span>  <span class="keywordflow">return</span>;</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>  <span class="keywordflow">if</span> (<a class="code" href="a02358.html#a84ce57f4e554cefb5162ba46aed84e3d">debug_fix_space_level</a> > 1) {</div><div class="line"><a name="l00586"></a><span class="lineno"> 586</span>  <a class="code" href="a00596.html#a0c2bcd4462ec67ab0971b34a0f610f55">tprintf</a>(<span class="stringliteral">"FP fixspace working on \"%s\"\n"</span>,</div><div class="line"><a name="l00587"></a><span class="lineno"> 587</span>  word_res-><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="l00588"></a><span class="lineno"> 588</span>  }</div><div class="line"><a name="l00589"></a><span class="lineno"> 589</span>  word_res-><a class="code" href="a02542.html#afc15fa7c1b5ad55d6772dea0d6865df1">word</a>-><a class="code" href="a02638.html#a0c26b86030e756d76e2425b1d2daf908">rej_cblob_list</a>()->sort(c_blob_comparator);</div><div class="line"><a name="l00590"></a><span class="lineno"> 590</span>  sub_word_list_it.add_after_stay_put(word_res_it.extract());</div><div class="line"><a name="l00591"></a><span class="lineno"> 591</span>  <a class="code" href="a02358.html#a0fdea6974197c1918d69bad16be3611e">fix_noisy_space_list</a>(sub_word_list, row, block);</div><div class="line"><a name="l00592"></a><span class="lineno"> 592</span>  new_length = sub_word_list.length();</div><div class="line"><a name="l00593"></a><span class="lineno"> 593</span>  word_res_it.add_list_before(&sub_word_list);</div><div class="line"><a name="l00594"></a><span class="lineno"> 594</span>  <span class="keywordflow">for</span> (; !word_res_it.at_last() && new_length > 1; new_length--) {</div><div class="line"><a name="l00595"></a><span class="lineno"> 595</span>  word_res_it.forward();</div><div class="line"><a name="l00596"></a><span class="lineno"> 596</span>  }</div><div class="line"><a name="l00597"></a><span class="lineno"> 597</span> }</div><div class="line"><a name="l00598"></a><span class="lineno"> 598</span> </div><div class="line"><a name="l00599"></a><span class="lineno"><a class="line" href="a02358.html#a0fdea6974197c1918d69bad16be3611e"> 599</a></span> <span class="keywordtype">void</span> <a class="code" href="a02358.html#a0fdea6974197c1918d69bad16be3611e">Tesseract::fix_noisy_space_list</a>(WERD_RES_LIST &best_perm, <a class="code" href="a02526.html">ROW</a> *row,</div><div class="line"><a name="l00600"></a><span class="lineno"> 600</span>  <a class="code" href="a02514.html">BLOCK</a>* block) {</div><div class="line"><a name="l00601"></a><span class="lineno"> 601</span>  int16_t best_score;</div><div class="line"><a name="l00602"></a><span class="lineno"> 602</span>  WERD_RES_IT best_perm_it(&best_perm);</div><div class="line"><a name="l00603"></a><span class="lineno"> 603</span>  WERD_RES_LIST current_perm;</div><div class="line"><a name="l00604"></a><span class="lineno"> 604</span>  WERD_RES_IT current_perm_it(&current_perm);</div><div class="line"><a name="l00605"></a><span class="lineno"> 605</span>  <a class="code" href="a02542.html">WERD_RES</a> *old_word_res;</div><div class="line"><a name="l00606"></a><span class="lineno"> 606</span>  int16_t current_score;</div><div class="line"><a name="l00607"></a><span class="lineno"> 607</span>  <span class="keywordtype">bool</span> improved = <span class="keyword">false</span>;</div><div class="line"><a name="l00608"></a><span class="lineno"> 608</span> </div><div class="line"><a name="l00609"></a><span class="lineno"> 609</span>  best_score = <a class="code" href="a02358.html#a947fe5b3278f82236fafce6cfab3b414">fp_eval_word_spacing</a>(best_perm); <span class="comment">// default score</span></div><div class="line"><a name="l00610"></a><span class="lineno"> 610</span> </div><div class="line"><a name="l00611"></a><span class="lineno"> 611</span>  <a class="code" href="a02358.html#a5db19e9dc0edbab33a470cb20ebd2e56">dump_words</a>(best_perm, best_score, 1, improved);</div><div class="line"><a name="l00612"></a><span class="lineno"> 612</span> </div><div class="line"><a name="l00613"></a><span class="lineno"> 613</span>  old_word_res = best_perm_it.data();</div><div class="line"><a name="l00614"></a><span class="lineno"> 614</span>  <span class="comment">// Even deep_copy doesn't copy the underlying WERD unless its combination</span></div><div class="line"><a name="l00615"></a><span class="lineno"> 615</span>  <span class="comment">// flag is true!.</span></div><div class="line"><a name="l00616"></a><span class="lineno"> 616</span>  old_word_res-><a class="code" href="a02542.html#a3d0f242e487b778a2139957e7ca3cc0b">combination</a> = <span class="keyword">true</span>; <span class="comment">// Kludge to force deep copy</span></div><div class="line"><a name="l00617"></a><span class="lineno"> 617</span>  current_perm_it.add_to_end(<a class="code" href="a02542.html#a11b3e5ebfef7835732e2085742891363">WERD_RES::deep_copy</a>(old_word_res));</div><div class="line"><a name="l00618"></a><span class="lineno"> 618</span>  old_word_res-><a class="code" href="a02542.html#a3d0f242e487b778a2139957e7ca3cc0b">combination</a> = <span class="keyword">false</span>; <span class="comment">// Undo kludge</span></div><div class="line"><a name="l00619"></a><span class="lineno"> 619</span> </div><div class="line"><a name="l00620"></a><span class="lineno"> 620</span>  <a class="code" href="a02358.html#a913fc1e4ab2eac499c7a6605ef67e07a">break_noisiest_blob_word</a>(current_perm);</div><div class="line"><a name="l00621"></a><span class="lineno"> 621</span> </div><div class="line"><a name="l00622"></a><span class="lineno"> 622</span>  <span class="keywordflow">while</span> (best_score != <a class="code" href="a00089.html#a943a2c8946e26cd62fd7a455b7e53c04">PERFECT_WERDS</a> && !current_perm.empty()) {</div><div class="line"><a name="l00623"></a><span class="lineno"> 623</span>  <a class="code" href="a02358.html#add15a5ad3d01e0903c71fcab8abd8cf4">match_current_words</a>(current_perm, row, block);</div><div class="line"><a name="l00624"></a><span class="lineno"> 624</span>  current_score = <a class="code" href="a02358.html#a947fe5b3278f82236fafce6cfab3b414">fp_eval_word_spacing</a>(current_perm);</div><div class="line"><a name="l00625"></a><span class="lineno"> 625</span>  <a class="code" href="a02358.html#a5db19e9dc0edbab33a470cb20ebd2e56">dump_words</a>(current_perm, current_score, 2, improved);</div><div class="line"><a name="l00626"></a><span class="lineno"> 626</span>  <span class="keywordflow">if</span> (current_score > best_score) {</div><div class="line"><a name="l00627"></a><span class="lineno"> 627</span>  best_perm.clear();</div><div class="line"><a name="l00628"></a><span class="lineno"> 628</span>  best_perm.deep_copy(&current_perm, &<a class="code" href="a02542.html#a11b3e5ebfef7835732e2085742891363">WERD_RES::deep_copy</a>);</div><div class="line"><a name="l00629"></a><span class="lineno"> 629</span>  best_score = current_score;</div><div class="line"><a name="l00630"></a><span class="lineno"> 630</span>  improved = <span class="keyword">true</span>;</div><div class="line"><a name="l00631"></a><span class="lineno"> 631</span>  }</div><div class="line"><a name="l00632"></a><span class="lineno"> 632</span>  <span class="keywordflow">if</span> (current_score < <a class="code" href="a00089.html#a943a2c8946e26cd62fd7a455b7e53c04">PERFECT_WERDS</a>) {</div><div class="line"><a name="l00633"></a><span class="lineno"> 633</span>  <a class="code" href="a02358.html#a913fc1e4ab2eac499c7a6605ef67e07a">break_noisiest_blob_word</a>(current_perm);</div><div class="line"><a name="l00634"></a><span class="lineno"> 634</span>  }</div><div class="line"><a name="l00635"></a><span class="lineno"> 635</span>  }</div><div class="line"><a name="l00636"></a><span class="lineno"> 636</span>  <a class="code" href="a02358.html#a5db19e9dc0edbab33a470cb20ebd2e56">dump_words</a>(best_perm, best_score, 3, improved);</div><div class="line"><a name="l00637"></a><span class="lineno"> 637</span> }</div><div class="line"><a name="l00638"></a><span class="lineno"> 638</span> </div><div class="line"><a name="l00639"></a><span class="lineno"> 639</span> </div><div class="line"><a name="l00645"></a><span class="lineno"><a class="line" href="a02358.html#a913fc1e4ab2eac499c7a6605ef67e07a"> 645</a></span> <span class="keywordtype">void</span> <a class="code" href="a02358.html#a913fc1e4ab2eac499c7a6605ef67e07a">Tesseract::break_noisiest_blob_word</a>(WERD_RES_LIST &words) {</div><div class="line"><a name="l00646"></a><span class="lineno"> 646</span>  WERD_RES_IT word_it(&words);</div><div class="line"><a name="l00647"></a><span class="lineno"> 647</span>  WERD_RES_IT worst_word_it;</div><div class="line"><a name="l00648"></a><span class="lineno"> 648</span>  <span class="keywordtype">float</span> worst_noise_score = 9999;</div><div class="line"><a name="l00649"></a><span class="lineno"> 649</span>  <span class="keywordtype">int</span> worst_blob_index = -1; <span class="comment">// Noisiest blob of noisiest wd</span></div><div class="line"><a name="l00650"></a><span class="lineno"> 650</span>  <span class="keywordtype">int</span> blob_index; <span class="comment">// of wds noisiest blob</span></div><div class="line"><a name="l00651"></a><span class="lineno"> 651</span>  <span class="keywordtype">float</span> noise_score; <span class="comment">// of wds noisiest blob</span></div><div class="line"><a name="l00652"></a><span class="lineno"> 652</span>  <a class="code" href="a02542.html">WERD_RES</a> *word_res;</div><div class="line"><a name="l00653"></a><span class="lineno"> 653</span>  C_BLOB_IT blob_it;</div><div class="line"><a name="l00654"></a><span class="lineno"> 654</span>  C_BLOB_IT rej_cblob_it;</div><div class="line"><a name="l00655"></a><span class="lineno"> 655</span>  C_BLOB_LIST new_blob_list;</div><div class="line"><a name="l00656"></a><span class="lineno"> 656</span>  C_BLOB_IT new_blob_it;</div><div class="line"><a name="l00657"></a><span class="lineno"> 657</span>  C_BLOB_IT new_rej_cblob_it;</div><div class="line"><a name="l00658"></a><span class="lineno"> 658</span>  <a class="code" href="a02638.html">WERD</a> *new_word;</div><div class="line"><a name="l00659"></a><span class="lineno"> 659</span>  int16_t start_of_noise_blob;</div><div class="line"><a name="l00660"></a><span class="lineno"> 660</span>  int16_t i;</div><div class="line"><a name="l00661"></a><span class="lineno"> 661</span> </div><div class="line"><a name="l00662"></a><span class="lineno"> 662</span>  <span class="keywordflow">for</span> (word_it.mark_cycle_pt(); !word_it.cycled_list(); word_it.forward()) {</div><div class="line"><a name="l00663"></a><span class="lineno"> 663</span>  blob_index = <a class="code" href="a02358.html#a27ea491fc724617d13aff2993aad3916">worst_noise_blob</a>(word_it.data(), &noise_score);</div><div class="line"><a name="l00664"></a><span class="lineno"> 664</span>  <span class="keywordflow">if</span> (blob_index > -1 && worst_noise_score > noise_score) {</div><div class="line"><a name="l00665"></a><span class="lineno"> 665</span>  worst_noise_score = noise_score;</div><div class="line"><a name="l00666"></a><span class="lineno"> 666</span>  worst_blob_index = blob_index;</div><div class="line"><a name="l00667"></a><span class="lineno"> 667</span>  worst_word_it = word_it;</div><div class="line"><a name="l00668"></a><span class="lineno"> 668</span>  }</div><div class="line"><a name="l00669"></a><span class="lineno"> 669</span>  }</div><div class="line"><a name="l00670"></a><span class="lineno"> 670</span>  <span class="keywordflow">if</span> (worst_blob_index < 0) {</div><div class="line"><a name="l00671"></a><span class="lineno"> 671</span>  words.clear(); <span class="comment">// signal termination</span></div><div class="line"><a name="l00672"></a><span class="lineno"> 672</span>  <span class="keywordflow">return</span>;</div><div class="line"><a name="l00673"></a><span class="lineno"> 673</span>  }</div><div class="line"><a name="l00674"></a><span class="lineno"> 674</span> </div><div class="line"><a name="l00675"></a><span class="lineno"> 675</span>  <span class="comment">/* Now split the worst_word_it */</span></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>  word_res = worst_word_it.data();</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>  <span class="comment">/* Move blobs before noise blob to a new bloblist */</span></div><div class="line"><a name="l00680"></a><span class="lineno"> 680</span> </div><div class="line"><a name="l00681"></a><span class="lineno"> 681</span>  new_blob_it.set_to_list(&new_blob_list);</div><div class="line"><a name="l00682"></a><span class="lineno"> 682</span>  blob_it.set_to_list(word_res-><a class="code" href="a02542.html#afc15fa7c1b5ad55d6772dea0d6865df1">word</a>-><a class="code" href="a02638.html#a174baefaa99afbfdbf444e4199f3b529">cblob_list</a>());</div><div class="line"><a name="l00683"></a><span class="lineno"> 683</span>  <span class="keywordflow">for</span> (i = 0; i < worst_blob_index; i++, blob_it.forward()) {</div><div class="line"><a name="l00684"></a><span class="lineno"> 684</span>  new_blob_it.add_after_then_move(blob_it.extract());</div><div class="line"><a name="l00685"></a><span class="lineno"> 685</span>  }</div><div class="line"><a name="l00686"></a><span class="lineno"> 686</span>  start_of_noise_blob = blob_it.data()->bounding_box().left();</div><div class="line"><a name="l00687"></a><span class="lineno"> 687</span>  <span class="keyword">delete</span> blob_it.extract(); <span class="comment">// throw out noise blob</span></div><div class="line"><a name="l00688"></a><span class="lineno"> 688</span> </div><div class="line"><a name="l00689"></a><span class="lineno"> 689</span>  new_word = <span class="keyword">new</span> <a class="code" href="a02638.html">WERD</a>(&new_blob_list, word_res-><a class="code" href="a02542.html#afc15fa7c1b5ad55d6772dea0d6865df1">word</a>);</div><div class="line"><a name="l00690"></a><span class="lineno"> 690</span>  new_word-><a class="code" href="a02638.html#aa84fa612a8864def8df4b7df26168aca">set_flag</a>(<a class="code" href="a00449.html#ad6968adbf8f2cc44adf333ec96efb0bea62efb985a62d85e014ee5ab039dd50ce">W_EOL</a>, <a class="code" href="a00014.html#aa93f0eb578d23995850d61f7d61c55c1">FALSE</a>);</div><div class="line"><a name="l00691"></a><span class="lineno"> 691</span>  word_res-><a class="code" href="a02542.html#afc15fa7c1b5ad55d6772dea0d6865df1">word</a>-><a class="code" href="a02638.html#aa84fa612a8864def8df4b7df26168aca">set_flag</a>(<a class="code" href="a00449.html#ad6968adbf8f2cc44adf333ec96efb0beaff21d7c8c8992120fff35942408a00d2">W_BOL</a>, <a class="code" href="a00014.html#aa93f0eb578d23995850d61f7d61c55c1">FALSE</a>);</div><div class="line"><a name="l00692"></a><span class="lineno"> 692</span>  word_res-><a class="code" href="a02542.html#afc15fa7c1b5ad55d6772dea0d6865df1">word</a>-><a class="code" href="a02638.html#a7b02a1d5defef5ae1b4a3ff5767b36f5">set_blanks</a>(1); <span class="comment">// After break</span></div><div class="line"><a name="l00693"></a><span class="lineno"> 693</span> </div><div class="line"><a name="l00694"></a><span class="lineno"> 694</span>  new_rej_cblob_it.set_to_list(new_word-><a class="code" href="a02638.html#a0c26b86030e756d76e2425b1d2daf908">rej_cblob_list</a>());</div><div class="line"><a name="l00695"></a><span class="lineno"> 695</span>  rej_cblob_it.set_to_list(word_res-><a class="code" href="a02542.html#afc15fa7c1b5ad55d6772dea0d6865df1">word</a>-><a class="code" href="a02638.html#a0c26b86030e756d76e2425b1d2daf908">rej_cblob_list</a>());</div><div class="line"><a name="l00696"></a><span class="lineno"> 696</span>  <span class="keywordflow">for</span> (;</div><div class="line"><a name="l00697"></a><span class="lineno"> 697</span>  (!rej_cblob_it.empty() &&</div><div class="line"><a name="l00698"></a><span class="lineno"> 698</span>  (rej_cblob_it.data()->bounding_box().left() < start_of_noise_blob));</div><div class="line"><a name="l00699"></a><span class="lineno"> 699</span>  rej_cblob_it.forward()) {</div><div class="line"><a name="l00700"></a><span class="lineno"> 700</span>  new_rej_cblob_it.add_after_then_move(rej_cblob_it.extract());</div><div class="line"><a name="l00701"></a><span class="lineno"> 701</span>  }</div><div class="line"><a name="l00702"></a><span class="lineno"> 702</span> </div><div class="line"><a name="l00703"></a><span class="lineno"> 703</span>  <a class="code" href="a02542.html">WERD_RES</a>* new_word_res = <span class="keyword">new</span> <a class="code" href="a02542.html">WERD_RES</a>(new_word);</div><div class="line"><a name="l00704"></a><span class="lineno"> 704</span>  new_word_res-><a class="code" href="a02542.html#a3d0f242e487b778a2139957e7ca3cc0b">combination</a> = <span class="keyword">true</span>;</div><div class="line"><a name="l00705"></a><span class="lineno"> 705</span>  worst_word_it.add_before_then_move(new_word_res);</div><div class="line"><a name="l00706"></a><span class="lineno"> 706</span> </div><div class="line"><a name="l00707"></a><span class="lineno"> 707</span>  word_res-><a class="code" href="a02542.html#a6ef9853bc0dca7249a30c897bcba4aba">ClearResults</a>();</div><div class="line"><a name="l00708"></a><span class="lineno"> 708</span> }</div><div class="line"><a name="l00709"></a><span class="lineno"> 709</span> </div><div class="line"><a name="l00710"></a><span class="lineno"><a class="line" href="a02358.html#a27ea491fc724617d13aff2993aad3916"> 710</a></span> int16_t <a class="code" href="a02358.html#a27ea491fc724617d13aff2993aad3916">Tesseract::worst_noise_blob</a>(<a class="code" href="a02542.html">WERD_RES</a> *word_res,</div><div class="line"><a name="l00711"></a><span class="lineno"> 711</span>  <span class="keywordtype">float</span> *worst_noise_score) {</div><div class="line"><a name="l00712"></a><span class="lineno"> 712</span>  <span class="keywordtype">float</span> noise_score[512];</div><div class="line"><a name="l00713"></a><span class="lineno"> 713</span>  <span class="keywordtype">int</span> i;</div><div class="line"><a name="l00714"></a><span class="lineno"> 714</span>  <span class="keywordtype">int</span> min_noise_blob; <span class="comment">// 1st contender</span></div><div class="line"><a name="l00715"></a><span class="lineno"> 715</span>  <span class="keywordtype">int</span> max_noise_blob; <span class="comment">// last contender</span></div><div class="line"><a name="l00716"></a><span class="lineno"> 716</span>  <span class="keywordtype">int</span> non_noise_count;</div><div class="line"><a name="l00717"></a><span class="lineno"> 717</span>  <span class="keywordtype">int</span> <a class="code" href="a02358.html#a27ea491fc724617d13aff2993aad3916">worst_noise_blob</a>; <span class="comment">// Worst blob</span></div><div class="line"><a name="l00718"></a><span class="lineno"> 718</span>  <span class="keywordtype">float</span> small_limit = <a class="code" href="a00314.html#af974e6755e636c8bc7cbe57e3bcbdd73">kBlnXHeight</a> * <a class="code" href="a02358.html#a6bf226f50c800f82773e256f92ff53d0">fixsp_small_outlines_size</a>;</div><div class="line"><a name="l00719"></a><span class="lineno"> 719</span>  <span class="keywordtype">float</span> non_noise_limit = <a class="code" href="a00314.html#af974e6755e636c8bc7cbe57e3bcbdd73">kBlnXHeight</a> * 0.8;</div><div class="line"><a name="l00720"></a><span class="lineno"> 720</span> </div><div class="line"><a name="l00721"></a><span class="lineno"> 721</span>  <span class="keywordflow">if</span> (word_res-><a class="code" href="a02542.html#a211ab5c5a13123ee7bdc7459d3363f9d">rebuild_word</a> == <span class="keyword">nullptr</span>)</div><div class="line"><a name="l00722"></a><span class="lineno"> 722</span>  <span class="keywordflow">return</span> -1; <span class="comment">// Can't handle cube words.</span></div><div class="line"><a name="l00723"></a><span class="lineno"> 723</span> </div><div class="line"><a name="l00724"></a><span class="lineno"> 724</span>  <span class="comment">// Normalised.</span></div><div class="line"><a name="l00725"></a><span class="lineno"> 725</span>  <span class="keywordtype">int</span> blob_count = word_res-><a class="code" href="a02542.html#a3a92c8c9750d78631d75998f008f366a">box_word</a>-><a class="code" href="a02410.html#a2505cb916ecbd87e4ba1a44654b1e078">length</a>();</div><div class="line"><a name="l00726"></a><span class="lineno"> 726</span>  <a class="code" href="a00503.html#a93a603f4063a6b9403d81caa245a583b">ASSERT_HOST</a>(blob_count <= 512);</div><div class="line"><a name="l00727"></a><span class="lineno"> 727</span>  <span class="keywordflow">if</span> (blob_count < 5)</div><div class="line"><a name="l00728"></a><span class="lineno"> 728</span>  <span class="keywordflow">return</span> -1; <span class="comment">// too short to split</span></div><div class="line"><a name="l00729"></a><span class="lineno"> 729</span> </div><div class="line"><a name="l00730"></a><span class="lineno"> 730</span>  <span class="comment">/* Get the noise scores for all blobs */</span></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="preprocessor"> #ifndef SECURE_NAMES</span></div><div class="line"><a name="l00733"></a><span class="lineno"> 733</span>  <span class="keywordflow">if</span> (<a class="code" href="a02358.html#a84ce57f4e554cefb5162ba46aed84e3d">debug_fix_space_level</a> > 5)</div><div class="line"><a name="l00734"></a><span class="lineno"> 734</span>  <a class="code" href="a00596.html#a0c2bcd4462ec67ab0971b34a0f610f55">tprintf</a>(<span class="stringliteral">"FP fixspace Noise metrics for \"%s\": "</span>,</div><div class="line"><a name="l00735"></a><span class="lineno"> 735</span>  word_res-><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="l00736"></a><span class="lineno"> 736</span> <span class="preprocessor"> #endif</span></div><div class="line"><a name="l00737"></a><span class="lineno"> 737</span> </div><div class="line"><a name="l00738"></a><span class="lineno"> 738</span>  <span class="keywordflow">for</span> (i = 0; i < blob_count && i < word_res-><a class="code" href="a02542.html#a211ab5c5a13123ee7bdc7459d3363f9d">rebuild_word</a>-><a class="code" href="a02402.html#a0d5347723ece084faf8f3d0dba6dd219">NumBlobs</a>(); i++) {</div><div class="line"><a name="l00739"></a><span class="lineno"> 739</span>  <a class="code" href="a02398.html">TBLOB</a>* blob = word_res-><a class="code" href="a02542.html#a211ab5c5a13123ee7bdc7459d3363f9d">rebuild_word</a>-><a class="code" href="a02402.html#a52fba22521039a79d8c1c8182f602dcc">blobs</a>[i];</div><div class="line"><a name="l00740"></a><span class="lineno"> 740</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="l00741"></a><span class="lineno"> 741</span>  noise_score[i] = non_noise_limit;</div><div class="line"><a name="l00742"></a><span class="lineno"> 742</span>  <span class="keywordflow">else</span></div><div class="line"><a name="l00743"></a><span class="lineno"> 743</span>  noise_score[i] = <a class="code" href="a02358.html#a3e90ba70a5a56d7ca76348cc0c94171b">blob_noise_score</a>(blob);</div><div class="line"><a name="l00744"></a><span class="lineno"> 744</span> </div><div class="line"><a name="l00745"></a><span class="lineno"> 745</span>  <span class="keywordflow">if</span> (<a class="code" href="a02358.html#a84ce57f4e554cefb5162ba46aed84e3d">debug_fix_space_level</a> > 5)</div><div class="line"><a name="l00746"></a><span class="lineno"> 746</span>  <a class="code" href="a00596.html#a0c2bcd4462ec67ab0971b34a0f610f55">tprintf</a>(<span class="stringliteral">"%1.1f "</span>, noise_score[i]);</div><div class="line"><a name="l00747"></a><span class="lineno"> 747</span>  }</div><div class="line"><a name="l00748"></a><span class="lineno"> 748</span>  <span class="keywordflow">if</span> (<a class="code" href="a02358.html#a84ce57f4e554cefb5162ba46aed84e3d">debug_fix_space_level</a> > 5)</div><div class="line"><a name="l00749"></a><span class="lineno"> 749</span>  <a class="code" href="a00596.html#a0c2bcd4462ec67ab0971b34a0f610f55">tprintf</a>(<span class="stringliteral">"\n"</span>);</div><div class="line"><a name="l00750"></a><span class="lineno"> 750</span> </div><div class="line"><a name="l00751"></a><span class="lineno"> 751</span>  <span class="comment">/* Now find the worst one which is far enough away from the end of the word */</span></div><div class="line"><a name="l00752"></a><span class="lineno"> 752</span> </div><div class="line"><a name="l00753"></a><span class="lineno"> 753</span>  non_noise_count = 0;</div><div class="line"><a name="l00754"></a><span class="lineno"> 754</span>  <span class="keywordflow">for</span> (i = 0; i < blob_count && non_noise_count < <a class="code" href="a02358.html#a5a057d25ed7712e3d205025d40d3ab65">fixsp_non_noise_limit</a>; i++) {</div><div class="line"><a name="l00755"></a><span class="lineno"> 755</span>  <span class="keywordflow">if</span> (noise_score[i] >= non_noise_limit) {</div><div class="line"><a name="l00756"></a><span class="lineno"> 756</span>  non_noise_count++;</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>  }</div><div class="line"><a name="l00759"></a><span class="lineno"> 759</span>  <span class="keywordflow">if</span> (non_noise_count < <a class="code" href="a02358.html#a5a057d25ed7712e3d205025d40d3ab65">fixsp_non_noise_limit</a>)</div><div class="line"><a name="l00760"></a><span class="lineno"> 760</span>  <span class="keywordflow">return</span> -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>  min_noise_blob = i;</div><div class="line"><a name="l00763"></a><span class="lineno"> 763</span> </div><div class="line"><a name="l00764"></a><span class="lineno"> 764</span>  non_noise_count = 0;</div><div class="line"><a name="l00765"></a><span class="lineno"> 765</span>  <span class="keywordflow">for</span> (i = blob_count - 1; i >= 0 && non_noise_count < <a class="code" href="a02358.html#a5a057d25ed7712e3d205025d40d3ab65">fixsp_non_noise_limit</a>;</div><div class="line"><a name="l00766"></a><span class="lineno"> 766</span>  i--) {</div><div class="line"><a name="l00767"></a><span class="lineno"> 767</span>  <span class="keywordflow">if</span> (noise_score[i] >= non_noise_limit) {</div><div class="line"><a name="l00768"></a><span class="lineno"> 768</span>  non_noise_count++;</div><div class="line"><a name="l00769"></a><span class="lineno"> 769</span>  }</div><div class="line"><a name="l00770"></a><span class="lineno"> 770</span>  }</div><div class="line"><a name="l00771"></a><span class="lineno"> 771</span>  <span class="keywordflow">if</span> (non_noise_count < <a class="code" href="a02358.html#a5a057d25ed7712e3d205025d40d3ab65">fixsp_non_noise_limit</a>)</div><div class="line"><a name="l00772"></a><span class="lineno"> 772</span>  <span class="keywordflow">return</span> -1;</div><div class="line"><a name="l00773"></a><span class="lineno"> 773</span> </div><div class="line"><a name="l00774"></a><span class="lineno"> 774</span>  max_noise_blob = i;</div><div class="line"><a name="l00775"></a><span class="lineno"> 775</span> </div><div class="line"><a name="l00776"></a><span class="lineno"> 776</span>  <span class="keywordflow">if</span> (min_noise_blob > max_noise_blob)</div><div class="line"><a name="l00777"></a><span class="lineno"> 777</span>  <span class="keywordflow">return</span> -1;</div><div class="line"><a name="l00778"></a><span class="lineno"> 778</span> </div><div class="line"><a name="l00779"></a><span class="lineno"> 779</span>  *worst_noise_score = small_limit;</div><div class="line"><a name="l00780"></a><span class="lineno"> 780</span>  <a class="code" href="a02358.html#a27ea491fc724617d13aff2993aad3916">worst_noise_blob</a> = -1;</div><div class="line"><a name="l00781"></a><span class="lineno"> 781</span>  <span class="keywordflow">for</span> (i = min_noise_blob; i <= max_noise_blob; i++) {</div><div class="line"><a name="l00782"></a><span class="lineno"> 782</span>  <span class="keywordflow">if</span> (noise_score[i] < *worst_noise_score) {</div><div class="line"><a name="l00783"></a><span class="lineno"> 783</span>  <a class="code" href="a02358.html#a27ea491fc724617d13aff2993aad3916">worst_noise_blob</a> = i;</div><div class="line"><a name="l00784"></a><span class="lineno"> 784</span>  *worst_noise_score = noise_score[i];</div><div class="line"><a name="l00785"></a><span class="lineno"> 785</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>  <span class="keywordflow">return</span> <a class="code" href="a02358.html#a27ea491fc724617d13aff2993aad3916">worst_noise_blob</a>;</div><div class="line"><a name="l00788"></a><span class="lineno"> 788</span> }</div><div class="line"><a name="l00789"></a><span class="lineno"> 789</span> </div><div class="line"><a name="l00790"></a><span class="lineno"><a class="line" href="a02358.html#a3e90ba70a5a56d7ca76348cc0c94171b"> 790</a></span> <span class="keywordtype">float</span> <a class="code" href="a02358.html#a3e90ba70a5a56d7ca76348cc0c94171b">Tesseract::blob_noise_score</a>(<a class="code" href="a02398.html">TBLOB</a> *blob) {</div><div class="line"><a name="l00791"></a><span class="lineno"> 791</span>  <a class="code" href="a02610.html">TBOX</a> box; <span class="comment">// BB of outline</span></div><div class="line"><a name="l00792"></a><span class="lineno"> 792</span>  int16_t outline_count = 0;</div><div class="line"><a name="l00793"></a><span class="lineno"> 793</span>  int16_t max_dimension;</div><div class="line"><a name="l00794"></a><span class="lineno"> 794</span>  int16_t largest_outline_dimension = 0;</div><div class="line"><a name="l00795"></a><span class="lineno"> 795</span> </div><div class="line"><a name="l00796"></a><span class="lineno"> 796</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="l00797"></a><span class="lineno"> 797</span>  outline_count++;</div><div class="line"><a name="l00798"></a><span class="lineno"> 798</span>  box = ol->bounding_box();</div><div class="line"><a name="l00799"></a><span class="lineno"> 799</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="l00800"></a><span class="lineno"> 800</span>  max_dimension = box.<a class="code" href="a02610.html#a72fcb736ed0ddeae95e6a51b3bf8d979">height</a>();</div><div class="line"><a name="l00801"></a><span class="lineno"> 801</span>  } <span class="keywordflow">else</span> {</div><div class="line"><a name="l00802"></a><span class="lineno"> 802</span>  max_dimension = box.<a class="code" href="a02610.html#a70ef69630cbdc605b7b7d5434549d38c">width</a>();</div><div class="line"><a name="l00803"></a><span class="lineno"> 803</span>  }</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>  <span class="keywordflow">if</span> (largest_outline_dimension < max_dimension)</div><div class="line"><a name="l00806"></a><span class="lineno"> 806</span>  largest_outline_dimension = max_dimension;</div><div class="line"><a name="l00807"></a><span class="lineno"> 807</span>  }</div><div class="line"><a name="l00808"></a><span class="lineno"> 808</span> </div><div class="line"><a name="l00809"></a><span class="lineno"> 809</span>  <span class="keywordflow">if</span> (outline_count > 5) {</div><div class="line"><a name="l00810"></a><span class="lineno"> 810</span>  <span class="comment">// penalise LOTS of blobs</span></div><div class="line"><a name="l00811"></a><span class="lineno"> 811</span>  largest_outline_dimension *= 2;</div><div class="line"><a name="l00812"></a><span class="lineno"> 812</span>  }</div><div class="line"><a name="l00813"></a><span class="lineno"> 813</span> </div><div class="line"><a name="l00814"></a><span class="lineno"> 814</span>  box = blob-><a class="code" href="a02398.html#a56599f0cc0c2eb73d9c5fd490f03fc56">bounding_box</a>();</div><div class="line"><a name="l00815"></a><span class="lineno"> 815</span>  <span class="keywordflow">if</span> (box.<a class="code" href="a02610.html#a9fee4521e71300975cb34ebb21e3fca5">bottom</a>() > <a class="code" href="a00314.html#abe10ce41bf7240ae8a053dea471d6ed5">kBlnBaselineOffset</a> * 4 ||</div><div class="line"><a name="l00816"></a><span class="lineno"> 816</span>  box.<a class="code" href="a02610.html#a5dc64d0677b5d65385bc07a78cf49c4d">top</a>() < <a class="code" href="a00314.html#abe10ce41bf7240ae8a053dea471d6ed5">kBlnBaselineOffset</a> / 2) {</div><div class="line"><a name="l00817"></a><span class="lineno"> 817</span>  <span class="comment">// Lax blob is if high or low</span></div><div class="line"><a name="l00818"></a><span class="lineno"> 818</span>  largest_outline_dimension /= 2;</div><div class="line"><a name="l00819"></a><span class="lineno"> 819</span>  }</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>  <span class="keywordflow">return</span> largest_outline_dimension;</div><div class="line"><a name="l00822"></a><span class="lineno"> 822</span> }</div><div class="line"><a name="l00823"></a><span class="lineno"> 823</span> } <span class="comment">// namespace tesseract</span></div><div class="line"><a name="l00824"></a><span class="lineno"> 824</span> </div><div class="line"><a name="l00825"></a><span class="lineno"><a class="line" href="a00092.html#a3a25422c78dc87ddee3165c73a1d7ce7"> 825</a></span> <span class="keywordtype">void</span> <a class="code" href="a00089.html#a3a25422c78dc87ddee3165c73a1d7ce7">fixspace_dbg</a>(<a class="code" href="a02542.html">WERD_RES</a> *word) {</div><div class="line"><a name="l00826"></a><span class="lineno"> 826</span>  <a class="code" href="a02610.html">TBOX</a> box = word-><a class="code" href="a02542.html#afc15fa7c1b5ad55d6772dea0d6865df1">word</a>-><a class="code" href="a02638.html#ad35a2fd78555195a3dedcdd01094d0d4">bounding_box</a>();</div><div class="line"><a name="l00827"></a><span class="lineno"> 827</span>  <span class="keyword">const</span> <span class="keywordtype">bool</span> show_map_detail = <span class="keyword">false</span>;</div><div class="line"><a name="l00828"></a><span class="lineno"> 828</span>  int16_t i;</div><div class="line"><a name="l00829"></a><span class="lineno"> 829</span> </div><div class="line"><a name="l00830"></a><span class="lineno"> 830</span>  box.<a class="code" href="a02610.html#a61af64df548c7638bf005fcd8343c435">print</a>();</div><div class="line"><a name="l00831"></a><span class="lineno"> 831</span>  <a class="code" href="a00596.html#a0c2bcd4462ec67ab0971b34a0f610f55">tprintf</a>(<span class="stringliteral">" \"%s\" "</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="l00832"></a><span class="lineno"> 832</span>  <a class="code" href="a00596.html#a0c2bcd4462ec67ab0971b34a0f610f55">tprintf</a>(<span class="stringliteral">"Blob count: %d (word); %d/%d (rebuild word)\n"</span>,</div><div class="line"><a name="l00833"></a><span class="lineno"> 833</span>  word-><a class="code" href="a02542.html#afc15fa7c1b5ad55d6772dea0d6865df1">word</a>-><a class="code" href="a02638.html#a174baefaa99afbfdbf444e4199f3b529">cblob_list</a>()->length(),</div><div class="line"><a name="l00834"></a><span class="lineno"> 834</span>  word-><a class="code" href="a02542.html#a211ab5c5a13123ee7bdc7459d3363f9d">rebuild_word</a>-><a class="code" href="a02402.html#a0d5347723ece084faf8f3d0dba6dd219">NumBlobs</a>(),</div><div class="line"><a name="l00835"></a><span class="lineno"> 835</span>  word-><a class="code" href="a02542.html#a3a92c8c9750d78631d75998f008f366a">box_word</a>-><a class="code" href="a02410.html#a2505cb916ecbd87e4ba1a44654b1e078">length</a>());</div><div class="line"><a name="l00836"></a><span class="lineno"> 836</span>  word-><a class="code" href="a02542.html#ae24eb58be06cf275aee411d947fd31ef">reject_map</a>.<a class="code" href="a02618.html#a124889539460b8c200b3186da4a692e0">print</a>(<a class="code" href="a00194.html#adff672a9cdb59d57a0d142954a6a3899">debug_fp</a>);</div><div class="line"><a name="l00837"></a><span class="lineno"> 837</span>  <a class="code" href="a00596.html#a0c2bcd4462ec67ab0971b34a0f610f55">tprintf</a>(<span class="stringliteral">"\n"</span>);</div><div class="line"><a name="l00838"></a><span class="lineno"> 838</span>  <span class="keywordflow">if</span> (show_map_detail) {</div><div class="line"><a name="l00839"></a><span class="lineno"> 839</span>  <a class="code" href="a00596.html#a0c2bcd4462ec67ab0971b34a0f610f55">tprintf</a>(<span class="stringliteral">"\"%s\"\n"</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="l00840"></a><span class="lineno"> 840</span>  <span class="keywordflow">for</span> (i = 0; word-><a class="code" href="a02542.html#a3d42ac7ec121263e757c9b7160dfd50d">best_choice</a>-><a class="code" href="a02606.html#adf200132afabc2ee6ec256e516011007">unichar_string</a>()[i] != <span class="charliteral">'\0'</span>; i++) {</div><div class="line"><a name="l00841"></a><span class="lineno"> 841</span>  <a class="code" href="a00596.html#a0c2bcd4462ec67ab0971b34a0f610f55">tprintf</a>(<span class="stringliteral">"**** \"%c\" ****\n"</span>, 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="l00842"></a><span class="lineno"> 842</span>  word-><a class="code" href="a02542.html#ae24eb58be06cf275aee411d947fd31ef">reject_map</a>[i].<a class="code" href="a02618.html#a476689acf6a0c07a0f09452ef5ff79e8">full_print</a>(<a class="code" href="a00194.html#adff672a9cdb59d57a0d142954a6a3899">debug_fp</a>);</div><div class="line"><a name="l00843"></a><span class="lineno"> 843</span>  }</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> </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">"Tess Accepted: %s\n"</span>, word-><a class="code" href="a02542.html#aa7f56655eb0e5164f2d2e85906475cb1">tess_accepted</a> ? <span class="stringliteral">"TRUE"</span> : <span class="stringliteral">"FALSE"</span>);</div><div class="line"><a name="l00847"></a><span class="lineno"> 847</span>  <a class="code" href="a00596.html#a0c2bcd4462ec67ab0971b34a0f610f55">tprintf</a>(<span class="stringliteral">"Done flag: %s\n\n"</span>, word-><a class="code" href="a02542.html#a2bd2ff4f993746fc87d3ee88357a4a88">done</a> ? <span class="stringliteral">"TRUE"</span> : <span class="stringliteral">"FALSE"</span>);</div><div class="line"><a name="l00848"></a><span class="lineno"> 848</span> }</div><div class="line"><a name="l00849"></a><span class="lineno"> 849</span> </div><div class="line"><a name="l00850"></a><span class="lineno"> 850</span> </div><div class="line"><a name="l00859"></a><span class="lineno"> 859</span> <span class="keyword">namespace </span><a class="code" href="a01629.html">tesseract</a> {</div><div class="line"><a name="l00860"></a><span class="lineno"><a class="line" href="a02358.html#a947fe5b3278f82236fafce6cfab3b414"> 860</a></span> int16_t <a class="code" href="a02358.html#a947fe5b3278f82236fafce6cfab3b414">Tesseract::fp_eval_word_spacing</a>(WERD_RES_LIST &word_res_list) {</div><div class="line"><a name="l00861"></a><span class="lineno"> 861</span>  WERD_RES_IT word_it(&word_res_list);</div><div class="line"><a name="l00862"></a><span class="lineno"> 862</span>  <a class="code" href="a02542.html">WERD_RES</a> *word;</div><div class="line"><a name="l00863"></a><span class="lineno"> 863</span>  int16_t score = 0;</div><div class="line"><a name="l00864"></a><span class="lineno"> 864</span>  int16_t i;</div><div class="line"><a name="l00865"></a><span class="lineno"> 865</span>  <span class="keywordtype">float</span> small_limit = <a class="code" href="a00314.html#af974e6755e636c8bc7cbe57e3bcbdd73">kBlnXHeight</a> * <a class="code" href="a02358.html#a6bf226f50c800f82773e256f92ff53d0">fixsp_small_outlines_size</a>;</div><div class="line"><a name="l00866"></a><span class="lineno"> 866</span> </div><div class="line"><a name="l00867"></a><span class="lineno"> 867</span>  <span class="keywordflow">for</span> (word_it.mark_cycle_pt(); !word_it.cycled_list(); word_it.forward()) {</div><div class="line"><a name="l00868"></a><span class="lineno"> 868</span>  word = word_it.data();</div><div class="line"><a name="l00869"></a><span class="lineno"> 869</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="l00870"></a><span class="lineno"> 870</span>  <span class="keywordflow">continue</span>; <span class="comment">// Can't handle cube words.</span></div><div class="line"><a name="l00871"></a><span class="lineno"> 871</span>  <span class="keywordflow">if</span> (word-><a class="code" href="a02542.html#a2bd2ff4f993746fc87d3ee88357a4a88">done</a> ||</div><div class="line"><a name="l00872"></a><span class="lineno"> 872</span>  word-><a class="code" href="a02542.html#aa7f56655eb0e5164f2d2e85906475cb1">tess_accepted</a> ||</div><div class="line"><a name="l00873"></a><span class="lineno"> 873</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="l00874"></a><span class="lineno"> 874</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="l00875"></a><span class="lineno"> 875</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="l00876"></a><span class="lineno"> 876</span>  <a class="code" href="a02358.html#a6cc1aac3230938e3e32a76f119ac4565">safe_dict_word</a>(word) > 0) {</div><div class="line"><a name="l00877"></a><span class="lineno"> 877</span>  <span class="keywordtype">int</span> num_blobs = word-><a class="code" href="a02542.html#a211ab5c5a13123ee7bdc7459d3363f9d">rebuild_word</a>-><a class="code" href="a02402.html#a0d5347723ece084faf8f3d0dba6dd219">NumBlobs</a>();</div><div class="line"><a name="l00878"></a><span class="lineno"> 878</span>  <a class="code" href="a00605.html#afedceee7ea132dae3d224db2cf8b5618">UNICHAR_ID</a> space = word-><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="l00879"></a><span class="lineno"> 879</span>  <span class="keywordflow">for</span> (i = 0; i < word-><a class="code" href="a02542.html#a3d42ac7ec121263e757c9b7160dfd50d">best_choice</a>-><a class="code" href="a02606.html#ad00f0a3cf74d3b2d82dcefb811bd1685">length</a>() && i < num_blobs; ++i) {</div><div class="line"><a name="l00880"></a><span class="lineno"> 880</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>[i];</div><div class="line"><a name="l00881"></a><span class="lineno"> 881</span>  <span class="keywordflow">if</span> (word-><a class="code" href="a02542.html#a3d42ac7ec121263e757c9b7160dfd50d">best_choice</a>-><a class="code" href="a02606.html#a76b18095a88a05db299aa84451a5f52c">unichar_id</a>(i) == space ||</div><div class="line"><a name="l00882"></a><span class="lineno"> 882</span>  <a class="code" href="a02358.html#a3e90ba70a5a56d7ca76348cc0c94171b">blob_noise_score</a>(blob) < small_limit) {</div><div class="line"><a name="l00883"></a><span class="lineno"> 883</span>  score -= 1; <span class="comment">// penalise possibly erroneous non-space</span></div><div class="line"><a name="l00884"></a><span class="lineno"> 884</span>  } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (word-><a class="code" href="a02542.html#ae24eb58be06cf275aee411d947fd31ef">reject_map</a>[i].accepted()) {</div><div class="line"><a name="l00885"></a><span class="lineno"> 885</span>  score++;</div><div class="line"><a name="l00886"></a><span class="lineno"> 886</span>  }</div><div class="line"><a name="l00887"></a><span class="lineno"> 887</span>  }</div><div class="line"><a name="l00888"></a><span class="lineno"> 888</span>  }</div><div class="line"><a name="l00889"></a><span class="lineno"> 889</span>  }</div><div class="line"><a name="l00890"></a><span class="lineno"> 890</span>  <span class="keywordflow">if</span> (score < 0)</div><div class="line"><a name="l00891"></a><span class="lineno"> 891</span>  score = 0;</div><div class="line"><a name="l00892"></a><span class="lineno"> 892</span>  <span class="keywordflow">return</span> score;</div><div class="line"><a name="l00893"></a><span class="lineno"> 893</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"> 895</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_a4701b35a81d1af098b643453569c439f"><div class="ttname"><a href="a02358.html#a4701b35a81d1af098b643453569c439f">tesseract::Tesseract::tessedit_prefer_joined_punct</a></div><div class="ttdeci">bool tessedit_prefer_joined_punct</div><div class="ttdef"><b>Definition:</b> <a href="a00191_source.html#l01005">tesseractclass.h:1005</a></div></div>
<div class="ttc" id="a02542_html_a91228b4814b63ea8efdf17a2e8a9a0f3"><div class="ttname"><a href="a02542.html#a91228b4814b63ea8efdf17a2e8a9a0f3">WERD_RES::tess_failed</a></div><div class="ttdeci">bool tess_failed</div><div class="ttdef"><b>Definition:</b> <a href="a00344_source.html#l00288">pageres.h:288</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="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="a02358_html_a69ec5a78d7bd4cebf62c2ec108f84431"><div class="ttname"><a href="a02358.html#a69ec5a78d7bd4cebf62c2ec108f84431">tesseract::Tesseract::digit_or_numeric_punct</a></div><div class="ttdeci">bool digit_or_numeric_punct(WERD_RES *word, int char_position)</div><div class="ttdef"><b>Definition:</b> <a href="a00089_source.html#l00373">fixspace.cpp:373</a></div></div>
<div class="ttc" id="a00014_html_aa8cecfc5c5c054d2875c03e77b7be15d"><div class="ttname"><a href="a00014.html#aa8cecfc5c5c054d2875c03e77b7be15d">TRUE</a></div><div class="ttdeci">#define TRUE</div><div class="ttdef"><b>Definition:</b> <a href="a00014_source.html#l00051">capi.h:51</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="a04866_html_a143608f482c6c0c4f312740e6a5f5fd9"><div class="ttname"><a href="a04866.html#a143608f482c6c0c4f312740e6a5f5fd9">tesseract::Wordrec::prev_word_best_choice_</a></div><div class="ttdeci">WERD_CHOICE * prev_word_best_choice_</div><div class="ttdef"><b>Definition:</b> <a href="a01622_source.html#l00481">wordrec.h:481</a></div></div>
<div class="ttc" id="a00344_html"><div class="ttname"><a href="a00344.html">pageres.h</a></div></div>
<div class="ttc" id="a00194_html_adff672a9cdb59d57a0d142954a6a3899"><div class="ttname"><a href="a00194.html#adff672a9cdb59d57a0d142954a6a3899">debug_fp</a></div><div class="ttdeci">FILE * debug_fp</div><div class="ttdef"><b>Definition:</b> <a href="a00194_source.html#l00024">tessvars.cpp:24</a></div></div>
<div class="ttc" id="a00503_html"><div class="ttname"><a href="a00503.html">errcode.h</a></div></div>
<div class="ttc" id="a02610_html_a61af64df548c7638bf005fcd8343c435"><div class="ttname"><a href="a02610.html#a61af64df548c7638bf005fcd8343c435">TBOX::print</a></div><div class="ttdeci">void print() const</div><div class="ttdef"><b>Definition:</b> <a href="a00407_source.html#l00278">rect.h:278</a></div></div>
<div class="ttc" id="a00401_html"><div class="ttname"><a href="a00401.html">ratngs.h</a></div></div>
<div class="ttc" id="a00230_html"><div class="ttname"><a href="a00230.html">blobs.h</a></div></div>
<div class="ttc" id="a00530_html"><div class="ttname"><a href="a00530.html">host.h</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="a02786_html_a4844a3e9868a0fde7ad2fcaa37f5c5f1"><div class="ttname"><a href="a02786.html#a4844a3e9868a0fde7ad2fcaa37f5c5f1">ETEXT_DESC::cancel_this</a></div><div class="ttdeci">void * cancel_this</div><div class="ttdoc">monitor-aware progress callback </div><div class="ttdef"><b>Definition:</b> <a href="a00551_source.html#l00132">ocrclass.h:132</a></div></div>
<div class="ttc" id="a02350_html_a2ffb76e8ef50a240ee744901405252bc"><div class="ttname"><a href="a02350.html#a2ffb76e8ef50a240ee744901405252bc">tesseract::TesseractStats::dict_words</a></div><div class="ttdeci">int32_t dict_words</div><div class="ttdef"><b>Definition:</b> <a href="a00191_source.html#l00137">tesseractclass.h:137</a></div></div>
<div class="ttc" id="a00449_html_ad6968adbf8f2cc44adf333ec96efb0bea675eadd051ea82d1f288751799bfa31c"><div class="ttname"><a href="a00449.html#ad6968adbf8f2cc44adf333ec96efb0bea675eadd051ea82d1f288751799bfa31c">W_FUZZY_NON</a></div><div class="ttdef"><b>Definition:</b> <a href="a00449_source.html#l00042">werd.h:42</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="a02542_html_a11b3e5ebfef7835732e2085742891363"><div class="ttname"><a href="a02542.html#a11b3e5ebfef7835732e2085742891363">WERD_RES::deep_copy</a></div><div class="ttdeci">static WERD_RES * deep_copy(const WERD_RES *src)</div><div class="ttdef"><b>Definition:</b> <a href="a00344_source.html#l00649">pageres.h:649</a></div></div>
<div class="ttc" id="a02618_html_a476689acf6a0c07a0f09452ef5ff79e8"><div class="ttname"><a href="a02618.html#a476689acf6a0c07a0f09452ef5ff79e8">REJMAP::full_print</a></div><div class="ttdeci">void full_print(FILE *fp)</div><div class="ttdef"><b>Definition:</b> <a href="a00410_source.html#l00335">rejctmap.cpp:335</a></div></div>
<div class="ttc" id="a02638_html_ad35a2fd78555195a3dedcdd01094d0d4"><div class="ttname"><a href="a02638.html#ad35a2fd78555195a3dedcdd01094d0d4">WERD::bounding_box</a></div><div class="ttdeci">TBOX bounding_box() const</div><div class="ttdef"><b>Definition:</b> <a href="a00446_source.html#l00159">werd.cpp:159</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="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="a02358_html_a29c537a9b369b926c319225343684199"><div class="ttname"><a href="a02358.html#a29c537a9b369b926c319225343684199">tesseract::Tesseract::fix_sp_fp_word</a></div><div class="ttdeci">void fix_sp_fp_word(WERD_RES_IT &word_res_it, ROW *row, BLOCK *block)</div><div class="ttdef"><b>Definition:</b> <a href="a00089_source.html#l00565">fixspace.cpp:565</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="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="a00623_html"><div class="ttname"><a href="a00623.html">unicharset.h</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="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="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="a02638_html_aa84fa612a8864def8df4b7df26168aca"><div class="ttname"><a href="a02638.html#aa84fa612a8864def8df4b7df26168aca">WERD::set_flag</a></div><div class="ttdeci">void set_flag(WERD_FLAGS mask, bool value)</div><div class="ttdef"><b>Definition:</b> <a href="a00449_source.html#l00127">werd.h:127</a></div></div>
<div class="ttc" id="a02358_html_aa4047f6ce76f44d45d1081874f620e55"><div class="ttname"><a href="a02358.html#aa4047f6ce76f44d45d1081874f620e55">tesseract::Tesseract::eval_word_spacing</a></div><div class="ttdeci">int16_t eval_word_spacing(WERD_RES_LIST &word_res_list)</div><div class="ttdef"><b>Definition:</b> <a href="a00089_source.html#l00269">fixspace.cpp:269</a></div></div>
<div class="ttc" id="a00584_html"><div class="ttname"><a href="a00584.html">strngs.h</a></div></div>
<div class="ttc" id="a02530_html"><div class="ttname"><a href="a02530.html">PAGE_RES</a></div><div class="ttdef"><b>Definition:</b> <a href="a00344_source.html#l00077">pageres.h:77</a></div></div>
<div class="ttc" id="a02638_html_a0c26b86030e756d76e2425b1d2daf908"><div class="ttname"><a href="a02638.html#a0c26b86030e756d76e2425b1d2daf908">WERD::rej_cblob_list</a></div><div class="ttdeci">C_BLOB_LIST * rej_cblob_list()</div><div class="ttdef"><b>Definition:</b> <a href="a00449_source.html#l00093">werd.h:93</a></div></div>
<div class="ttc" id="a02358_html_a5db19e9dc0edbab33a470cb20ebd2e56"><div class="ttname"><a href="a02358.html#a5db19e9dc0edbab33a470cb20ebd2e56">tesseract::Tesseract::dump_words</a></div><div class="ttdeci">void dump_words(WERD_RES_LIST &perm, int16_t score, int16_t mode, bool improved)</div><div class="ttdef"><b>Definition:</b> <a href="a00089_source.html#l00479">fixspace.cpp:479</a></div></div>
<div class="ttc" id="a02786_html_a3b103545a36543dd4f16c496838d99eb"><div class="ttname"><a href="a02786.html#a3b103545a36543dd4f16c496838d99eb">ETEXT_DESC::ocr_alive</a></div><div class="ttdeci">volatile int8_t ocr_alive</div><div class="ttdoc">true if not last </div><div class="ttdef"><b>Definition:</b> <a href="a00551_source.html#l00127">ocrclass.h:127</a></div></div>
<div class="ttc" id="a02530_html_aa7b060bebb1b720f66121026c42e2195"><div class="ttname"><a href="a02530.html#aa7b060bebb1b720f66121026c42e2195">PAGE_RES::block_res_list</a></div><div class="ttdeci">BLOCK_RES_LIST block_res_list</div><div class="ttdef"><b>Definition:</b> <a href="a00344_source.html#l00081">pageres.h:81</a></div></div>
<div class="ttc" id="a02358_html_a3e90ba70a5a56d7ca76348cc0c94171b"><div class="ttname"><a href="a02358.html#a3e90ba70a5a56d7ca76348cc0c94171b">tesseract::Tesseract::blob_noise_score</a></div><div class="ttdeci">float blob_noise_score(TBLOB *blob)</div><div class="ttdef"><b>Definition:</b> <a href="a00089_source.html#l00790">fixspace.cpp:790</a></div></div>
<div class="ttc" id="a00089_html_a3a25422c78dc87ddee3165c73a1d7ce7"><div class="ttname"><a href="a00089.html#a3a25422c78dc87ddee3165c73a1d7ce7">fixspace_dbg</a></div><div class="ttdeci">void fixspace_dbg(WERD_RES *word)</div><div class="ttdef"><b>Definition:</b> <a href="a00089_source.html#l00825">fixspace.cpp:825</a></div></div>
<div class="ttc" id="a00599_html"><div class="ttname"><a href="a00599.html">tprintf.h</a></div></div>
<div class="ttc" id="a02358_html_af53f5a112178df66fe23baca0d082d68"><div class="ttname"><a href="a02358.html#af53f5a112178df66fe23baca0d082d68">tesseract::Tesseract::numeric_punctuation</a></div><div class="ttdeci">char * numeric_punctuation</div><div class="ttdef"><b>Definition:</b> <a href="a00191_source.html#l01009">tesseractclass.h:1009</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="a02358_html_a6bf226f50c800f82773e256f92ff53d0"><div class="ttname"><a href="a02358.html#a6bf226f50c800f82773e256f92ff53d0">tesseract::Tesseract::fixsp_small_outlines_size</a></div><div class="ttdeci">double fixsp_small_outlines_size</div><div class="ttdef"><b>Definition:</b> <a href="a00191_source.html#l01004">tesseractclass.h:1004</a></div></div>
<div class="ttc" id="a02610_html_a8e9dce0d30d2213598cd4befe0028c99"><div class="ttname"><a href="a02610.html#a8e9dce0d30d2213598cd4befe0028c99">TBOX::left</a></div><div class="ttdeci">int16_t left() const</div><div class="ttdef"><b>Definition:</b> <a href="a00407_source.html#l00072">rect.h:72</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="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="a02350_html_aaddff0b5e3101637acc25da59fe97065"><div class="ttname"><a href="a02350.html#aaddff0b5e3101637acc25da59fe97065">tesseract::TesseractStats::dump_words_str</a></div><div class="ttdeci">STRING dump_words_str</div><div class="ttdef"><b>Definition:</b> <a href="a00191_source.html#l00138">tesseractclass.h:138</a></div></div>
<div class="ttc" id="a00314_html"><div class="ttname"><a href="a00314.html">normalis.h</a></div></div>
<div class="ttc" id="a00449_html_ad6968adbf8f2cc44adf333ec96efb0bea3580884b5b0335502fb928db4a0a2024"><div class="ttname"><a href="a00449.html#ad6968adbf8f2cc44adf333ec96efb0bea3580884b5b0335502fb928db4a0a2024">W_FUZZY_SP</a></div><div class="ttdef"><b>Definition:</b> <a href="a00449_source.html#l00041">werd.h:41</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="a00449_html_ad6968adbf8f2cc44adf333ec96efb0beac5f734536428e7e43dffe5c87d72d14e"><div class="ttname"><a href="a00449.html#ad6968adbf8f2cc44adf333ec96efb0beac5f734536428e7e43dffe5c87d72d14e">W_DONT_CHOP</a></div><div class="ttdef"><b>Definition:</b> <a href="a00449_source.html#l00039">werd.h:39</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_a84ce57f4e554cefb5162ba46aed84e3d"><div class="ttname"><a href="a02358.html#a84ce57f4e554cefb5162ba46aed84e3d">tesseract::Tesseract::debug_fix_space_level</a></div><div class="ttdeci">int debug_fix_space_level</div><div class="ttdef"><b>Definition:</b> <a href="a00191_source.html#l01007">tesseractclass.h:1007</a></div></div>
<div class="ttc" id="a00089_html_a943a2c8946e26cd62fd7a455b7e53c04"><div class="ttname"><a href="a00089.html#a943a2c8946e26cd62fd7a455b7e53c04">PERFECT_WERDS</a></div><div class="ttdeci">#define PERFECT_WERDS</div><div class="ttdef"><b>Definition:</b> <a href="a00089_source.html#l00046">fixspace.cpp:46</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="a00014_html_aa93f0eb578d23995850d61f7d61c55c1"><div class="ttname"><a href="a00014.html#aa93f0eb578d23995850d61f7d61c55c1">FALSE</a></div><div class="ttdeci">#define FALSE</div><div class="ttdef"><b>Definition:</b> <a href="a00014_source.html#l00052">capi.h:52</a></div></div>
<div class="ttc" id="a02786_html_a84e8d7c830a6b08ad1ebdbdf872c887a"><div class="ttname"><a href="a02786.html#a84e8d7c830a6b08ad1ebdbdf872c887a">ETEXT_DESC::deadline_exceeded</a></div><div class="ttdeci">bool deadline_exceeded() const</div><div class="ttdef"><b>Definition:</b> <a href="a00551_source.html#l00164">ocrclass.h:164</a></div></div>
<div class="ttc" id="a02358_html_a0d8d0ea277fd39e9a268ff4d9355a86f"><div class="ttname"><a href="a02358.html#a0d8d0ea277fd39e9a268ff4d9355a86f">tesseract::Tesseract::fixspace_thinks_word_done</a></div><div class="ttdeci">bool fixspace_thinks_word_done(WERD_RES *word)</div><div class="ttdef"><b>Definition:</b> <a href="a00089_source.html#l00533">fixspace.cpp:533</a></div></div>
<div class="ttc" id="a02542_html_aa7f56655eb0e5164f2d2e85906475cb1"><div class="ttname"><a href="a02542.html#aa7f56655eb0e5164f2d2e85906475cb1">WERD_RES::tess_accepted</a></div><div class="ttdeci">bool tess_accepted</div><div class="ttdef"><b>Definition:</b> <a href="a00344_source.html#l00296">pageres.h:296</a></div></div>
<div class="ttc" id="a02358_html_a5439cd8199c72bfc34530cc41c252a64"><div class="ttname"><a href="a02358.html#a5439cd8199c72bfc34530cc41c252a64">tesseract::Tesseract::test_pt</a></div><div class="ttdeci">bool test_pt</div><div class="ttdef"><b>Definition:</b> <a href="a00191_source.html#l00919">tesseractclass.h:919</a></div></div>
<div class="ttc" id="a02638_html_a7b02a1d5defef5ae1b4a3ff5767b36f5"><div class="ttname"><a href="a02638.html#a7b02a1d5defef5ae1b4a3ff5767b36f5">WERD::set_blanks</a></div><div class="ttdeci">void set_blanks(uint8_t new_blanks)</div><div class="ttdef"><b>Definition:</b> <a href="a00449_source.html#l00105">werd.h:105</a></div></div>
<div class="ttc" id="a02358_html_a2a520c49b2c4ab5efc33da01795b8c87"><div class="ttname"><a href="a02358.html#a2a520c49b2c4ab5efc33da01795b8c87">tesseract::Tesseract::fixsp_done_mode</a></div><div class="ttdeci">int fixsp_done_mode</div><div class="ttdef"><b>Definition:</b> <a href="a00191_source.html#l01006">tesseractclass.h:1006</a></div></div>
<div class="ttc" id="a02542_html_a3badcd252947547aadeb3d2bfe2f980b"><div class="ttname"><a href="a02542.html#a3badcd252947547aadeb3d2bfe2f980b">WERD_RES::copy_on</a></div><div class="ttdeci">void copy_on(WERD_RES *word_res)</div><div class="ttdef"><b>Definition:</b> <a href="a00344_source.html#l00660">pageres.h:660</a></div></div>
<div class="ttc" id="a00605_html"><div class="ttname"><a href="a00605.html">unichar.h</a></div></div>
<div class="ttc" id="a02638_html"><div class="ttname"><a href="a02638.html">WERD</a></div><div class="ttdef"><b>Definition:</b> <a href="a00449_source.html#l00059">werd.h:59</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="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="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="a02398_html_a56599f0cc0c2eb73d9c5fd490f03fc56"><div class="ttname"><a href="a02398.html#a56599f0cc0c2eb73d9c5fd490f03fc56">TBLOB::bounding_box</a></div><div class="ttdeci">TBOX bounding_box() const</div><div class="ttdef"><b>Definition:</b> <a href="a00227_source.html#l00478">blobs.cpp:478</a></div></div>
<div class="ttc" id="a02358_html_a5651e88a55922ff44e3e64bc089f393d"><div class="ttname"><a href="a02358.html#a5651e88a55922ff44e3e64bc089f393d">tesseract::Tesseract::fix_fuzzy_space_list</a></div><div class="ttdeci">void fix_fuzzy_space_list(WERD_RES_LIST &best_perm, ROW *row, BLOCK *block)</div><div class="ttdef"><b>Definition:</b> <a href="a00089_source.html#l00175">fixspace.cpp:175</a></div></div>
<div class="ttc" id="a00449_html"><div class="ttname"><a href="a00449.html">werd.h</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="a02514_html"><div class="ttname"><a href="a02514.html">BLOCK</a></div><div class="ttdef"><b>Definition:</b> <a href="a00320_source.html#l00030">ocrblock.h:30</a></div></div>
<div class="ttc" id="a02606_html_ad00f0a3cf74d3b2d82dcefb811bd1685"><div class="ttname"><a href="a02606.html#ad00f0a3cf74d3b2d82dcefb811bd1685">WERD_CHOICE::length</a></div><div class="ttdeci">int length() const</div><div class="ttdef"><b>Definition:</b> <a href="a00401_source.html#l00303">ratngs.h:303</a></div></div>
<div class="ttc" id="a02638_html_a174baefaa99afbfdbf444e4199f3b529"><div class="ttname"><a href="a02638.html#a174baefaa99afbfdbf444e4199f3b529">WERD::cblob_list</a></div><div class="ttdeci">C_BLOB_LIST * cblob_list()</div><div class="ttdef"><b>Definition:</b> <a href="a00449_source.html#l00098">werd.h:98</a></div></div>
<div class="ttc" id="a00437_html"><div class="ttname"><a href="a00437.html">stepblob.h</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="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="a02542_html_a2bd2ff4f993746fc87d3ee88357a4a88"><div class="ttname"><a href="a02542.html#a2bd2ff4f993746fc87d3ee88357a4a88">WERD_RES::done</a></div><div class="ttdeci">bool done</div><div class="ttdef"><b>Definition:</b> <a href="a00344_source.html#l00298">pageres.h:298</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="a02542_html_a3d0f242e487b778a2139957e7ca3cc0b"><div class="ttname"><a href="a02542.html#a3d0f242e487b778a2139957e7ca3cc0b">WERD_RES::combination</a></div><div class="ttdeci">bool combination</div><div class="ttdef"><b>Definition:</b> <a href="a00344_source.html#l00334">pageres.h:334</a></div></div>
<div class="ttc" id="a02542_html_a42ec9dbb998f7da714ace13ee30cb86e"><div class="ttname"><a href="a02542.html#a42ec9dbb998f7da714ace13ee30cb86e">WERD_RES::x_height</a></div><div class="ttdeci">float x_height</div><div class="ttdef"><b>Definition:</b> <a href="a00344_source.html#l00311">pageres.h:311</a></div></div>
<div class="ttc" id="a02542_html_a6ef9853bc0dca7249a30c897bcba4aba"><div class="ttname"><a href="a02542.html#a6ef9853bc0dca7249a30c897bcba4aba">WERD_RES::ClearResults</a></div><div class="ttdeci">void ClearResults()</div><div class="ttdef"><b>Definition:</b> <a href="a00341_source.html#l01153">pageres.cpp:1153</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="a00089_html_aa9c4bc6127388800d066093c261667ea"><div class="ttname"><a href="a00089.html#aa9c4bc6127388800d066093c261667ea">initialise_search</a></div><div class="ttdeci">void initialise_search(WERD_RES_LIST &src_list, WERD_RES_LIST &new_list)</div><div class="ttdef"><b>Definition:</b> <a href="a00089_source.html#l00207">fixspace.cpp:207</a></div></div>
<div class="ttc" id="a02634_html"><div class="ttname"><a href="a02634.html">C_BLOB</a></div><div class="ttdef"><b>Definition:</b> <a href="a00437_source.html#l00037">stepblob.h:37</a></div></div>
<div class="ttc" id="a02834_html_ac8c4ceca1e688adcdf188aef108dc18b"><div class="ttname"><a href="a02834.html#ac8c4ceca1e688adcdf188aef108dc18b">STRING::contains</a></div><div class="ttdeci">bool contains(const char c) const</div><div class="ttdef"><b>Definition:</b> <a href="a00581_source.html#l00187">strngs.cpp:187</a></div></div>
<div class="ttc" id="a02358_html_a2e84c55acc11dc7d1840d0aac4984e6a"><div class="ttname"><a href="a02358.html#a2e84c55acc11dc7d1840d0aac4984e6a">tesseract::Tesseract::SetupWordPassN</a></div><div class="ttdeci">void SetupWordPassN(int pass_n, WordData *word)</div><div class="ttdef"><b>Definition:</b> <a href="a00071_source.html#l00182">control.cpp:182</a></div></div>
<div class="ttc" id="a02358_html_ae08214652c8e5a05331ae2a095a57849"><div class="ttname"><a href="a02358.html#ae08214652c8e5a05331ae2a095a57849">tesseract::Tesseract::fix_fuzzy_spaces</a></div><div class="ttdeci">void fix_fuzzy_spaces(ETEXT_DESC *monitor, int32_t word_count, PAGE_RES *page_res)</div><div class="ttdef"><b>Definition:</b> <a href="a00089_source.html#l00078">fixspace.cpp:78</a></div></div>
<div class="ttc" id="a02358_html_a27ea491fc724617d13aff2993aad3916"><div class="ttname"><a href="a02358.html#a27ea491fc724617d13aff2993aad3916">tesseract::Tesseract::worst_noise_blob</a></div><div class="ttdeci">int16_t worst_noise_blob(WERD_RES *word_res, float *worst_noise_score)</div><div class="ttdef"><b>Definition:</b> <a href="a00089_source.html#l00710">fixspace.cpp:710</a></div></div>
<div class="ttc" id="a00557_html"><div class="ttname"><a href="a00557.html">params.h</a></div></div>
<div class="ttc" id="a02634_html_a50bd7e9c66492bebdba6aadcc806bf93"><div class="ttname"><a href="a02634.html#a50bd7e9c66492bebdba6aadcc806bf93">C_BLOB::bounding_box</a></div><div class="ttdeci">TBOX bounding_box() const</div><div class="ttdef"><b>Definition:</b> <a href="a00434_source.html#l00255">stepblob.cpp:255</a></div></div>
<div class="ttc" id="a00449_html_ad6968adbf8f2cc44adf333ec96efb0beaa20dcde8552519bb81c4206b0e57a8ce"><div class="ttname"><a href="a00449.html#ad6968adbf8f2cc44adf333ec96efb0beaa20dcde8552519bb81c4206b0e57a8ce">W_REP_CHAR</a></div><div class="ttdef"><b>Definition:</b> <a href="a00449_source.html#l00040">werd.h:40</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="a02410_html_a2505cb916ecbd87e4ba1a44654b1e078"><div class="ttname"><a href="a02410.html#a2505cb916ecbd87e4ba1a44654b1e078">tesseract::BoxWord::length</a></div><div class="ttdeci">int length() const</div><div class="ttdef"><b>Definition:</b> <a href="a00248_source.html#l00083">boxword.h:83</a></div></div>
<div class="ttc" id="a02358_html_add15a5ad3d01e0903c71fcab8abd8cf4"><div class="ttname"><a href="a02358.html#add15a5ad3d01e0903c71fcab8abd8cf4">tesseract::Tesseract::match_current_words</a></div><div class="ttdeci">void match_current_words(WERD_RES_LIST &words, ROW *row, BLOCK *block)</div><div class="ttdef"><b>Definition:</b> <a href="a00089_source.html#l00226">fixspace.cpp:226</a></div></div>
<div class="ttc" id="a02786_html_afcea4319ceed9b37f3c43eec9ec5d55a"><div class="ttname"><a href="a02786.html#afcea4319ceed9b37f3c43eec9ec5d55a">ETEXT_DESC::cancel</a></div><div class="ttdeci">CANCEL_FUNC cancel</div><div class="ttdoc">for errcode use </div><div class="ttdef"><b>Definition:</b> <a href="a00551_source.html#l00129">ocrclass.h:129</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_ad6f2d3b057387aecbf3763ea1b19eb7c"><div class="ttname"><a href="a02358.html#ad6f2d3b057387aecbf3763ea1b19eb7c">tesseract::Tesseract::conflict_set_I_l_1</a></div><div class="ttdeci">char * conflict_set_I_l_1</div><div class="ttdef"><b>Definition:</b> <a href="a00191_source.html#l01083">tesseractclass.h:1083</a></div></div>
<div class="ttc" id="a02358_html_a0fdea6974197c1918d69bad16be3611e"><div class="ttname"><a href="a02358.html#a0fdea6974197c1918d69bad16be3611e">tesseract::Tesseract::fix_noisy_space_list</a></div><div class="ttdeci">void fix_noisy_space_list(WERD_RES_LIST &best_perm, ROW *row, BLOCK *block)</div><div class="ttdef"><b>Definition:</b> <a href="a00089_source.html#l00599">fixspace.cpp:599</a></div></div>
<div class="ttc" id="a02542_html_a4ffd6b844b62d19df43effdc3faec8e3"><div class="ttname"><a href="a02542.html#a4ffd6b844b62d19df43effdc3faec8e3">WERD_RES::part_of_combo</a></div><div class="ttdeci">bool part_of_combo</div><div class="ttdef"><b>Definition:</b> <a href="a00344_source.html#l00335">pageres.h:335</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="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="a02354_html"><div class="ttname"><a href="a02354.html">tesseract::WordData</a></div><div class="ttdef"><b>Definition:</b> <a href="a00191_source.html#l00147">tesseractclass.h:147</a></div></div>
<div class="ttc" id="a02610_html_af74fa3bf628c9426cd6f1141a87dc2e0"><div class="ttname"><a href="a02610.html#af74fa3bf628c9426cd6f1141a87dc2e0">TBOX::right</a></div><div class="ttdeci">int16_t right() const</div><div class="ttdef"><b>Definition:</b> <a href="a00407_source.html#l00079">rect.h:79</a></div></div>
<div class="ttc" id="a00092_html"><div class="ttname"><a href="a00092.html">fixspace.h</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="a02638_html_ad856eb3b9230d14fe8f013bfd03d8828"><div class="ttname"><a href="a02638.html#ad856eb3b9230d14fe8f013bfd03d8828">WERD::join_on</a></div><div class="ttdeci">void join_on(WERD *other)</div><div class="ttdef"><b>Definition:</b> <a href="a00446_source.html#l00210">werd.cpp:210</a></div></div>
<div class="ttc" id="a02786_html"><div class="ttname"><a href="a02786.html">ETEXT_DESC</a></div><div class="ttdef"><b>Definition:</b> <a href="a00551_source.html#l00119">ocrclass.h:119</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="a00551_html"><div class="ttname"><a href="a00551.html">ocrclass.h</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="a00089_html_a7373a91e50199f38d52143e22c269f92"><div class="ttname"><a href="a00089.html#a7373a91e50199f38d52143e22c269f92">transform_to_next_perm</a></div><div class="ttdeci">void transform_to_next_perm(WERD_RES_LIST &words)</div><div class="ttdef"><b>Definition:</b> <a href="a00089_source.html#l00402">fixspace.cpp:402</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="a02786_html_a469c1ab091847e37969871bd89cf1005"><div class="ttname"><a href="a02786.html#a469c1ab091847e37969871bd89cf1005">ETEXT_DESC::progress</a></div><div class="ttdeci">int16_t progress</div><div class="ttdoc">chars in this buffer(0) </div><div class="ttdef"><b>Definition:</b> <a href="a00551_source.html#l00122">ocrclass.h:122</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="a02542_html_a3a92c8c9750d78631d75998f008f366a"><div class="ttname"><a href="a02542.html#a3a92c8c9750d78631d75998f008f366a">WERD_RES::box_word</a></div><div class="ttdeci">tesseract::BoxWord * box_word</div><div class="ttdef"><b>Definition:</b> <a href="a00344_source.html#l00266">pageres.h:266</a></div></div>
<div class="ttc" id="a02358_html_a5a057d25ed7712e3d205025d40d3ab65"><div class="ttname"><a href="a02358.html#a5a057d25ed7712e3d205025d40d3ab65">tesseract::Tesseract::fixsp_non_noise_limit</a></div><div class="ttdeci">int fixsp_non_noise_limit</div><div class="ttdef"><b>Definition:</b> <a href="a00191_source.html#l01003">tesseractclass.h:1003</a></div></div>
<div class="ttc" id="a02358_html_a913fc1e4ab2eac499c7a6605ef67e07a"><div class="ttname"><a href="a02358.html#a913fc1e4ab2eac499c7a6605ef67e07a">tesseract::Tesseract::break_noisiest_blob_word</a></div><div class="ttdeci">void break_noisiest_blob_word(WERD_RES_LIST &words)</div><div class="ttdef"><b>Definition:</b> <a href="a00089_source.html#l00645">fixspace.cpp:645</a></div></div>
<div class="ttc" id="a02618_html_a124889539460b8c200b3186da4a692e0"><div class="ttname"><a href="a02618.html#a124889539460b8c200b3186da4a692e0">REJMAP::print</a></div><div class="ttdeci">void print(FILE *fp)</div><div class="ttdef"><b>Definition:</b> <a href="a00410_source.html#l00323">rejctmap.cpp:323</a></div></div>
<div class="ttc" id="a02358_html_a947fe5b3278f82236fafce6cfab3b414"><div class="ttname"><a href="a02358.html#a947fe5b3278f82236fafce6cfab3b414">tesseract::Tesseract::fp_eval_word_spacing</a></div><div class="ttdeci">int16_t fp_eval_word_spacing(WERD_RES_LIST &word_res_list)</div><div class="ttdef"><b>Definition:</b> <a href="a00089_source.html#l00860">fixspace.cpp:860</a></div></div>
<div class="ttc" id="a00248_html"><div class="ttname"><a href="a00248.html">boxword.h</a></div></div>
<div class="ttc" id="a00503_html_a93a603f4063a6b9403d81caa245a583b"><div class="ttname"><a href="a00503.html#a93a603f4063a6b9403d81caa245a583b">ASSERT_HOST</a></div><div class="ttdeci">#define ASSERT_HOST(x)</div><div class="ttdef"><b>Definition:</b> <a href="a00503_source.html#l00084">errcode.h:84</a></div></div>
<div class="ttc" id="a02358_html_a0ed7f2173b7ac61d85a0660821a03572"><div class="ttname"><a href="a02358.html#a0ed7f2173b7ac61d85a0660821a03572">tesseract::Tesseract::classify_word_and_language</a></div><div class="ttdeci">void classify_word_and_language(int pass_n, PAGE_RES_IT *pr_it, WordData *word_data)</div><div class="ttdef"><b>Definition:</b> <a href="a00071_source.html#l01338">control.cpp:1338</a></div></div>
<div class="ttc" id="a00407_html"><div class="ttname"><a href="a00407.html">rect.h</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="a00089.html">fixspace.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>