morphodita/morphodita.cpp

filter: Statementstmt 36.0% 1877 / 5213 Branchbran 19.4% 1097 / 5656 Conditioncond n/a MC/DCmcdc n/a Subroutinesub n/a Podpod n/a totaltotal 27.3% 2974 / 10869 CC 0 SCAR 0
CC
0
Cov
0%
CRAP 0
« lib/Ufal/MorphoDiTa.c ↑ Summary
1 // This file is part of MorphoDiTa <http://github.com/ufal/morphodita/>.
2 //
3 // This file is a bundle of all sources and headers of MorphoDiTa library.
4 // Comments and copyrights of all individual files are kept.
5  
6 #include <algorithm>
7 #include <atomic>
8 #include <cassert>
9 #include <cstddef>
10 #include <cstdint>
11 #include <cstdlib>
12 #include <cstring>
13 #include <fstream>
14 #include <iomanip>
15 #include <iostream>
16 #include <iterator>
17 #include <map>
18 #include <memory>
19 #include <sstream>
20 #include <stdexcept>
21 #include <string>
22 #include <unordered_map>
23 #include <unordered_set>
24 #include <utility>
25 #include <vector>
26  
27 namespace ufal {
28 namespace morphodita {
29  
30 /////////
31 // File: utils/common.h
32 /////////
33  
34 // This file is part of UFAL C++ Utils <http://github.com/ufal/cpp_utils/>.
35 //
36 // Copyright 2015 Institute of Formal and Applied Linguistics, Faculty of
37 // Mathematics and Physics, Charles University in Prague, Czech Republic.
38 //
39 // This Source Code Form is subject to the terms of the Mozilla Public
40 // License, v. 2.0. If a copy of the MPL was not distributed with this
41 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
42  
43 // Headers available in all sources
44  
45 namespace utils {
46  
47 using namespace std;
48  
49 // Assert that int is at least 4B
50 static_assert(sizeof(int) >= sizeof(int32_t), "Int must be at least 4B wide!");
51  
52 // Assert that we are on a little endian system
53 #ifdef __BYTE_ORDER__
54 static_assert(__BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__, "Only little endian systems are supported!");
55 #endif
56  
57 #define runtime_failure(message) exit((cerr << message << endl, 1))
58  
59 } // namespace utils
60  
61 /////////
62 // File: common.h
63 /////////
64  
65 // This file is part of MorphoDiTa <http://github.com/ufal/morphodita/>.
66 //
67 // Copyright 2015 Institute of Formal and Applied Linguistics, Faculty of
68 // Mathematics and Physics, Charles University in Prague, Czech Republic.
69 //
70 // This Source Code Form is subject to the terms of the Mozilla Public
71 // License, v. 2.0. If a copy of the MPL was not distributed with this
72 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
73  
74 using namespace utils;
75  
76 /////////
77 // File: utils/string_piece.h
78 /////////
79  
80 // This file is part of UFAL C++ Utils <http://github.com/ufal/cpp_utils/>.
81 //
82 // Copyright 2015 Institute of Formal and Applied Linguistics, Faculty of
83 // Mathematics and Physics, Charles University in Prague, Czech Republic.
84 //
85 // This Source Code Form is subject to the terms of the Mozilla Public
86 // License, v. 2.0. If a copy of the MPL was not distributed with this
87 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
88  
89 namespace utils {
90  
91 struct string_piece {
92 const char* str;
93 size_t len;
94  
95 3 string_piece() : str(nullptr), len(0) {}
96 14 string_piece(const char* str) : str(str), len(strlen(str)) {}
97 35 string_piece(const char* str, size_t len) : str(str), len(len) {}
98 8 string_piece(const string& str) : str(str.c_str()), len(str.size()) {}
99 };
100  
101 0 inline ostream& operator<<(ostream& os, const string_piece& str) {
102 0 return os.write(str.str, str.len);
103 }
104  
105 0 inline bool operator==(const string_piece& a, const string_piece& b) {
106 0 ▶ return a.len == b.len && memcmp(a.str, b.str, a.len) == 0;
Branch: 2 branches
BranchTrueFalseTotal
return a.len == b.len && memcmp(a.str, b.str, a.len) == 0; 0 0 0
return a.len == b.len && memcmp(a.str, b.str, a.len) == 0; 0 0 0
107 }
108  
109 inline bool operator!=(const string_piece& a, const string_piece& b) {
110 return a.len != b.len || memcmp(a.str, b.str, a.len) != 0;
111 }
112  
113 } // namespace utils
114  
115 /////////
116 // File: derivator/derivator.h
117 /////////
118  
119 // This file is part of MorphoDiTa <http://github.com/ufal/morphodita/>.
120 //
121 // Copyright 2016 Institute of Formal and Applied Linguistics, Faculty of
122 // Mathematics and Physics, Charles University in Prague, Czech Republic.
123 //
124 // This Source Code Form is subject to the terms of the Mozilla Public
125 // License, v. 2.0. If a copy of the MPL was not distributed with this
126 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
127  
128 struct derivated_lemma {
129 string lemma;
130 };
131  
132 class derivator {
133 public:
134 0 virtual ~derivator() {}
135  
136 // For given lemma, return the parent in the derivation graph.
137 // The lemma is assumed to be lemma id and any lemma comments are ignored.
138 virtual bool parent(string_piece lemma, derivated_lemma& parent) const = 0;
139  
140 // For given lemma, return the children in the derivation graph.
141 // The lemma is assumed to be lemma id and any lemma comments are ignored.
142 virtual bool children(string_piece lemma, vector<derivated_lemma>& children) const = 0;
143 };
144  
145 /////////
146 // File: tokenizer/tokenizer.h
147 /////////
148  
149 // This file is part of MorphoDiTa <http://github.com/ufal/morphodita/>.
150 //
151 // Copyright 2015 Institute of Formal and Applied Linguistics, Faculty of
152 // Mathematics and Physics, Charles University in Prague, Czech Republic.
153 //
154 // This Source Code Form is subject to the terms of the Mozilla Public
155 // License, v. 2.0. If a copy of the MPL was not distributed with this
156 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
157  
158 // Range of a token, measured in Unicode characters, not UTF8 bytes.
159 struct token_range {
160 size_t start;
161 size_t length;
162  
163 0 token_range() {}
164 32 token_range(size_t start, size_t length) : start(start), length(length) {}
165 };
166  
167 class tokenizer {
168 public:
169 0 virtual ~tokenizer() {}
170  
171 virtual void set_text(string_piece text, bool make_copy = false) = 0;
172 virtual bool next_sentence(vector<string_piece>* forms, vector<token_range>* tokens) = 0;
173  
174 // Static factory methods
175 static tokenizer* new_vertical_tokenizer();
176  
177 static tokenizer* new_czech_tokenizer();
178 static tokenizer* new_english_tokenizer();
179 static tokenizer* new_generic_tokenizer();
180 };
181  
182 /////////
183 // File: morpho/morpho.h
184 /////////
185  
186 // This file is part of MorphoDiTa <http://github.com/ufal/morphodita/>.
187 //
188 // Copyright 2015 Institute of Formal and Applied Linguistics, Faculty of
189 // Mathematics and Physics, Charles University in Prague, Czech Republic.
190 //
191 // This Source Code Form is subject to the terms of the Mozilla Public
192 // License, v. 2.0. If a copy of the MPL was not distributed with this
193 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
194  
195 struct tagged_form {
196 string form;
197 string tag;
198  
199 0 tagged_form() {}
200 23 ▶ tagged_form(const string& form, const string& tag) : form(form), tag(tag) {}
Branch: 1 branch
BranchTrueFalseTotal
tagged_form(const string& form, const string& tag) : form(form), tag(tag) {} 23 0 23
201 };
202  
203 struct tagged_lemma {
204 string lemma;
205 string tag;
206  
207 0 tagged_lemma() {}
208 24 ▶ tagged_lemma(const string& lemma, const string& tag) : lemma(lemma), tag(tag) {}
Branch: 1 branch
BranchTrueFalseTotal
tagged_lemma(const string& lemma, const string& tag) : lemma(lemma), tag(tag) {} 24 0 24
209 };
210  
211 struct tagged_lemma_forms {
212 string lemma;
213 vector<tagged_form> forms;
214  
215 tagged_lemma_forms() {}
216 4 tagged_lemma_forms(const string& lemma) : lemma(lemma) {}
217 };
218  
219 class morpho {
220 public:
221 0 virtual ~morpho() {}
222  
223 static morpho* load(istream& is);
224 static morpho* load(const char* fname);
225  
226 enum guesser_mode { NO_GUESSER = 0, GUESSER = 1, GUESSER_UNSPECIFIED = -1 };
227  
228 // Perform morphologic analysis of a form. The form is given by a pointer and
229 // length and therefore does not need to be '\0' terminated. The guesser
230 // parameter specifies whether a guesser can be used if the form is not found
231 // in the dictionary. Output is assigned to the lemmas vector.
232 //
233 // If the form is found in the dictionary, analyses are assigned to lemmas
234 // and NO_GUESSER returned. If guesser == GUESSER and the form analyses are
235 // found using a guesser, they are assigned to lemmas and GUESSER is
236 // returned. Otherwise <0 is returned and lemmas are filled with one
237 // analysis containing given form as lemma and a tag for unknown word.
238 virtual int analyze(string_piece form, guesser_mode guesser, vector<tagged_lemma>& lemmas) const = 0;
239  
240 // Perform morphologic generation of a lemma. The lemma is given by a pointer
241 // and length and therefore does not need to be '\0' terminated. Optionally
242 // a tag_wildcard can be specified (or be NULL) and if so, results are
243 // filtered using this wildcard. The guesser parameter speficies whether
244 // a guesser can be used if the lemma is not found in the dictionary. Output
245 // is assigned to the forms vector.
246 //
247 // Tag_wildcard can be either NULL or a wildcard applied to the results.
248 // A ? in the wildcard matches any character, [bytes] matches any of the
249 // bytes and [^bytes] matches any byte different from the specified ones.
250 // A - has no special meaning inside the bytes and if ] is first in bytes, it
251 // does not end the bytes group.
252 //
253 // If the given lemma is only a raw lemma, all lemma ids with this raw lemma
254 // are returned. Otherwise only matching lemma ids are returned, ignoring any
255 // lemma comments. For every found lemma, matching forms are filtered using
256 // the tag_wildcard. If at least one lemma is found in the dictionary,
257 // NO_GUESSER is returned. If guesser == GUESSER and the lemma is found by
258 // the guesser, GUESSER is returned. Otherwise, forms are cleared and <0 is
259 // returned.
260 virtual int generate(string_piece lemma, const char* tag_wildcard, guesser_mode guesser, vector<tagged_lemma_forms>& forms) const = 0;
261  
262 // Rawlemma and lemma id identification
263 virtual int raw_lemma_len(string_piece lemma) const = 0;
264 virtual int lemma_id_len(string_piece lemma) const = 0;
265  
266 // Rawform identification
267 virtual int raw_form_len(string_piece form) const = 0;
268  
269 // Construct a new tokenizer instance appropriate for this morphology.
270 // Can return NULL if no such tokenizer exists.
271 virtual tokenizer* new_tokenizer() const = 0;
272  
273 // Return a derivator for this morphology, or NULL if it does not exist.
274 // The returned instance is owned by the morphology and should not be deleted.
275 virtual const derivator* get_derivator() const;
276  
277 protected:
278 unique_ptr<derivator> derinet;
279 };
280  
281 /////////
282 // File: tagset_converter/tagset_converter.h
283 /////////
284  
285 // This file is part of MorphoDiTa <http://github.com/ufal/morphodita/>.
286 //
287 // Copyright 2015 Institute of Formal and Applied Linguistics, Faculty of
288 // Mathematics and Physics, Charles University in Prague, Czech Republic.
289 //
290 // This Source Code Form is subject to the terms of the Mozilla Public
291 // License, v. 2.0. If a copy of the MPL was not distributed with this
292 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
293  
294 class tagset_converter {
295 public:
296 0 virtual ~tagset_converter() {}
297  
298 // Convert a tag-lemma pair to a different tag set.
299 virtual void convert(tagged_lemma& tagged_lemma) const = 0;
300 // Convert a result of analysis to a different tag set. Apart from calling
301 // convert, any repeated entry is removed.
302 virtual void convert_analyzed(vector<tagged_lemma>& tagged_lemmas) const = 0;
303 // Convert a result of generation to a different tag set. Apart from calling
304 // convert, any repeated entry is removed.
305 virtual void convert_generated(vector<tagged_lemma_forms>& forms) const = 0;
306  
307 // Static factory methods
308 static tagset_converter* new_identity_converter();
309  
310 static tagset_converter* new_pdt_to_conll2009_converter();
311 static tagset_converter* new_strip_lemma_comment_converter(const morpho& dictionary);
312 static tagset_converter* new_strip_lemma_id_converter(const morpho& dictionary);
313 };
314  
315 // Helper method for creating tagset_converter from instance name.
316 tagset_converter* new_tagset_converter(const string& name, const morpho& dictionary);
317  
318 // Helper methods making sure remapped results are unique.
319 void tagset_converter_unique_analyzed(vector<tagged_lemma>& tagged_lemmas);
320 void tagset_converter_unique_generated(vector<tagged_lemma_forms>& forms);
321  
322 /////////
323 // File: derivator/derivation_formatter.h
324 /////////
325  
326 // This file is part of MorphoDiTa <http://github.com/ufal/morphodita/>.
327 //
328 // Copyright 2016 Institute of Formal and Applied Linguistics, Faculty of
329 // Mathematics and Physics, Charles University in Prague, Czech Republic.
330 //
331 // This Source Code Form is subject to the terms of the Mozilla Public
332 // License, v. 2.0. If a copy of the MPL was not distributed with this
333 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
334  
335 class derivation_formatter {
336 public:
337 0 virtual ~derivation_formatter() {}
338  
339 // Perform the required derivation and store it directly in the lemma.
340 virtual void format_derivation(string& lemma) const;
341  
342 // Perform the required derivation and store it directly in the tagged_lemma.
343 // If a tagset_converter is given, it is also applied.
344 virtual void format_tagged_lemma(tagged_lemma& lemma, const tagset_converter* converter = nullptr) const = 0;
345  
346 // Perform the required derivation on a list of tagged_lemmas.
347 // If a tagset_converter is given, it is also applied.
348 // Either way, only unique entries are returned.
349 virtual void format_tagged_lemmas(vector<tagged_lemma>& lemmas, const tagset_converter* converter = nullptr) const;
350  
351 // Static factory methods.
352 static derivation_formatter* new_none_derivation_formatter();
353 static derivation_formatter* new_root_derivation_formatter(const derivator* derinet);
354 static derivation_formatter* new_path_derivation_formatter(const derivator* derinet);
355 static derivation_formatter* new_tree_derivation_formatter(const derivator* derinet);
356 // String version of static factory method.
357 static derivation_formatter* new_derivation_formatter(string_piece name, const derivator* derinet);
358 };
359  
360 /////////
361 // File: derivator/derivation_formatter.cpp
362 /////////
363  
364 // This file is part of MorphoDiTa <http://github.com/ufal/morphodita/>.
365 //
366 // Copyright 2016 Institute of Formal and Applied Linguistics, Faculty of
367 // Mathematics and Physics, Charles University in Prague, Czech Republic.
368 //
369 // This Source Code Form is subject to the terms of the Mozilla Public
370 // License, v. 2.0. If a copy of the MPL was not distributed with this
371 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
372  
373 0 void derivation_formatter::format_derivation(string& lemma) const {
374 0 tagged_lemma result;
375 0 result.lemma.swap(lemma);
376 0 ▶ format_tagged_lemma(result);
Branch: 1 branch
BranchTrueFalseTotal
format_tagged_lemma(result); 0 0 0
377 0 lemma.swap(result.lemma);
378 0 }
379  
380 0 void derivation_formatter::format_tagged_lemmas(vector<tagged_lemma>& lemmas, const tagset_converter* converter) const {
381 0 ▶ for (auto&& lemma : lemmas)
Branch: 1 branch
BranchTrueFalseTotal
for (auto&& lemma : lemmas) 0 0 0
382 0 ▶ format_tagged_lemma(lemma, converter);
Branch: 1 branch
BranchTrueFalseTotal
format_tagged_lemma(lemma, converter); 0 0 0
383  
384 0 ▶ if (lemmas.size() > 1)
Branch: 1 branch
BranchTrueFalseTotal
if (lemmas.size() > 1) 0 0 0
385 0 tagset_converter_unique_analyzed(lemmas);
386 0 }
387  
388 class none_derivation_formatter : public derivation_formatter {
389 0 virtual void format_derivation(string& /*lemma*/) const override {}
390  
391 0 virtual void format_tagged_lemma(tagged_lemma& lemma, const tagset_converter* converter) const override {
392 0 ▶ if (converter) converter->convert(lemma);
Branch: 1 branch
BranchTrueFalseTotal
if (converter) converter->convert(lemma); 0 0 0
393 0 }
394  
395 0 virtual void format_tagged_lemmas(vector<tagged_lemma>& lemmas, const tagset_converter* converter) const override {
396 0 ▶ if (converter) converter->convert_analyzed(lemmas);
Branch: 1 branch
BranchTrueFalseTotal
if (converter) converter->convert_analyzed(lemmas); 0 0 0
397 0 }
398 };
399  
400 0 derivation_formatter* derivation_formatter::new_none_derivation_formatter() {
401 0 return new none_derivation_formatter();
402 }
403  
404 class root_derivation_formatter : public derivation_formatter {
405 public:
406 0 root_derivation_formatter(const derivator* derinet) : derinet(derinet) {}
407  
408 0 virtual void format_tagged_lemma(tagged_lemma& lemma, const tagset_converter* converter) const override {
409 0 ▶ for (derivated_lemma parent; derinet->parent(lemma.lemma, parent); )
Branch: 2 branches
BranchTrueFalseTotal
for (derivated_lemma parent; derinet->parent(lemma.lemma, parent); ) 0 0 0
for (derivated_lemma parent; derinet->parent(lemma.lemma, parent); ) 0 0 0
410 0 ▶ lemma.lemma.assign(parent.lemma);
Branch: 1 branch
BranchTrueFalseTotal
lemma.lemma.assign(parent.lemma); 0 0 0
411 0 ▶ if (converter) converter->convert(lemma);
Branch: 1 branch
BranchTrueFalseTotal
if (converter) converter->convert(lemma); 0 0 0
412 0 }
413  
414 private:
415 const derivator* derinet;
416 };
417  
418 0 derivation_formatter* derivation_formatter::new_root_derivation_formatter(const derivator* derinet) {
419 0 ▶ return derinet ? new root_derivation_formatter(derinet) : nullptr;
Branch: 4 branches
BranchTrueFalseTotal
return derinet ? new root_derivation_formatter(derinet) : nullptr; 0 0 0
return derinet ? new root_derivation_formatter(derinet) : nullptr; 0 0 0
return derinet ? new root_derivation_formatter(derinet) : nullptr; 0 0 0
return derinet ? new root_derivation_formatter(derinet) : nullptr; 0 0 0
420 }
421  
422 class path_derivation_formatter : public derivation_formatter {
423 public:
424 0 path_derivation_formatter(const derivator* derinet) : derinet(derinet) {}
425  
426 0 virtual void format_tagged_lemma(tagged_lemma& lemma, const tagset_converter* converter) const override {
427 0 ▶ tagged_lemma current(lemma);
Branch: 1 branch
BranchTrueFalseTotal
tagged_lemma current(lemma); 0 0 0
428 0 ▶ if (converter) converter->convert(lemma);
Branch: 2 branches
BranchTrueFalseTotal
if (converter) converter->convert(lemma); 0 0 0
if (converter) converter->convert(lemma); 0 0 0
429 0 ▶ for (derivated_lemma parent; derinet->parent(current.lemma, parent); current.lemma.swap(parent.lemma)) {
Branch: 2 branches
BranchTrueFalseTotal
for (derivated_lemma parent; derinet->parent(current.lemma, parent); current.lemma.swap(parent.lemma)) { 0 0 0
for (derivated_lemma parent; derinet->parent(current.lemma, parent); current.lemma.swap(parent.lemma)) { 0 0 0
430 0 ▶ tagged_lemma parrent_lemma(parent.lemma, current.tag);
Branch: 1 branch
BranchTrueFalseTotal
tagged_lemma parrent_lemma(parent.lemma, current.tag); 0 0 0
431 0 ▶ if (converter) converter->convert(parrent_lemma);
Branch: 2 branches
BranchTrueFalseTotal
if (converter) converter->convert(parrent_lemma); 0 0 0
if (converter) converter->convert(parrent_lemma); 0 0 0
432 0 ▶ lemma.lemma.append(" ").append(parrent_lemma.lemma);
Branch: 2 branches
BranchTrueFalseTotal
lemma.lemma.append(" ").append(parrent_lemma.lemma); 0 0 0
lemma.lemma.append(" ").append(parrent_lemma.lemma); 0 0 0
433 0 }
434 0 }
435  
436 private:
437 const derivator* derinet;
438 };
439  
440 0 derivation_formatter* derivation_formatter::new_path_derivation_formatter(const derivator* derinet) {
441 0 ▶ return derinet ? new path_derivation_formatter(derinet) : nullptr;
Branch: 4 branches
BranchTrueFalseTotal
return derinet ? new path_derivation_formatter(derinet) : nullptr; 0 0 0
return derinet ? new path_derivation_formatter(derinet) : nullptr; 0 0 0
return derinet ? new path_derivation_formatter(derinet) : nullptr; 0 0 0
return derinet ? new path_derivation_formatter(derinet) : nullptr; 0 0 0
442 }
443  
444 class tree_derivation_formatter : public derivation_formatter {
445 public:
446 0 tree_derivation_formatter(const derivator* derinet) : derinet(derinet) {}
447  
448 0 virtual void format_tagged_lemma(tagged_lemma& lemma, const tagset_converter* converter) const override {
449 0 ▶ string root(lemma.lemma), tag(lemma.tag);
Branch: 2 branches
BranchTrueFalseTotal
string root(lemma.lemma), tag(lemma.tag); 0 0 0
string root(lemma.lemma), tag(lemma.tag); 0 0 0
450 0 ▶ if (converter) converter->convert(lemma);
Branch: 2 branches
BranchTrueFalseTotal
if (converter) converter->convert(lemma); 0 0 0
if (converter) converter->convert(lemma); 0 0 0
451 0 ▶ for (derivated_lemma parent; derinet->parent(root, parent); root.swap(parent.lemma)) {}
Branch: 2 branches
BranchTrueFalseTotal
for (derivated_lemma parent; derinet->parent(root, parent); root.swap(parent.lemma)) {} 0 0 0
for (derivated_lemma parent; derinet->parent(root, parent); root.swap(parent.lemma)) {} 0 0 0
452 0 ▶ format_tree(root, tag, lemma, converter);
Branch: 1 branch
BranchTrueFalseTotal
format_tree(root, tag, lemma, converter); 0 0 0
453 0 }
454  
455 0 void format_tree(const string& root, const string& tag, tagged_lemma& tree, const tagset_converter* converter) const {
456 0 vector<derivated_lemma> children;
457  
458 0 ▶ if (converter) {
Branch: 1 branch
BranchTrueFalseTotal
if (converter) { 0 0 0
459 0 ▶ tagged_lemma current(root, tag);
Branch: 1 branch
BranchTrueFalseTotal
tagged_lemma current(root, tag); 0 0 0
460 0 ▶ converter->convert(current);
Branch: 1 branch
BranchTrueFalseTotal
converter->convert(current); 0 0 0
461 0 ▶ tree.lemma.append(" ").append(current.lemma);
Branch: 2 branches
BranchTrueFalseTotal
tree.lemma.append(" ").append(current.lemma); 0 0 0
tree.lemma.append(" ").append(current.lemma); 0 0 0
462 0 } else {
463 0 ▶ tree.lemma.append(" ").append(root);
Branch: 2 branches
BranchTrueFalseTotal
tree.lemma.append(" ").append(root); 0 0 0
tree.lemma.append(" ").append(root); 0 0 0
464 }
465  
466 0 ▶ if (derinet->children(root, children))
Branch: 2 branches
BranchTrueFalseTotal
if (derinet->children(root, children)) 0 0 0
if (derinet->children(root, children)) 0 0 0
467 0 ▶ for (auto&& child : children)
Branch: 1 branch
BranchTrueFalseTotal
for (auto&& child : children) 0 0 0
468 0 ▶ format_tree(child.lemma, tag, tree, converter);
Branch: 1 branch
BranchTrueFalseTotal
format_tree(child.lemma, tag, tree, converter); 0 0 0
469 0 ▶ tree.lemma.push_back(' ');
Branch: 1 branch
BranchTrueFalseTotal
tree.lemma.push_back(' '); 0 0 0
470 0 }
471  
472 private:
473 const derivator* derinet;
474 };
475  
476 0 derivation_formatter* derivation_formatter::new_tree_derivation_formatter(const derivator* derinet) {
477 0 ▶ return derinet ? new tree_derivation_formatter(derinet) : nullptr;
Branch: 4 branches
BranchTrueFalseTotal
return derinet ? new tree_derivation_formatter(derinet) : nullptr; 0 0 0
return derinet ? new tree_derivation_formatter(derinet) : nullptr; 0 0 0
return derinet ? new tree_derivation_formatter(derinet) : nullptr; 0 0 0
return derinet ? new tree_derivation_formatter(derinet) : nullptr; 0 0 0
478 }
479  
480 0 derivation_formatter* derivation_formatter::new_derivation_formatter(string_piece name, const derivator* derinet) {
481 0 ▶ if (name == "none") return new_none_derivation_formatter();
Branch: 1 branch
BranchTrueFalseTotal
if (name == "none") return new_none_derivation_formatter(); 0 0 0
482 0 ▶ if (name == "root") return new_root_derivation_formatter(derinet);
Branch: 1 branch
BranchTrueFalseTotal
if (name == "root") return new_root_derivation_formatter(derinet); 0 0 0
483 0 ▶ if (name == "path") return new_path_derivation_formatter(derinet);
Branch: 1 branch
BranchTrueFalseTotal
if (name == "path") return new_path_derivation_formatter(derinet); 0 0 0
484 0 ▶ if (name == "tree") return new_tree_derivation_formatter(derinet);
Branch: 1 branch
BranchTrueFalseTotal
if (name == "tree") return new_tree_derivation_formatter(derinet); 0 0 0
485 0 return nullptr;
486 }
487  
488 /////////
489 // File: morpho/small_stringops.h
490 /////////
491  
492 // This file is part of MorphoDiTa <http://github.com/ufal/morphodita/>.
493 //
494 // Copyright 2015 Institute of Formal and Applied Linguistics, Faculty of
495 // Mathematics and Physics, Charles University in Prague, Czech Republic.
496 //
497 // This Source Code Form is subject to the terms of the Mozilla Public
498 // License, v. 2.0. If a copy of the MPL was not distributed with this
499 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
500  
501 // Declarations
502 inline bool small_memeq(const void* a, const void* b, size_t len);
503 inline void small_memcpy(void* dest, const void* src, size_t len);
504  
505 // Definitions
506 185 bool small_memeq(const void* a_void, const void* b_void, size_t len) {
507 185 const char* a = (const char*)a_void;
508 185 const char* b = (const char*)b_void;
509  
510 486 ▶ while (len--)
Branch: 1 branch
BranchTrueFalseTotal
while (len--) 418 68 486
511 418 ▶ if (*a++ != *b++)
Branch: 1 branch
BranchTrueFalseTotal
if (*a++ != *b++) 117 301 418
512 117 return false;
513 68 return true;
514 }
515  
516 184 void small_memcpy(void* dest_void, const void* src_void, size_t len) {
517 184 char* dest = (char*)dest_void;
518 184 const char* src = (const char*)src_void;
519  
520 690 ▶ while (len--)
Branch: 1 branch
BranchTrueFalseTotal
while (len--) 506 184 690
521 506 *dest++ = *src++;
522 184 }
523  
524 /////////
525 // File: utils/binary_decoder.h
526 /////////
527  
528 // This file is part of UFAL C++ Utils <http://github.com/ufal/cpp_utils/>.
529 //
530 // Copyright 2015 Institute of Formal and Applied Linguistics, Faculty of
531 // Mathematics and Physics, Charles University in Prague, Czech Republic.
532 //
533 // This Source Code Form is subject to the terms of the Mozilla Public
534 // License, v. 2.0. If a copy of the MPL was not distributed with this
535 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
536  
537 namespace utils {
538  
539 //
540 // Declarations
541 //
542  
543 class binary_decoder_error : public runtime_error {
544 public:
545 0 explicit binary_decoder_error(const char* description) : runtime_error(description) {}
546 };
547  
548 class binary_decoder {
549 public:
550 inline unsigned char* fill(unsigned len);
551  
552 inline unsigned next_1B();
553 inline unsigned next_2B();
554 inline unsigned next_4B();
555 inline void next_str(string& str);
556 template <class T> inline const T* next(unsigned elements);
557  
558 inline bool is_end();
559 inline unsigned tell();
560 inline void seek(unsigned pos);
561  
562 private:
563 vector<unsigned char> buffer;
564 const unsigned char* data;
565 const unsigned char* data_end;
566 };
567  
568 //
569 // Definitions
570 //
571  
572 4 unsigned char* binary_decoder::fill(unsigned len) {
573 4 buffer.resize(len);
574 4 data = buffer.data();
575 4 data_end = buffer.data() + len;
576  
577 4 return buffer.data();
578 }
579  
580 463 unsigned binary_decoder::next_1B() {
581 463 ▶ if (data + 1 > data_end) throw binary_decoder_error("No more data in binary_decoder");
Branch: 2 branches
BranchTrueFalseTotal
if (data + 1 > data_end) throw binary_decoder_error("No more data in binary_decoder"); 0 463 463
if (data + 1 > data_end) throw binary_decoder_error("No more data in binary_decoder"); 0 0 0
582 463 return *data++;
583 }
584  
585 30 unsigned binary_decoder::next_2B() {
586 30 ▶ if (data + sizeof(uint16_t) > data_end) throw binary_decoder_error("No more data in binary_decoder");
Branch: 2 branches
BranchTrueFalseTotal
if (data + sizeof(uint16_t) > data_end) throw binary_decoder_error("No more data in binary_decoder"); 0 30 30
if (data + sizeof(uint16_t) > data_end) throw binary_decoder_error("No more data in binary_decoder"); 0 0 0
587 uint16_t result;
588 30 memcpy(&result, data, sizeof(uint16_t));
589 30 data += sizeof(uint16_t);
590 30 return result;
591 }
592  
593 472 unsigned binary_decoder::next_4B() {
594 472 ▶ if (data + sizeof(uint32_t) > data_end) throw binary_decoder_error("No more data in binary_decoder");
Branch: 2 branches
BranchTrueFalseTotal
if (data + sizeof(uint32_t) > data_end) throw binary_decoder_error("No more data in binary_decoder"); 0 472 472
if (data + sizeof(uint32_t) > data_end) throw binary_decoder_error("No more data in binary_decoder"); 0 0 0
595 uint32_t result;
596 472 memcpy(&result, data, sizeof(uint32_t));
597 472 data += sizeof(uint32_t);
598 472 return result;
599 }
600  
601 void binary_decoder::next_str(string& str) {
602 unsigned len = next_1B();
603 if (len == 255) len = next_4B();
604 str.assign(next<char>(len), len);
605 }
606  
607 219 template <class T> const T* binary_decoder::next(unsigned elements) {
608 219 ▶ if (data + sizeof(T) * elements > data_end) throw binary_decoder_error("No more data in binary_decoder");
Branch: 4 branches
BranchTrueFalseTotal
if (data + sizeof(T) * elements > data_end) throw binary_decoder_error("No more data in binary_decoder"); 0 140 140
if (data + sizeof(T) * elements > data_end) throw binary_decoder_error("No more data in binary_decoder"); 0 0 0
if (data + sizeof(T) * elements > data_end) throw binary_decoder_error("No more data in binary_decoder"); 0 79 79
if (data + sizeof(T) * elements > data_end) throw binary_decoder_error("No more data in binary_decoder"); 0 0 0
609 219 const T* result = (const T*) data;
610 219 data += sizeof(T) * elements;
611 219 return result;
612 }
613  
614 4 bool binary_decoder::is_end() {
615 4 return data >= data_end;
616 }
617  
618 2 unsigned binary_decoder::tell() {
619 2 return data - buffer.data();
620 }
621  
622 2 void binary_decoder::seek(unsigned pos) {
623 2 ▶ if (pos > buffer.size()) throw binary_decoder_error("Cannot seek past end of binary_decoder");
Branch: 2 branches
BranchTrueFalseTotal
if (pos > buffer.size()) throw binary_decoder_error("Cannot seek past end of binary_decoder"); 0 2 2
if (pos > buffer.size()) throw binary_decoder_error("Cannot seek past end of binary_decoder"); 0 0 0
624 2 data = buffer.data() + pos;
625 2 }
626  
627 } // namespace utils
628  
629 /////////
630 // File: utils/binary_encoder.h
631 /////////
632  
633 // This file is part of UFAL C++ Utils <http://github.com/ufal/cpp_utils/>.
634 //
635 // Copyright 2015 Institute of Formal and Applied Linguistics, Faculty of
636 // Mathematics and Physics, Charles University in Prague, Czech Republic.
637 //
638 // This Source Code Form is subject to the terms of the Mozilla Public
639 // License, v. 2.0. If a copy of the MPL was not distributed with this
640 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
641  
642 namespace utils {
643  
644 //
645 // Declarations
646 //
647  
648 class binary_encoder {
649 public:
650 inline binary_encoder();
651  
652 inline void add_1B(unsigned val);
653 inline void add_2B(unsigned val);
654 inline void add_4B(unsigned val);
655 inline void add_float(double val);
656 inline void add_double(double val);
657 inline void add_str(string_piece str);
658 inline void add_data(string_piece data);
659 template <class T> inline void add_data(const vector<T>& data);
660 template <class T> inline void add_data(const T* data, size_t elements);
661  
662 vector<unsigned char> data;
663 };
664  
665 //
666 // Definitions
667 //
668  
669 binary_encoder::binary_encoder() {
670 data.reserve(16);
671 }
672  
673 void binary_encoder::add_1B(unsigned val) {
674 if (uint8_t(val) != val) runtime_failure("Should encode value " << val << " in one byte!");
675 data.push_back(val);
676 }
677  
678 void binary_encoder::add_2B(unsigned val) {
679 if (uint16_t(val) != val) runtime_failure("Should encode value " << val << " in two bytes!");
680 data.insert(data.end(), (unsigned char*) &val, ((unsigned char*) &val) + sizeof(uint16_t));
681 }
682  
683 void binary_encoder::add_4B(unsigned val) {
684 if (uint32_t(val) != val) runtime_failure("Should encode value " << val << " in four bytes!");
685 data.insert(data.end(), (unsigned char*) &val, ((unsigned char*) &val) + sizeof(uint32_t));
686 }
687  
688 void binary_encoder::add_float(double val) {
689 data.insert(data.end(), (unsigned char*) &val, ((unsigned char*) &val) + sizeof(float));
690 }
691  
692 void binary_encoder::add_double(double val) {
693 data.insert(data.end(), (unsigned char*) &val, ((unsigned char*) &val) + sizeof(double));
694 }
695  
696 void binary_encoder::add_str(string_piece str) {
697 add_1B(str.len < 255 ? str.len : 255);
698 if (!(str.len < 255)) add_4B(str.len);
699 add_data(str);
700 }
701  
702 void binary_encoder::add_data(string_piece data) {
703 this->data.insert(this->data.end(), (const unsigned char*) data.str, (const unsigned char*) (data.str + data.len));
704 }
705  
706 template <class T>
707 void binary_encoder::add_data(const vector<T>& data) {
708 this->data.insert(this->data.end(), (const unsigned char*) data.data(), (const unsigned char*) (data.data() + data.size()));
709 }
710  
711 template <class T>
712 void binary_encoder::add_data(const T* data, size_t elements) {
713 this->data.insert(this->data.end(), (const unsigned char*) data, (const unsigned char*) (data + elements));
714 }
715  
716 } // namespace utils
717  
718 /////////
719 // File: utils/pointer_decoder.h
720 /////////
721  
722 // This file is part of UFAL C++ Utils <http://github.com/ufal/cpp_utils/>.
723 //
724 // Copyright 2015 Institute of Formal and Applied Linguistics, Faculty of
725 // Mathematics and Physics, Charles University in Prague, Czech Republic.
726 //
727 // This Source Code Form is subject to the terms of the Mozilla Public
728 // License, v. 2.0. If a copy of the MPL was not distributed with this
729 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
730  
731 namespace utils {
732  
733 //
734 // Declarations
735 //
736  
737 class pointer_decoder {
738 public:
739 inline pointer_decoder(const unsigned char*& data);
740 inline unsigned next_1B();
741 inline unsigned next_2B();
742 inline unsigned next_4B();
743 inline void next_str(string& str);
744 template <class T> inline const T* next(unsigned elements);
745  
746 private:
747 const unsigned char*& data;
748 };
749  
750 //
751 // Definitions
752 //
753  
754 54 pointer_decoder::pointer_decoder(const unsigned char*& data) : data(data) {}
755  
756 42 unsigned pointer_decoder::next_1B() {
757 42 return *data++;
758 }
759  
760 86 unsigned pointer_decoder::next_2B() {
761 uint16_t result;
762 86 memcpy(&result, data, sizeof(uint16_t));
763 86 data += sizeof(uint16_t);
764 86 return result;
765 }
766  
767 34 unsigned pointer_decoder::next_4B() {
768 uint32_t result;
769 34 memcpy(&result, data, sizeof(uint32_t));
770 34 data += sizeof(uint32_t);
771 34 return result;
772 }
773  
774 void pointer_decoder::next_str(string& str) {
775 unsigned len = next_1B();
776 if (len == 255) len = next_4B();
777 str.assign(next<char>(len), len);
778 }
779  
780 0 template <class T> const T* pointer_decoder::next(unsigned elements) {
781 0 const T* result = (const T*) data;
782 0 data += sizeof(T) * elements;
783 0 return result;
784 }
785  
786 } // namespace utils
787  
788 /////////
789 // File: utils/unaligned_access.h
790 /////////
791  
792 // This file is part of UFAL C++ Utils <http://github.com/ufal/cpp_utils/>.
793 //
794 // Copyright 2017 Institute of Formal and Applied Linguistics, Faculty of
795 // Mathematics and Physics, Charles University in Prague, Czech Republic.
796 //
797 // This Source Code Form is subject to the terms of the Mozilla Public
798 // License, v. 2.0. If a copy of the MPL was not distributed with this
799 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
800  
801 namespace utils {
802  
803 //
804 // Declarations
805 //
806  
807 template<class T, class P>
808 inline T unaligned_load(const P* ptr);
809  
810 template<class T, class P>
811 inline T unaligned_load_inc(const P*& ptr);
812  
813 template<class T, class P>
814 inline void unaligned_store(P* ptr, T value);
815  
816 template<class T, class P>
817 inline void unaligned_store_inc(P*& ptr, T value);
818  
819 template<class T>
820 T* unaligned_lower_bound(T* first, size_t size, T val);
821  
822 template<class T>
823 T* unaligned_upper_bound(T* first, size_t size, T val);
824  
825 //
826 // Definitions
827 //
828  
829 template<class T, class P>
830 0 inline T unaligned_load(const P* ptr) {
831 T value;
832 0 memcpy(&value, (const void*)ptr, sizeof(T));
833 0 return value;
834 }
835  
836 template<class T, class P>
837 0 inline T unaligned_load_inc(const P*& ptr) {
838 T value;
839 0 memcpy(&value, (const void*)ptr, sizeof(T));
840 0 ((const char*&)ptr) += sizeof(T);
841 0 return value;
842 }
843  
844 template<class T, class P>
845 0 inline void unaligned_store(P* ptr, T value) {
846 0 memcpy((void*)ptr, &value, sizeof(T));
847 0 }
848  
849 template<class T, class P>
850 84 inline void unaligned_store_inc(P*& ptr, T value) {
851 84 memcpy((void*)ptr, &value, sizeof(T));
852 84 ((char*&)ptr) += sizeof(T);
853 84 }
854  
855 template<class T>
856 6 T* unaligned_lower_bound(T* first, size_t size, T val) {
857 17 ▶ while (size) {
Branch: 1 branch
BranchTrueFalseTotal
while (size) { 11 6 17
858 11 size_t step = size >> 1;
859 11 ▶ if (unaligned_load<T>(first + step) < val) {
Branch: 1 branch
BranchTrueFalseTotal
if (unaligned_load<T>(first + step) < val) { 5 6 11
860 5 first += step + 1;
861 5 size -= step + 1;
862 } else {
863 6 size = step;
864 }
865 }
866 6 return first;
867 }
868  
869 template<class T>
870 T* unaligned_upper_bound(T* first, size_t size, T val) {
871 while (size) {
872 size_t step = size >> 1;
873 if (!(val < unaligned_load<T>(first + step))) {
874 first += step + 1;
875 size -= step + 1;
876 } else {
877 size = step;
878 }
879 }
880 return first;
881 }
882  
883 } // namespace utils
884  
885 /////////
886 // File: morpho/persistent_unordered_map.h
887 /////////
888  
889 // This file is part of MorphoDiTa <http://github.com/ufal/morphodita/>.
890 //
891 // Copyright 2015 Institute of Formal and Applied Linguistics, Faculty of
892 // Mathematics and Physics, Charles University in Prague, Czech Republic.
893 //
894 // This Source Code Form is subject to the terms of the Mozilla Public
895 // License, v. 2.0. If a copy of the MPL was not distributed with this
896 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
897  
898 // Declarations
899 class persistent_unordered_map {
900 public:
901 // Accessing function
902 template <class EntrySize>
903 inline const unsigned char* at(const char* str, int len, EntrySize entry_size) const;
904  
905 template <class T>
906 inline const T* at_typed(const char* str, int len) const;
907  
908 template <class EntryProcess>
909 inline void iter(const char* str, int len, EntryProcess entry_process) const;
910  
911 template <class EntryProcess>
912 inline void iter_all(EntryProcess entry_process) const;
913  
914 // Two helper functions accessing some internals
915 inline int max_length() const;
916 inline const unsigned char* data_start(int len) const;
917  
918 // Creation functions
919 53 persistent_unordered_map() {}
920 template <class Entry, class EntryEncode>
921 persistent_unordered_map(const unordered_map<string, Entry>& map, double load_factor, EntryEncode entry_encode);
922 template <class Entry, class EntryEncode>
923 persistent_unordered_map(const unordered_map<string, Entry>& map, double load_factor, bool add_prefixes, bool add_suffixes, EntryEncode entry_encode);
924  
925 // Manual creation functions
926 inline void resize(unsigned elems);
927 inline void add(const char* str, int str_len, int data_len);
928 inline void done_adding();
929 inline unsigned char* fill(const char* str, int str_len, int data_len);
930 inline void done_filling();
931  
932 // Serialization
933 inline void load(binary_decoder& data);
934 inline void save(binary_encoder& enc);
935  
936 private:
937 struct fnv_hash;
938 vector<fnv_hash> hashes;
939  
940 template <class Entry, class EntryEncode>
941 void construct(const map<string, Entry>& map, double load_factor, EntryEncode entry_encode);
942 };
943  
944 // Definitions
945 struct persistent_unordered_map::fnv_hash {
946 32 fnv_hash(unsigned num) {
947 32 mask = 1;
948 136 ▶ while (mask < num)
Branch: 1 branch
BranchTrueFalseTotal
while (mask < num) 104 32 136
949 104 mask <<= 1;
950 32 ▶ hash.resize(mask + 1);
Branch: 1 branch
BranchTrueFalseTotal
hash.resize(mask + 1); 32 0 32
951 32 mask--;
952 32 }
953 140 fnv_hash(binary_decoder& data) {
954 140 ▶ uint32_t size = data.next_4B();
Branch: 1 branch
BranchTrueFalseTotal
uint32_t size = data.next_4B(); 140 0 140
955 140 mask = size - 2;
956 140 ▶ hash.resize(size);
Branch: 1 branch
BranchTrueFalseTotal
hash.resize(size); 140 0 140
957 140 ▶ memcpy(hash.data(), (const void*)data.next<uint32_t>(size), size * sizeof(uint32_t));
Branch: 1 branch
BranchTrueFalseTotal
memcpy(hash.data(), (const void*)data.next<uint32_t>(size), size * sizeof(uint32_t)); 140 0 140
958  
959 140 ▶ size = data.next_4B();
Branch: 1 branch
BranchTrueFalseTotal
size = data.next_4B(); 140 0 140
960 140 ▶ this->data.resize(size);
Branch: 1 branch
BranchTrueFalseTotal
this->data.resize(size); 140 0 140
961 140 ▶ if (size) memcpy(this->data.data(), data.next<char>(size), size);
Branch: 2 branches
BranchTrueFalseTotal
if (size) memcpy(this->data.data(), data.next<char>(size), size); 71 69 140
if (size) memcpy(this->data.data(), data.next<char>(size), size); 71 0 71
962 140 }
963  
964 304 inline uint32_t index(const char* data, int len) const {
965 304 ▶ if (len <= 0) return 0;
Branch: 1 branch
BranchTrueFalseTotal
if (len <= 0) return 0; 15 289 304
966 289 ▶ if (len == 1) return unaligned_load<uint8_t>(data);
Branch: 1 branch
BranchTrueFalseTotal
if (len == 1) return unaligned_load<uint8_t>(data); 27 262 289
967 262 ▶ if (len == 2) return unaligned_load<uint16_t>(data);
Branch: 1 branch
BranchTrueFalseTotal
if (len == 2) return unaligned_load<uint16_t>(data); 141 121 262
968  
969 121 uint32_t hash = 2166136261U;
970 696 ▶ while (len--)
Branch: 1 branch
BranchTrueFalseTotal
while (len--) 575 121 696
971 575 hash = (hash ^ unsigned((signed char)*data++)) * 16777619U;
972 121 return hash & mask;
973 }
974  
975 inline void save(binary_encoder& enc);
976  
977 unsigned mask;
978 vector<uint32_t> hash;
979 vector<unsigned char> data;
980 };
981  
982 template <class EntrySize>
983 0 const unsigned char* persistent_unordered_map::at(const char* str, int len, EntrySize entry_size) const {
984 0 ▶ if (unsigned(len) >= hashes.size()) return nullptr;
Branch: 11 branches
BranchTrueFalseTotal
if (unsigned(len) >= hashes.size()) return nullptr; 0 36 36
if (unsigned(len) >= hashes.size()) return nullptr; 0 0 0
if (unsigned(len) >= hashes.size()) return nullptr; 0 0 0
if (unsigned(len) >= hashes.size()) return nullptr; 0 0 0
if (unsigned(len) >= hashes.size()) return nullptr; 0 0 0
if (unsigned(len) >= hashes.size()) return nullptr; 0 0 0
if (unsigned(len) >= hashes.size()) return nullptr; 0 0 0
if (unsigned(len) >= hashes.size()) return nullptr; 0 0 0
if (unsigned(len) >= hashes.size()) return nullptr; 0 0 0
if (unsigned(len) >= hashes.size()) return nullptr; 0 0 0
if (unsigned(len) >= hashes.size()) return nullptr; 0 0 0
985  
986 0 ▶ unsigned index = hashes[len].index(str, len);
Branch: 11 branches
BranchTrueFalseTotal
unsigned index = hashes[len].index(str, len); 36 0 36
unsigned index = hashes[len].index(str, len); 0 0 0
unsigned index = hashes[len].index(str, len); 0 0 0
unsigned index = hashes[len].index(str, len); 0 0 0
unsigned index = hashes[len].index(str, len); 0 0 0
unsigned index = hashes[len].index(str, len); 0 0 0
unsigned index = hashes[len].index(str, len); 0 0 0
unsigned index = hashes[len].index(str, len); 0 0 0
unsigned index = hashes[len].index(str, len); 0 0 0
unsigned index = hashes[len].index(str, len); 0 0 0
unsigned index = hashes[len].index(str, len); 0 0 0
987 0 const unsigned char* data = hashes[len].data.data() + hashes[len].hash[index];
988 0 const unsigned char* end = hashes[len].data.data() + hashes[len].hash[index+1];
989  
990 0 ▶ if (len <= 2)
Branch: 11 branches
BranchTrueFalseTotal
if (len <= 2) 36 0 36
if (len <= 2) 0 0 0
if (len <= 2) 0 0 0
if (len <= 2) 0 0 0
if (len <= 2) 0 0 0
if (len <= 2) 0 0 0
if (len <= 2) 0 0 0
if (len <= 2) 0 0 0
if (len <= 2) 0 0 0
if (len <= 2) 0 0 0
if (len <= 2) 0 0 0
991 0 ▶ return data != end ? data + len : nullptr;
Branch: 11 branches
BranchTrueFalseTotal
return data != end ? data + len : nullptr; 21 15 36
return data != end ? data + len : nullptr; 0 0 0
return data != end ? data + len : nullptr; 0 0 0
return data != end ? data + len : nullptr; 0 0 0
return data != end ? data + len : nullptr; 0 0 0
return data != end ? data + len : nullptr; 0 0 0
return data != end ? data + len : nullptr; 0 0 0
return data != end ? data + len : nullptr; 0 0 0
return data != end ? data + len : nullptr; 0 0 0
return data != end ? data + len : nullptr; 0 0 0
return data != end ? data + len : nullptr; 0 0 0
992  
993 0 ▶ while (data < end) {
Branch: 11 branches
BranchTrueFalseTotal
while (data < end) { 0 0 0
while (data < end) { 0 0 0
while (data < end) { 0 0 0
while (data < end) { 0 0 0
while (data < end) { 0 0 0
while (data < end) { 0 0 0
while (data < end) { 0 0 0
while (data < end) { 0 0 0
while (data < end) { 0 0 0
while (data < end) { 0 0 0
while (data < end) { 0 0 0
994 0 ▶ if (small_memeq(str, data, len)) return data + len;
Branch: 11 branches
BranchTrueFalseTotal
if (small_memeq(str, data, len)) return data + len; 0 0 0
if (small_memeq(str, data, len)) return data + len; 0 0 0
if (small_memeq(str, data, len)) return data + len; 0 0 0
if (small_memeq(str, data, len)) return data + len; 0 0 0
if (small_memeq(str, data, len)) return data + len; 0 0 0
if (small_memeq(str, data, len)) return data + len; 0 0 0
if (small_memeq(str, data, len)) return data + len; 0 0 0
if (small_memeq(str, data, len)) return data + len; 0 0 0
if (small_memeq(str, data, len)) return data + len; 0 0 0
if (small_memeq(str, data, len)) return data + len; 0 0 0
if (small_memeq(str, data, len)) return data + len; 0 0 0
995 0 data += len;
996 0 pointer_decoder decoder(data);
997 0 ▶ entry_size(decoder);
Branch: 10 branches
BranchTrueFalseTotal
entry_size(decoder); 0 0 0
entry_size(decoder); 0 0 0
entry_size(decoder); 0 0 0
entry_size(decoder); 0 0 0
entry_size(decoder); 0 0 0
entry_size(decoder); 0 0 0
entry_size(decoder); 0 0 0
entry_size(decoder); 0 0 0
entry_size(decoder); 0 0 0
entry_size(decoder); 0 0 0
998 }
999  
1000 0 return nullptr;
1001 }
1002  
1003 template <class T>
1004 278 const T* persistent_unordered_map::at_typed(const char* str, int len) const {
1005 278 ▶ if (unsigned(len) >= hashes.size()) return nullptr;
Branch: 2 branches
BranchTrueFalseTotal
if (unsigned(len) >= hashes.size()) return nullptr; 0 158 158
if (unsigned(len) >= hashes.size()) return nullptr; 71 49 120
1006  
1007 207 unsigned index = hashes[len].index(str, len);
1008 207 const unsigned char* data = hashes[len].data.data() + hashes[len].hash[index];
1009 207 const unsigned char* end = hashes[len].data.data() + hashes[len].hash[index+1];
1010  
1011 207 ▶ if (len <= 2)
Branch: 2 branches
BranchTrueFalseTotal
if (len <= 2) 128 30 158
if (len <= 2) 15 34 49
1012 143 ▶ return data != end ? (const T*)(data + len) : nullptr;
Branch: 2 branches
BranchTrueFalseTotal
return data != end ? (const T*)(data + len) : nullptr; 88 40 128
return data != end ? (const T*)(data + len) : nullptr; 15 0 15
1013  
1014 87 ▶ while (data < end) {
Branch: 2 branches
BranchTrueFalseTotal
while (data < end) { 26 18 44
while (data < end) { 39 4 43
1015 65 ▶ if (small_memeq(str, data, len)) return (const T*)(data + len);
Branch: 2 branches
BranchTrueFalseTotal
if (small_memeq(str, data, len)) return (const T*)(data + len); 12 14 26
if (small_memeq(str, data, len)) return (const T*)(data + len); 30 9 39
1016 23 data += len + sizeof(T);
1017 }
1018  
1019 22 return nullptr;
1020 }
1021  
1022 template <class EntryProcess>
1023 0 void persistent_unordered_map::iter(const char* str, int len, EntryProcess entry_process) const {
1024 0 ▶ if (unsigned(len) >= hashes.size()) return;
Branch: 6 branches
BranchTrueFalseTotal
if (unsigned(len) >= hashes.size()) return; 0 4 4
if (unsigned(len) >= hashes.size()) return; 0 21 21
if (unsigned(len) >= hashes.size()) return; 0 0 0
if (unsigned(len) >= hashes.size()) return; 0 0 0
if (unsigned(len) >= hashes.size()) return; 0 0 0
if (unsigned(len) >= hashes.size()) return; 0 0 0
1025  
1026 0 ▶ unsigned index = hashes[len].index(str, len);
Branch: 6 branches
BranchTrueFalseTotal
unsigned index = hashes[len].index(str, len); 4 0 4
unsigned index = hashes[len].index(str, len); 21 0 21
unsigned index = hashes[len].index(str, len); 0 0 0
unsigned index = hashes[len].index(str, len); 0 0 0
unsigned index = hashes[len].index(str, len); 0 0 0
unsigned index = hashes[len].index(str, len); 0 0 0
1027 0 const unsigned char* data = hashes[len].data.data() + hashes[len].hash[index];
1028 0 const unsigned char* end = hashes[len].data.data() + hashes[len].hash[index+1];
1029  
1030 0 ▶ while (data < end) {
Branch: 6 branches
BranchTrueFalseTotal
while (data < end) { 4 4 8
while (data < end) { 20 21 41
while (data < end) { 0 0 0
while (data < end) { 0 0 0
while (data < end) { 0 0 0
while (data < end) { 0 0 0
1031 0 auto start = (const char*) data;
1032 0 data += len;
1033 0 pointer_decoder decoder(data);
1034 0 ▶ entry_process(start, decoder);
Branch: 6 branches
BranchTrueFalseTotal
entry_process(start, decoder); 4 0 4
entry_process(start, decoder); 20 0 20
entry_process(start, decoder); 0 0 0
entry_process(start, decoder); 0 0 0
entry_process(start, decoder); 0 0 0
entry_process(start, decoder); 0 0 0
1035 }
1036 }
1037  
1038 template <class EntryProcess>
1039 0 void persistent_unordered_map::iter_all(EntryProcess entry_process) const {
1040 0 ▶ for (unsigned len = 0; len < hashes.size(); len++) {
Branch: 3 branches
BranchTrueFalseTotal
for (unsigned len = 0; len < hashes.size(); len++) { 6 2 8
for (unsigned len = 0; len < hashes.size(); len++) { 0 0 0
for (unsigned len = 0; len < hashes.size(); len++) { 0 0 0
1041 0 const unsigned char* data = hashes[len].data.data();
1042 0 const unsigned char* end = data + hashes[len].data.size();
1043  
1044 0 ▶ while (data < end) {
Branch: 3 branches
BranchTrueFalseTotal
while (data < end) { 26 6 32
while (data < end) { 0 0 0
while (data < end) { 0 0 0
1045 0 auto start = (const char*) data;
1046 0 data += len;
1047 0 pointer_decoder decoder(data);
1048 0 ▶ entry_process(start, len, decoder);
Branch: 3 branches
BranchTrueFalseTotal
entry_process(start, len, decoder); 26 0 26
entry_process(start, len, decoder); 0 0 0
entry_process(start, len, decoder); 0 0 0
1049 }
1050 }
1051 0 }
1052  
1053 44 int persistent_unordered_map::max_length() const {
1054 44 return hashes.size();
1055 }
1056  
1057 38 const unsigned char* persistent_unordered_map::data_start(int len) const {
1058 38 ▶ return unsigned(len) < hashes.size() ? hashes[len].data.data() : nullptr;
Branch: 1 branch
BranchTrueFalseTotal
return unsigned(len) < hashes.size() ? hashes[len].data.data() : nullptr; 38 0 38
1059 }
1060  
1061 32 void persistent_unordered_map::resize(unsigned elems) {
1062 32 ▶ if (hashes.size() == 0) hashes.emplace_back(1);
Branch: 2 branches
BranchTrueFalseTotal
if (hashes.size() == 0) hashes.emplace_back(1); 4 28 32
if (hashes.size() == 0) hashes.emplace_back(1); 4 0 4
1063 28 ▶ else if (hashes.size() == 1) hashes.emplace_back(1<<8);
Branch: 2 branches
BranchTrueFalseTotal
else if (hashes.size() == 1) hashes.emplace_back(1<<8); 4 24 28
else if (hashes.size() == 1) hashes.emplace_back(1<<8); 4 0 4
1064 24 ▶ else if (hashes.size() == 2) hashes.emplace_back(1<<16);
Branch: 2 branches
BranchTrueFalseTotal
else if (hashes.size() == 2) hashes.emplace_back(1<<16); 4 20 24
else if (hashes.size() == 2) hashes.emplace_back(1<<16); 4 0 4
1065 20 else hashes.emplace_back(elems);
1066 32 }
1067  
1068 18 void persistent_unordered_map::add(const char* str, int str_len, int data_len) {
1069 18 ▶ if (unsigned(str_len) < hashes.size())
Branch: 1 branch
BranchTrueFalseTotal
if (unsigned(str_len) < hashes.size()) 18 0 18
1070 18 hashes[str_len].hash[hashes[str_len].index(str, str_len)] += str_len + data_len;
1071 18 }
1072  
1073 4 void persistent_unordered_map::done_adding() {
1074 36 ▶ for (auto&& hash : hashes) {
Branch: 1 branch
BranchTrueFalseTotal
for (auto&& hash : hashes) { 32 4 36
1075 32 int total = 0;
1076 263264 ▶ for (auto&& len : hash.hash) total += len, len = total - len;
Branch: 1 branch
BranchTrueFalseTotal
for (auto&& len : hash.hash) total += len, len = total - len; 263232 32 263264
1077 32 ▶ hash.data.resize(total);
Branch: 1 branch
BranchTrueFalseTotal
hash.data.resize(total); 32 0 32
1078 }
1079 4 }
1080  
1081 18 unsigned char* persistent_unordered_map::fill(const char* str, int str_len, int data_len) {
1082 18 ▶ if (unsigned(str_len) < hashes.size()) {
Branch: 1 branch
BranchTrueFalseTotal
if (unsigned(str_len) < hashes.size()) { 18 0 18
1083 18 unsigned index = hashes[str_len].index(str, str_len);
1084 18 unsigned offset = hashes[str_len].hash[index];
1085 18 small_memcpy(hashes[str_len].data.data() + offset, str, str_len);
1086 18 hashes[str_len].hash[index] += str_len + data_len;
1087 18 return hashes[str_len].data.data() + offset + str_len;
1088 }
1089 0 return nullptr;
1090 }
1091  
1092 4 void persistent_unordered_map::done_filling() {
1093 36 ▶ for (auto&& hash : hashes)
Branch: 1 branch
BranchTrueFalseTotal
for (auto&& hash : hashes) 32 4 36
1094 263264 ▶ for (int i = hash.hash.size() - 1; i >= 0; i--)
Branch: 1 branch
BranchTrueFalseTotal
for (int i = hash.hash.size() - 1; i >= 0; i--) 263232 32 263264
1095 263232 ▶ hash.hash[i] = i > 0 ? hash.hash[i-1] : 0;
Branch: 1 branch
BranchTrueFalseTotal
hash.hash[i] = i > 0 ? hash.hash[i-1] : 0; 263200 32 263232
1096 4 }
1097  
1098 49 void persistent_unordered_map::load(binary_decoder& data) {
1099 49 unsigned sizes = data.next_1B();
1100  
1101 49 hashes.clear();
1102 189 ▶ for (unsigned i = 0; i < sizes; i++)
Branch: 1 branch
BranchTrueFalseTotal
for (unsigned i = 0; i < sizes; i++) 140 49 189
1103 140 hashes.emplace_back(data);
1104 49 }
1105  
1106 /////////
1107 // File: derivator/derivator_dictionary.h
1108 /////////
1109  
1110 // This file is part of MorphoDiTa <http://github.com/ufal/morphodita/>.
1111 //
1112 // Copyright 2016 Institute of Formal and Applied Linguistics, Faculty of
1113 // Mathematics and Physics, Charles University in Prague, Czech Republic.
1114 //
1115 // This Source Code Form is subject to the terms of the Mozilla Public
1116 // License, v. 2.0. If a copy of the MPL was not distributed with this
1117 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
1118  
1119 class derivator_dictionary : public derivator {
1120 public:
1121 virtual bool parent(string_piece lemma, derivated_lemma& parent) const override;
1122 virtual bool children(string_piece lemma, vector<derivated_lemma>& children) const override;
1123  
1124 bool load(istream& is);
1125  
1126 private:
1127 friend class morpho;
1128 const morpho* dictionary;
1129 persistent_unordered_map derinet;
1130 };
1131  
1132 /////////
1133 // File: utils/compressor.h
1134 /////////
1135  
1136 // This file is part of UFAL C++ Utils <http://github.com/ufal/cpp_utils/>.
1137 //
1138 // Copyright 2015 Institute of Formal and Applied Linguistics, Faculty of
1139 // Mathematics and Physics, Charles University in Prague, Czech Republic.
1140 //
1141 // This Source Code Form is subject to the terms of the Mozilla Public
1142 // License, v. 2.0. If a copy of the MPL was not distributed with this
1143 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
1144  
1145 namespace utils {
1146  
1147 class binary_decoder;
1148 class binary_encoder;
1149  
1150 class compressor {
1151 public:
1152 static bool load(istream& is, binary_decoder& data);
1153 static bool save(ostream& os, const binary_encoder& enc);
1154 };
1155  
1156 } // namespace utils
1157  
1158 /////////
1159 // File: derivator/derivator_dictionary.cpp
1160 /////////
1161  
1162 // This file is part of MorphoDiTa <http://github.com/ufal/morphodita/>.
1163 //
1164 // Copyright 2016 Institute of Formal and Applied Linguistics, Faculty of
1165 // Mathematics and Physics, Charles University in Prague, Czech Republic.
1166 //
1167 // This Source Code Form is subject to the terms of the Mozilla Public
1168 // License, v. 2.0. If a copy of the MPL was not distributed with this
1169 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
1170  
1171 0 bool derivator_dictionary::parent(string_piece lemma, derivated_lemma& parent) const {
1172 0 ▶ if (dictionary) lemma.len = dictionary->lemma_id_len(lemma);
Branch: 1 branch
BranchTrueFalseTotal
if (dictionary) lemma.len = dictionary->lemma_id_len(lemma); 0 0 0
1173  
1174 0 auto lemma_data = derinet.at(lemma.str, lemma.len, [](pointer_decoder& data) {
1175 0 data.next<char>(data.next_1B());
1176 0 data.next_4B();
1177 0 data.next<uint32_t>(data.next_2B());
1178 0 });
1179 0 ▶ if (lemma_data) {
Branch: 1 branch
BranchTrueFalseTotal
if (lemma_data) { 0 0 0
1180 0 auto parent_encoded = *(uint32_t*)(lemma_data + 1 + *lemma_data);
1181 0 ▶ if (parent_encoded) {
Branch: 1 branch
BranchTrueFalseTotal
if (parent_encoded) { 0 0 0
1182 0 unsigned parent_len = parent_encoded & 0xFF;
1183 0 auto parent_data = derinet.data_start(parent_len) + (parent_encoded >> 8);
1184 0 parent.lemma.assign((const char*) parent_data, parent_len);
1185 0 ▶ if (parent_data[parent_len])
Branch: 1 branch
BranchTrueFalseTotal
if (parent_data[parent_len]) 0 0 0
1186 0 parent.lemma.append((const char*) parent_data + parent_len + 1, parent_data[parent_len]);
1187 0 return true;
1188 }
1189 }
1190 0 parent.lemma.clear();
1191 0 return false;
1192 }
1193  
1194 0 bool derivator_dictionary::children(string_piece lemma, vector<derivated_lemma>& children) const {
1195 0 ▶ if (dictionary) lemma.len = dictionary->lemma_id_len(lemma);
Branch: 1 branch
BranchTrueFalseTotal
if (dictionary) lemma.len = dictionary->lemma_id_len(lemma); 0 0 0
1196  
1197 0 auto lemma_data = derinet.at(lemma.str, lemma.len, [](pointer_decoder& data) {
1198 0 data.next<char>(data.next_1B());
1199 0 data.next_4B();
1200 0 data.next<uint32_t>(data.next_2B());
1201 0 });
1202 0 ▶ if (lemma_data) {
Branch: 1 branch
BranchTrueFalseTotal
if (lemma_data) { 0 0 0
1203 0 auto children_len = *(uint16_t*)(lemma_data + 1 + *lemma_data + 4);
1204 0 auto children_encoded = (uint32_t*)(lemma_data + 1 + *lemma_data + 4 + 2);
1205 0 ▶ if (children_len) {
Branch: 1 branch
BranchTrueFalseTotal
if (children_len) { 0 0 0
1206 0 children.resize(children_len);
1207 0 ▶ for (unsigned i = 0; i < children_len; i++) {
Branch: 1 branch
BranchTrueFalseTotal
for (unsigned i = 0; i < children_len; i++) { 0 0 0
1208 0 unsigned child_len = children_encoded[i] & 0xFF;
1209 0 auto child_data = derinet.data_start(child_len) + (children_encoded[i] >> 8);
1210 0 children[i].lemma.assign((const char*) child_data, child_len);
1211 0 ▶ if (child_data[child_len])
Branch: 1 branch
BranchTrueFalseTotal
if (child_data[child_len]) 0 0 0
1212 0 children[i].lemma.append((const char*) child_data + child_len + 1, child_data[child_len]);
1213 }
1214 0 return true;
1215 }
1216 }
1217 0 children.clear();
1218 0 return false;
1219 }
1220  
1221 0 bool derivator_dictionary::load(istream& is) {
1222 0 binary_decoder data;
1223 0 ▶ if (!compressor::load(is, data)) return false;
Branch: 2 branches
BranchTrueFalseTotal
if (!compressor::load(is, data)) return false; 0 0 0
if (!compressor::load(is, data)) return false; 0 0 0
1224  
1225 try {
1226 0 ▶ for (int i = data.next_1B(); i > 0; i--)
Branch: 2 branches
BranchTrueFalseTotal
for (int i = data.next_1B(); i > 0; i--) 0 0 0
for (int i = data.next_1B(); i > 0; i--) 0 0 0
1227 0 ▶ derinet.resize(data.next_4B());
Branch: 2 branches
BranchTrueFalseTotal
derinet.resize(data.next_4B()); 0 0 0
derinet.resize(data.next_4B()); 0 0 0
1228  
1229 0 unsigned data_position = data.tell();
1230 0 vector<char> lemma, parent;
1231 0 ▶ for (int pass = 1; pass <= 3; pass++) {
Branch: 1 branch
BranchTrueFalseTotal
for (int pass = 1; pass <= 3; pass++) { 0 0 0
1232 0 ▶ if (pass > 1) data.seek(data_position);
Branch: 2 branches
BranchTrueFalseTotal
if (pass > 1) data.seek(data_position); 0 0 0
if (pass > 1) data.seek(data_position); 0 0 0
1233  
1234 0 lemma.clear();
1235 0 ▶ for (int i = data.next_4B(); i > 0; i--) {
Branch: 2 branches
BranchTrueFalseTotal
for (int i = data.next_4B(); i > 0; i--) { 0 0 0
for (int i = data.next_4B(); i > 0; i--) { 0 0 0
1236 0 ▶ lemma.resize(lemma.size() - data.next_1B());
Branch: 2 branches
BranchTrueFalseTotal
lemma.resize(lemma.size() - data.next_1B()); 0 0 0
lemma.resize(lemma.size() - data.next_1B()); 0 0 0
1237 0 ▶ for (int i = data.next_1B(); i > 0; i--)
Branch: 2 branches
BranchTrueFalseTotal
for (int i = data.next_1B(); i > 0; i--) 0 0 0
for (int i = data.next_1B(); i > 0; i--) 0 0 0
1238 0 ▶ lemma.push_back(data.next_1B());
Branch: 2 branches
BranchTrueFalseTotal
lemma.push_back(data.next_1B()); 0 0 0
lemma.push_back(data.next_1B()); 0 0 0
1239  
1240 0 ▶ unsigned char lemma_comment_len = data.next_1B();
Branch: 1 branch
BranchTrueFalseTotal
unsigned char lemma_comment_len = data.next_1B(); 0 0 0
1241 0 ▶ const char* lemma_comment = lemma_comment_len ? data.next<char>(lemma_comment_len) : nullptr;
Branch: 2 branches
BranchTrueFalseTotal
const char* lemma_comment = lemma_comment_len ? data.next<char>(lemma_comment_len) : nullptr; 0 0 0
const char* lemma_comment = lemma_comment_len ? data.next<char>(lemma_comment_len) : nullptr; 0 0 0
1242  
1243 0 ▶ unsigned children = data.next_2B();
Branch: 1 branch
BranchTrueFalseTotal
unsigned children = data.next_2B(); 0 0 0
1244  
1245 0 ▶ if (pass == 3) parent.clear();
Branch: 1 branch
BranchTrueFalseTotal
if (pass == 3) parent.clear(); 0 0 0
1246 enum { REMOVE_START = 1, REMOVE_END = 2, ADD_START = 4, ADD_END = 8 };
1247 0 ▶ int operations = data.next_1B();
Branch: 1 branch
BranchTrueFalseTotal
int operations = data.next_1B(); 0 0 0
1248 0 ▶ if (operations) {
Branch: 1 branch
BranchTrueFalseTotal
if (operations) { 0 0 0
1249 0 ▶ int remove_start = operations & REMOVE_START ? data.next_1B() : 0;
Branch: 2 branches
BranchTrueFalseTotal
int remove_start = operations & REMOVE_START ? data.next_1B() : 0; 0 0 0
int remove_start = operations & REMOVE_START ? data.next_1B() : 0; 0 0 0
1250 0 ▶ int remove_end = operations & REMOVE_END ? data.next_1B() : 0;
Branch: 2 branches
BranchTrueFalseTotal
int remove_end = operations & REMOVE_END ? data.next_1B() : 0; 0 0 0
int remove_end = operations & REMOVE_END ? data.next_1B() : 0; 0 0 0
1251 0 ▶ if (operations & ADD_START) {
Branch: 1 branch
BranchTrueFalseTotal
if (operations & ADD_START) { 0 0 0
1252 0 ▶ int add_start = data.next_1B();
Branch: 1 branch
BranchTrueFalseTotal
int add_start = data.next_1B(); 0 0 0
1253 0 ▶ const char* str = data.next<char>(add_start);
Branch: 1 branch
BranchTrueFalseTotal
const char* str = data.next<char>(add_start); 0 0 0
1254 0 ▶ if (pass == 3) parent.assign(str, str + add_start);
Branch: 2 branches
BranchTrueFalseTotal
if (pass == 3) parent.assign(str, str + add_start); 0 0 0
if (pass == 3) parent.assign(str, str + add_start); 0 0 0
1255 }
1256 0 ▶ if (pass == 3) parent.insert(parent.end(), lemma.begin() + remove_start, lemma.end() - remove_end);
Branch: 2 branches
BranchTrueFalseTotal
if (pass == 3) parent.insert(parent.end(), lemma.begin() + remove_start, lemma.end() - remove_end); 0 0 0
if (pass == 3) parent.insert(parent.end(), lemma.begin() + remove_start, lemma.end() - remove_end); 0 0 0
1257 0 ▶ if (operations & ADD_END) {
Branch: 1 branch
BranchTrueFalseTotal
if (operations & ADD_END) { 0 0 0
1258 0 ▶ int add_end = data.next_1B();
Branch: 1 branch
BranchTrueFalseTotal
int add_end = data.next_1B(); 0 0 0
1259 0 ▶ const char* str = data.next<char>(add_end);
Branch: 1 branch
BranchTrueFalseTotal
const char* str = data.next<char>(add_end); 0 0 0
1260 0 ▶ if (pass == 3) parent.insert(parent.end(), str, str + add_end);
Branch: 2 branches
BranchTrueFalseTotal
if (pass == 3) parent.insert(parent.end(), str, str + add_end); 0 0 0
if (pass == 3) parent.insert(parent.end(), str, str + add_end); 0 0 0
1261 }
1262 }
1263  
1264 0 ▶ if (pass == 1) {
Branch: 1 branch
BranchTrueFalseTotal
if (pass == 1) { 0 0 0
1265 0 ▶ derinet.add(lemma.data(), lemma.size(), 1 + lemma_comment_len + 4 + 2 + 4 * children);
Branch: 1 branch
BranchTrueFalseTotal
derinet.add(lemma.data(), lemma.size(), 1 + lemma_comment_len + 4 + 2 + 4 * children); 0 0 0
1266 0 ▶ } else if (pass == 2) {
Branch: 1 branch
BranchTrueFalseTotal
} else if (pass == 2) { 0 0 0
1267 0 ▶ unsigned char* lemma_data = derinet.fill(lemma.data(), lemma.size(), 1 + lemma_comment_len + 4 + 2 + 4 * children);
Branch: 1 branch
BranchTrueFalseTotal
unsigned char* lemma_data = derinet.fill(lemma.data(), lemma.size(), 1 + lemma_comment_len + 4 + 2 + 4 * children); 0 0 0
1268 0 *lemma_data++ = lemma_comment_len;
1269 0 ▶ while (lemma_comment_len--) *lemma_data++ = *lemma_comment++;
Branch: 1 branch
BranchTrueFalseTotal
while (lemma_comment_len--) *lemma_data++ = *lemma_comment++; 0 0 0
1270 0 unaligned_store_inc<uint32_t>(lemma_data, 0);
1271 0 unaligned_store_inc<uint16_t>(lemma_data, children);
1272 0 ▶ if (children) unaligned_store<uint32_t>(((uint32_t*)lemma_data) + children - 1, 0);
Branch: 1 branch
BranchTrueFalseTotal
if (children) unaligned_store<uint32_t>(((uint32_t*)lemma_data) + children - 1, 0); 0 0 0
1273 0 ▶ } else if (pass == 3 && !parent.empty()) {
Branch: 3 branches
BranchTrueFalseTotal
} else if (pass == 3 && !parent.empty()) { 0 0 0
} else if (pass == 3 && !parent.empty()) { 0 0 0
} else if (pass == 3 && !parent.empty()) { 0 0 0
1274 0 ▶ auto lemma_data = derinet.at(lemma.data(), lemma.size(), [](pointer_decoder& data) {
Branch: 1 branch
BranchTrueFalseTotal
auto lemma_data = derinet.at(lemma.data(), lemma.size(), [](pointer_decoder& data) { 0 0 0
1275 0 data.next<char>(data.next_1B());
1276 0 data.next_4B();
1277 0 data.next<uint32_t>(data.next_2B());
1278 0 });
1279 0 ▶ auto parent_data = derinet.at(parent.data(), parent.size(), [](pointer_decoder& data) {
Branch: 1 branch
BranchTrueFalseTotal
auto parent_data = derinet.at(parent.data(), parent.size(), [](pointer_decoder& data) { 0 0 0
1280 0 data.next<char>(data.next_1B());
1281 0 data.next_4B();
1282 0 data.next<uint32_t>(data.next_2B());
1283 0 });
1284 0 ▶ assert(lemma_data && parent_data);
Branch: 2 branches
BranchTrueFalseTotal
assert(lemma_data && parent_data); 0 0 0
assert(lemma_data && parent_data); 0 0 0
1285  
1286 0 unsigned parent_offset = parent_data - parent.size() - derinet.data_start(parent.size());
1287 0 ▶ assert(parent.size() < (1<<8) && parent_offset < (1<<24));
Branch: 2 branches
BranchTrueFalseTotal
assert(parent.size() < (1<<8) && parent_offset < (1<<24)); 0 0 0
assert(parent.size() < (1<<8) && parent_offset < (1<<24)); 0 0 0
1288 0 unaligned_store<uint32_t>((void *)(lemma_data + 1 + *lemma_data), (parent_offset << 8) | parent.size());
1289  
1290 0 unsigned lemma_offset = lemma_data - lemma.size() - derinet.data_start(lemma.size());
1291 0 ▶ assert(lemma.size() < (1<<8) && lemma_offset < (1<<24));
Branch: 2 branches
BranchTrueFalseTotal
assert(lemma.size() < (1<<8) && lemma_offset < (1<<24)); 0 0 0
assert(lemma.size() < (1<<8) && lemma_offset < (1<<24)); 0 0 0
1292 0 auto children_len = unaligned_load<uint16_t>(parent_data + 1 + *parent_data + 4);
1293 0 auto children = (uint32_t*)(parent_data + 1 + *parent_data + 4 + 2);
1294 0 auto child_index = unaligned_load<uint32_t>(children + children_len - 1);
1295 0 unaligned_store<uint32_t>(children + child_index, (lemma_offset << 8) | lemma.size());
1296 0 ▶ if (child_index+1 < children_len)
Branch: 1 branch
BranchTrueFalseTotal
if (child_index+1 < children_len) 0 0 0
1297 0 unaligned_store<uint32_t>(children + children_len - 1, unaligned_load<uint32_t>(children + children_len - 1) + 1);
1298 }
1299 }
1300  
1301 0 ▶ if (pass == 1)
Branch: 1 branch
BranchTrueFalseTotal
if (pass == 1) 0 0 0
1302 0 ▶ derinet.done_adding();
Branch: 1 branch
BranchTrueFalseTotal
derinet.done_adding(); 0 0 0
1303 0 ▶ if (pass == 2)
Branch: 1 branch
BranchTrueFalseTotal
if (pass == 2) 0 0 0
1304 0 derinet.done_filling();
1305 }
1306 0 ▶ } catch (binary_decoder_error&) {
Branch: 1 branch
BranchTrueFalseTotal
} catch (binary_decoder_error&) { 0 0 0
1307 return false;
1308 }
1309 0 return true;
1310 0 }
1311  
1312 /////////
1313 // File: unilib/unicode.h
1314 /////////
1315  
1316 // This file is part of UniLib <http://github.com/ufal/unilib/>.
1317 //
1318 // Copyright 2014 Institute of Formal and Applied Linguistics, Faculty of
1319 // Mathematics and Physics, Charles University in Prague, Czech Republic.
1320 //
1321 // This Source Code Form is subject to the terms of the Mozilla Public
1322 // License, v. 2.0. If a copy of the MPL was not distributed with this
1323 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
1324 //
1325 // UniLib version: 3.3.1
1326 // Unicode version: 15.0.0
1327  
1328 namespace unilib {
1329  
1330 class unicode {
1331 enum : uint8_t {
1332 _Lu = 1, _Ll = 2, _Lt = 3, _Lm = 4, _Lo = 5,
1333 _Mn = 6, _Mc = 7, _Me = 8,
1334 _Nd = 9, _Nl = 10, _No = 11,
1335 _Pc = 12, _Pd = 13, _Ps = 14, _Pe = 15, _Pi = 16, _Pf = 17, _Po = 18,
1336 _Sm = 19, _Sc = 20, _Sk = 21, _So = 22,
1337 _Zs = 23, _Zl = 24, _Zp = 25,
1338 _Cc = 26, _Cf = 27, _Cs = 28, _Co = 29, _Cn = 30
1339 };
1340  
1341 public:
1342 typedef uint32_t category_t;
1343 enum : category_t {
1344 Lu = 1 << _Lu, Ll = 1 << _Ll, Lt = 1 << _Lt, Lut = Lu | Lt, LC = Lu | Ll | Lt,
1345 Lm = 1 << _Lm, Lo = 1 << _Lo, L = Lu | Ll | Lt | Lm | Lo,
1346 Mn = 1 << _Mn, Mc = 1 << _Mc, Me = 1 << _Me, M = Mn | Mc | Me,
1347 Nd = 1 << _Nd, Nl = 1 << _Nl, No = 1 << _No, N = Nd | Nl | No,
1348 Pc = 1 << _Pc, Pd = 1 << _Pd, Ps = 1 << _Ps, Pe = 1 << _Pe, Pi = 1 << _Pi,
1349 Pf = 1 << _Pf, Po = 1 << _Po, P = Pc | Pd | Ps | Pe | Pi | Pf | Po,
1350 Sm = 1 << _Sm, Sc = 1 << _Sc, Sk = 1 << _Sk, So = 1 << _So, S = Sm | Sc | Sk | So,
1351 Zs = 1 << _Zs, Zl = 1 << _Zl, Zp = 1 << _Zp, Z = Zs | Zl | Zp,
1352 Cc = 1 << _Cc, Cf = 1 << _Cf, Cs = 1 << _Cs, Co = 1 << _Co, Cn = 1 << _Cn, C = Cc | Cf | Cs | Co | Cn
1353 };
1354  
1355 static inline category_t category(char32_t chr);
1356  
1357 static inline char32_t lowercase(char32_t chr);
1358 static inline char32_t uppercase(char32_t chr);
1359 static inline char32_t titlecase(char32_t chr);
1360  
1361 private:
1362 static const char32_t CHARS = 0x110000;
1363 static const int32_t DEFAULT_CAT = Cn;
1364  
1365 static const uint8_t category_index[CHARS >> 8];
1366 static const uint8_t category_block[][256];
1367 static const uint8_t othercase_index[CHARS >> 8];
1368 static const char32_t othercase_block[][256];
1369  
1370 enum othercase_type { LOWER_ONLY = 1, UPPERTITLE_ONLY = 2, UPPER_ONLY = 3, LOWER_THEN_UPPER = 4, UPPER_THEN_TITLE = 5, TITLE_THEN_LOWER = 6 };
1371 };
1372  
1373 228 unicode::category_t unicode::category(char32_t chr) {
1374 228 ▶ return chr < CHARS ? 1 << category_block[category_index[chr >> 8]][chr & 0xFF] : DEFAULT_CAT;
Branch: 1 branch
BranchTrueFalseTotal
return chr < CHARS ? 1 << category_block[category_index[chr >> 8]][chr & 0xFF] : DEFAULT_CAT; 228 0 228
1375 }
1376  
1377 13 char32_t unicode::lowercase(char32_t chr) {
1378 13 ▶ if (chr < CHARS) {
Branch: 1 branch
BranchTrueFalseTotal
if (chr < CHARS) { 13 0 13
1379 13 char32_t othercase = othercase_block[othercase_index[chr >> 8]][chr & 0xFF];
1380 13 ▶ if ((othercase & 0xFF) == othercase_type::LOWER_ONLY) return othercase >> 8;
Branch: 1 branch
BranchTrueFalseTotal
if ((othercase & 0xFF) == othercase_type::LOWER_ONLY) return othercase >> 8; 3 10 13
1381 10 ▶ if ((othercase & 0xFF) == othercase_type::LOWER_THEN_UPPER) return othercase >> 8;
Branch: 1 branch
BranchTrueFalseTotal
if ((othercase & 0xFF) == othercase_type::LOWER_THEN_UPPER) return othercase >> 8; 0 10 10
1382 10 ▶ if ((othercase & 0xFF) == othercase_type::TITLE_THEN_LOWER) return othercase_block[othercase_index[(othercase >> 8) >> 8]][(othercase >> 8) & 0xFF] >> 8;
Branch: 1 branch
BranchTrueFalseTotal
if ((othercase & 0xFF) == othercase_type::TITLE_THEN_LOWER) return othercase_block[othercase_index[(othercase >> 8) >> 8]][(othercase >> 8) & 0xFF] >> 8; 0 10 10
1383 }
1384 10 return chr;
1385 }
1386  
1387 char32_t unicode::uppercase(char32_t chr) {
1388 if (chr < CHARS) {
1389 char32_t othercase = othercase_block[othercase_index[chr >> 8]][chr & 0xFF];
1390 if ((othercase & 0xFF) == othercase_type::UPPERTITLE_ONLY) return othercase >> 8;
1391 if ((othercase & 0xFF) == othercase_type::UPPER_ONLY) return othercase >> 8;
1392 if ((othercase & 0xFF) == othercase_type::UPPER_THEN_TITLE) return othercase >> 8;
1393 if ((othercase & 0xFF) == othercase_type::LOWER_THEN_UPPER) return othercase_block[othercase_index[(othercase >> 8) >> 8]][(othercase >> 8) & 0xFF] >> 8;
1394 }
1395 return chr;
1396 }
1397  
1398 char32_t unicode::titlecase(char32_t chr) {
1399 if (chr < CHARS) {
1400 char32_t othercase = othercase_block[othercase_index[chr >> 8]][chr & 0xFF];
1401 if ((othercase & 0xFF) == othercase_type::UPPERTITLE_ONLY) return othercase >> 8;
1402 if ((othercase & 0xFF) == othercase_type::TITLE_THEN_LOWER) return othercase >> 8;
1403 if ((othercase & 0xFF) == othercase_type::UPPER_THEN_TITLE) return othercase_block[othercase_index[(othercase >> 8) >> 8]][(othercase >> 8) & 0xFF] >> 8;
1404 }
1405 return chr;
1406 }
1407  
1408 } // namespace unilib
1409  
1410 /////////
1411 // File: unilib/utf8.h
1412 /////////
1413  
1414 // This file is part of UniLib <http://github.com/ufal/unilib/>.
1415 //
1416 // Copyright 2014 Institute of Formal and Applied Linguistics, Faculty of
1417 // Mathematics and Physics, Charles University in Prague, Czech Republic.
1418 //
1419 // This Source Code Form is subject to the terms of the Mozilla Public
1420 // License, v. 2.0. If a copy of the MPL was not distributed with this
1421 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
1422 //
1423 // UniLib version: 3.3.1
1424 // Unicode version: 15.0.0
1425  
1426 namespace unilib {
1427  
1428 class utf8 {
1429 public:
1430 static bool valid(const char* str);
1431 static bool valid(const char* str, size_t len);
1432 static inline bool valid(const std::string& str);
1433  
1434 static inline char32_t decode(const char*& str);
1435 static inline char32_t decode(const char*& str, size_t& len);
1436 static inline char32_t first(const char* str);
1437 static inline char32_t first(const char* str, size_t len);
1438 static inline char32_t first(const std::string& str);
1439  
1440 static void decode(const char* str, std::u32string& decoded);
1441 static void decode(const char* str, size_t len, std::u32string& decoded);
1442 static inline void decode(const std::string& str, std::u32string& decoded);
1443  
1444 class string_decoder {
1445 public:
1446 class iterator;
1447 inline iterator begin();
1448 inline iterator end();
1449 private:
1450 inline string_decoder(const char* str);
1451 const char* str;
1452 friend class utf8;
1453 };
1454 static inline string_decoder decoder(const char* str);
1455 static inline string_decoder decoder(const std::string& str);
1456  
1457 class buffer_decoder {
1458 public:
1459 class iterator;
1460 inline iterator begin();
1461 inline iterator end();
1462 private:
1463 inline buffer_decoder(const char* str, size_t len);
1464 const char* str;
1465 size_t len;
1466 friend class utf8;
1467 };
1468 static inline buffer_decoder decoder(const char* str, size_t len);
1469  
1470 static inline void append(char*& str, char32_t chr);
1471 static inline void append(std::string& str, char32_t chr);
1472 static void encode(const std::u32string& str, std::string& encoded);
1473  
1474 template<class F> static void map(F f, const char* str, std::string& result);
1475 template<class F> static void map(F f, const char* str, size_t len, std::string& result);
1476 template<class F> static void map(F f, const std::string& str, std::string& result);
1477  
1478 private:
1479 static const char REPLACEMENT_CHAR = '?';
1480 };
1481  
1482 bool utf8::valid(const std::string& str) {
1483 return valid(str.c_str());
1484 }
1485  
1486 0 char32_t utf8::decode(const char*& str) {
1487 0 ▶ if (((unsigned char)*str) < 0x80) return (unsigned char)*str++;
Branch: 1 branch
BranchTrueFalseTotal
if (((unsigned char)*str) < 0x80) return (unsigned char)*str++; 0 0 0
1488 0 ▶ else if (((unsigned char)*str) < 0xC0) return ++str, REPLACEMENT_CHAR;
Branch: 1 branch
BranchTrueFalseTotal
else if (((unsigned char)*str) < 0xC0) return ++str, REPLACEMENT_CHAR; 0 0 0
1489 0 ▶ else if (((unsigned char)*str) < 0xE0) {
Branch: 1 branch
BranchTrueFalseTotal
else if (((unsigned char)*str) < 0xE0) { 0 0 0
1490 0 char32_t res = (((unsigned char)*str++) & 0x1F) << 6;
1491 0 ▶ if (((unsigned char)*str) < 0x80 || ((unsigned char)*str) >= 0xC0) return REPLACEMENT_CHAR;
Branch: 2 branches
BranchTrueFalseTotal
if (((unsigned char)*str) < 0x80 || ((unsigned char)*str) >= 0xC0) return REPLACEMENT_CHAR; 0 0 0
if (((unsigned char)*str) < 0x80 || ((unsigned char)*str) >= 0xC0) return REPLACEMENT_CHAR; 0 0 0
1492 0 return res + (((unsigned char)*str++) & 0x3F);
1493 0 ▶ } else if (((unsigned char)*str) < 0xF0) {
Branch: 1 branch
BranchTrueFalseTotal
} else if (((unsigned char)*str) < 0xF0) { 0 0 0
1494 0 char32_t res = (((unsigned char)*str++) & 0x0F) << 12;
1495 0 ▶ if (((unsigned char)*str) < 0x80 || ((unsigned char)*str) >= 0xC0) return REPLACEMENT_CHAR;
Branch: 2 branches
BranchTrueFalseTotal
if (((unsigned char)*str) < 0x80 || ((unsigned char)*str) >= 0xC0) return REPLACEMENT_CHAR; 0 0 0
if (((unsigned char)*str) < 0x80 || ((unsigned char)*str) >= 0xC0) return REPLACEMENT_CHAR; 0 0 0
1496 0 res += (((unsigned char)*str++) & 0x3F) << 6;
1497 0 ▶ if (((unsigned char)*str) < 0x80 || ((unsigned char)*str) >= 0xC0) return REPLACEMENT_CHAR;
Branch: 2 branches
BranchTrueFalseTotal
if (((unsigned char)*str) < 0x80 || ((unsigned char)*str) >= 0xC0) return REPLACEMENT_CHAR; 0 0 0
if (((unsigned char)*str) < 0x80 || ((unsigned char)*str) >= 0xC0) return REPLACEMENT_CHAR; 0 0 0
1498 0 return res + (((unsigned char)*str++) & 0x3F);
1499 0 ▶ } else if (((unsigned char)*str) < 0xF8) {
Branch: 1 branch
BranchTrueFalseTotal
} else if (((unsigned char)*str) < 0xF8) { 0 0 0
1500 0 char32_t res = (((unsigned char)*str++) & 0x07) << 18;
1501 0 ▶ if (((unsigned char)*str) < 0x80 || ((unsigned char)*str) >= 0xC0) return REPLACEMENT_CHAR;
Branch: 2 branches
BranchTrueFalseTotal
if (((unsigned char)*str) < 0x80 || ((unsigned char)*str) >= 0xC0) return REPLACEMENT_CHAR; 0 0 0
if (((unsigned char)*str) < 0x80 || ((unsigned char)*str) >= 0xC0) return REPLACEMENT_CHAR; 0 0 0
1502 0 res += (((unsigned char)*str++) & 0x3F) << 12;
1503 0 ▶ if (((unsigned char)*str) < 0x80 || ((unsigned char)*str) >= 0xC0) return REPLACEMENT_CHAR;
Branch: 2 branches
BranchTrueFalseTotal
if (((unsigned char)*str) < 0x80 || ((unsigned char)*str) >= 0xC0) return REPLACEMENT_CHAR; 0 0 0
if (((unsigned char)*str) < 0x80 || ((unsigned char)*str) >= 0xC0) return REPLACEMENT_CHAR; 0 0 0
1504 0 res += (((unsigned char)*str++) & 0x3F) << 6;
1505 0 ▶ if (((unsigned char)*str) < 0x80 || ((unsigned char)*str) >= 0xC0) return REPLACEMENT_CHAR;
Branch: 2 branches
BranchTrueFalseTotal
if (((unsigned char)*str) < 0x80 || ((unsigned char)*str) >= 0xC0) return REPLACEMENT_CHAR; 0 0 0
if (((unsigned char)*str) < 0x80 || ((unsigned char)*str) >= 0xC0) return REPLACEMENT_CHAR; 0 0 0
1506 0 return res + (((unsigned char)*str++) & 0x3F);
1507 0 } else return ++str, REPLACEMENT_CHAR;
1508 }
1509  
1510 219 char32_t utf8::decode(const char*& str, size_t& len) {
1511 219 ▶ if (!len) return 0;
Branch: 1 branch
BranchTrueFalseTotal
if (!len) return 0; 1 218 219
1512 218 --len;
1513 218 ▶ if (((unsigned char)*str) < 0x80) return (unsigned char)*str++;
Branch: 1 branch
BranchTrueFalseTotal
if (((unsigned char)*str) < 0x80) return (unsigned char)*str++; 193 25 218
1514 25 ▶ else if (((unsigned char)*str) < 0xC0) return ++str, REPLACEMENT_CHAR;
Branch: 1 branch
BranchTrueFalseTotal
else if (((unsigned char)*str) < 0xC0) return ++str, REPLACEMENT_CHAR; 0 25 25
1515 25 ▶ else if (((unsigned char)*str) < 0xE0) {
Branch: 1 branch
BranchTrueFalseTotal
else if (((unsigned char)*str) < 0xE0) { 22 3 25
1516 22 char32_t res = (((unsigned char)*str++) & 0x1F) << 6;
1517 22 ▶ if (len <= 0 || ((unsigned char)*str) < 0x80 || ((unsigned char)*str) >= 0xC0) return REPLACEMENT_CHAR;
Branch: 3 branches
BranchTrueFalseTotal
if (len <= 0 || ((unsigned char)*str) < 0x80 || ((unsigned char)*str) >= 0xC0) return REPLACEMENT_CHAR; 22 0 22
if (len <= 0 || ((unsigned char)*str) < 0x80 || ((unsigned char)*str) >= 0xC0) return REPLACEMENT_CHAR; 22 0 22
if (len <= 0 || ((unsigned char)*str) < 0x80 || ((unsigned char)*str) >= 0xC0) return REPLACEMENT_CHAR; 0 22 22
1518 22 return res + ((--len, ((unsigned char)*str++)) & 0x3F);
1519 3 ▶ } else if (((unsigned char)*str) < 0xF0) {
Branch: 1 branch
BranchTrueFalseTotal
} else if (((unsigned char)*str) < 0xF0) { 3 0 3
1520 3 char32_t res = (((unsigned char)*str++) & 0x0F) << 12;
1521 3 ▶ if (len <= 0 || ((unsigned char)*str) < 0x80 || ((unsigned char)*str) >= 0xC0) return REPLACEMENT_CHAR;
Branch: 3 branches
BranchTrueFalseTotal
if (len <= 0 || ((unsigned char)*str) < 0x80 || ((unsigned char)*str) >= 0xC0) return REPLACEMENT_CHAR; 3 0 3
if (len <= 0 || ((unsigned char)*str) < 0x80 || ((unsigned char)*str) >= 0xC0) return REPLACEMENT_CHAR; 3 0 3
if (len <= 0 || ((unsigned char)*str) < 0x80 || ((unsigned char)*str) >= 0xC0) return REPLACEMENT_CHAR; 0 3 3
1522 3 res += ((--len, ((unsigned char)*str++)) & 0x3F) << 6;
1523 3 ▶ if (len <= 0 || ((unsigned char)*str) < 0x80 || ((unsigned char)*str) >= 0xC0) return REPLACEMENT_CHAR;
Branch: 3 branches
BranchTrueFalseTotal
if (len <= 0 || ((unsigned char)*str) < 0x80 || ((unsigned char)*str) >= 0xC0) return REPLACEMENT_CHAR; 3 0 3
if (len <= 0 || ((unsigned char)*str) < 0x80 || ((unsigned char)*str) >= 0xC0) return REPLACEMENT_CHAR; 3 0 3
if (len <= 0 || ((unsigned char)*str) < 0x80 || ((unsigned char)*str) >= 0xC0) return REPLACEMENT_CHAR; 0 3 3
1524 3 return res + ((--len, ((unsigned char)*str++)) & 0x3F);
1525 0 ▶ } else if (((unsigned char)*str) < 0xF8) {
Branch: 1 branch
BranchTrueFalseTotal
} else if (((unsigned char)*str) < 0xF8) { 0 0 0
1526 0 char32_t res = (((unsigned char)*str++) & 0x07) << 18;
1527 0 ▶ if (len <= 0 || ((unsigned char)*str) < 0x80 || ((unsigned char)*str) >= 0xC0) return REPLACEMENT_CHAR;
Branch: 3 branches
BranchTrueFalseTotal
if (len <= 0 || ((unsigned char)*str) < 0x80 || ((unsigned char)*str) >= 0xC0) return REPLACEMENT_CHAR; 0 0 0
if (len <= 0 || ((unsigned char)*str) < 0x80 || ((unsigned char)*str) >= 0xC0) return REPLACEMENT_CHAR; 0 0 0
if (len <= 0 || ((unsigned char)*str) < 0x80 || ((unsigned char)*str) >= 0xC0) return REPLACEMENT_CHAR; 0 0 0
1528 0 res += ((--len, ((unsigned char)*str++)) & 0x3F) << 12;
1529 0 ▶ if (len <= 0 || ((unsigned char)*str) < 0x80 || ((unsigned char)*str) >= 0xC0) return REPLACEMENT_CHAR;
Branch: 3 branches
BranchTrueFalseTotal
if (len <= 0 || ((unsigned char)*str) < 0x80 || ((unsigned char)*str) >= 0xC0) return REPLACEMENT_CHAR; 0 0 0
if (len <= 0 || ((unsigned char)*str) < 0x80 || ((unsigned char)*str) >= 0xC0) return REPLACEMENT_CHAR; 0 0 0
if (len <= 0 || ((unsigned char)*str) < 0x80 || ((unsigned char)*str) >= 0xC0) return REPLACEMENT_CHAR; 0 0 0
1530 0 res += ((--len, ((unsigned char)*str++)) & 0x3F) << 6;
1531 0 ▶ if (len <= 0 || ((unsigned char)*str) < 0x80 || ((unsigned char)*str) >= 0xC0) return REPLACEMENT_CHAR;
Branch: 3 branches
BranchTrueFalseTotal
if (len <= 0 || ((unsigned char)*str) < 0x80 || ((unsigned char)*str) >= 0xC0) return REPLACEMENT_CHAR; 0 0 0
if (len <= 0 || ((unsigned char)*str) < 0x80 || ((unsigned char)*str) >= 0xC0) return REPLACEMENT_CHAR; 0 0 0
if (len <= 0 || ((unsigned char)*str) < 0x80 || ((unsigned char)*str) >= 0xC0) return REPLACEMENT_CHAR; 0 0 0
1532 0 return res + ((--len, ((unsigned char)*str++)) & 0x3F);
1533 0 } else return ++str, REPLACEMENT_CHAR;
1534 }
1535  
1536 char32_t utf8::first(const char* str) {
1537 return decode(str);
1538 }
1539  
1540 char32_t utf8::first(const char* str, size_t len) {
1541 return decode(str, len);
1542 }
1543  
1544 char32_t utf8::first(const std::string& str) {
1545 return first(str.c_str());
1546 }
1547  
1548 void utf8::decode(const std::string& str, std::u32string& decoded) {
1549 decode(str.c_str(), decoded);
1550 }
1551  
1552 class utf8::string_decoder::iterator {
1553 public:
1554 using iterator_category = std::input_iterator_tag;
1555 using value_type = char32_t;
1556 using difference_type = ptrdiff_t;
1557 using pointer = char32_t*;
1558 using reference = char32_t&;
1559 iterator(const char* str) : codepoint(0), next(str) { operator++(); }
1560 iterator(const iterator& it) : codepoint(it.codepoint), next(it.next) {}
1561 iterator& operator++() { if (next) { codepoint = decode(next); if (!codepoint) next = nullptr; } return *this; }
1562 iterator operator++(int) { iterator tmp(*this); operator++(); return tmp; }
1563 bool operator==(const iterator& other) const { return next == other.next; }
1564 bool operator!=(const iterator& other) const { return next != other.next; }
1565 const char32_t& operator*() { return codepoint; }
1566 private:
1567 char32_t codepoint;
1568 const char* next;
1569 };
1570  
1571 utf8::string_decoder::string_decoder(const char* str) : str(str) {}
1572  
1573 utf8::string_decoder::iterator utf8::string_decoder::begin() {
1574 return iterator(str);
1575 }
1576  
1577 utf8::string_decoder::iterator utf8::string_decoder::end() {
1578 return iterator(nullptr);
1579 }
1580  
1581 utf8::string_decoder utf8::decoder(const char* str) {
1582 return string_decoder(str);
1583 }
1584  
1585 utf8::string_decoder utf8::decoder(const std::string& str) {
1586 return string_decoder(str.c_str());
1587 }
1588  
1589 class utf8::buffer_decoder::iterator {
1590 public:
1591 using iterator_category = std::input_iterator_tag;
1592 using value_type = char32_t;
1593 using difference_type = ptrdiff_t;
1594 using pointer = char32_t*;
1595 using reference = char32_t&;
1596 iterator(const char* str, size_t len) : codepoint(0), next(str), len(len) { operator++(); }
1597 iterator(const iterator& it) : codepoint(it.codepoint), next(it.next), len(it.len) {}
1598 iterator& operator++() { if (!len) next = nullptr; if (next) codepoint = decode(next, len); return *this; }
1599 iterator operator++(int) { iterator tmp(*this); operator++(); return tmp; }
1600 bool operator==(const iterator& other) const { return next == other.next; }
1601 bool operator!=(const iterator& other) const { return next != other.next; }
1602 const char32_t& operator*() { return codepoint; }
1603 private:
1604 char32_t codepoint;
1605 const char* next;
1606 size_t len;
1607 };
1608  
1609 utf8::buffer_decoder::buffer_decoder(const char* str, size_t len) : str(str), len(len) {}
1610  
1611 utf8::buffer_decoder::iterator utf8::buffer_decoder::begin() {
1612 return iterator(str, len);
1613 }
1614  
1615 utf8::buffer_decoder::iterator utf8::buffer_decoder::end() {
1616 return iterator(nullptr, 0);
1617 }
1618  
1619 utf8::buffer_decoder utf8::decoder(const char* str, size_t len) {
1620 return buffer_decoder(str, len);
1621 }
1622  
1623 void utf8::append(char*& str, char32_t chr) {
1624 if (chr < 0x80) *str++ = chr;
1625 else if (chr < 0x800) { *str++ = 0xC0 + (chr >> 6); *str++ = 0x80 + (chr & 0x3F); }
1626 else if (chr < 0x10000) { *str++ = 0xE0 + (chr >> 12); *str++ = 0x80 + ((chr >> 6) & 0x3F); *str++ = 0x80 + (chr & 0x3F); }
1627 else if (chr < 0x200000) { *str++ = 0xF0 + (chr >> 18); *str++ = 0x80 + ((chr >> 12) & 0x3F); *str++ = 0x80 + ((chr >> 6) & 0x3F); *str++ = 0x80 + (chr & 0x3F); }
1628 else *str++ = REPLACEMENT_CHAR;
1629 }
1630  
1631 13 void utf8::append(std::string& str, char32_t chr) {
1632 13 ▶ if (chr < 0x80) str += chr;
Branch: 1 branch
BranchTrueFalseTotal
if (chr < 0x80) str += chr; 13 0 13
1633 0 ▶ else if (chr < 0x800) { str += 0xC0 + (chr >> 6); str += 0x80 + (chr & 0x3F); }
Branch: 1 branch
BranchTrueFalseTotal
else if (chr < 0x800) { str += 0xC0 + (chr >> 6); str += 0x80 + (chr & 0x3F); } 0 0 0
1634 0 ▶ else if (chr < 0x10000) { str += 0xE0 + (chr >> 12); str += 0x80 + ((chr >> 6) & 0x3F); str += 0x80 + (chr & 0x3F); }
Branch: 1 branch
BranchTrueFalseTotal
else if (chr < 0x10000) { str += 0xE0 + (chr >> 12); str += 0x80 + ((chr >> 6) & 0x3F); str += 0x80 + (chr & 0x3F); } 0 0 0
1635 0 ▶ else if (chr < 0x200000) { str += 0xF0 + (chr >> 18); str += 0x80 + ((chr >> 12) & 0x3F); str += 0x80 + ((chr >> 6) & 0x3F); str += 0x80 + (chr & 0x3F); }
Branch: 1 branch
BranchTrueFalseTotal
else if (chr < 0x200000) { str += 0xF0 + (chr >> 18); str += 0x80 + ((chr >> 12) & 0x3F); str += 0x80 + ((chr >> 6) & 0x3F); str += 0x80 + (chr & 0x3F); } 0 0 0
1636 0 else str += REPLACEMENT_CHAR;
1637 13 }
1638  
1639 template<class F> void utf8::map(F f, const char* str, std::string& result) {
1640 result.clear();
1641  
1642 for (char32_t chr; (chr = decode(str)); )
1643 append(result, f(chr));
1644 }
1645  
1646 0 template<class F> void utf8::map(F f, const char* str, size_t len, std::string& result) {
1647 0 result.clear();
1648  
1649 0 ▶ while (len)
Branch: 1 branch
BranchTrueFalseTotal
while (len) 0 0 0
1650 0 append(result, f(decode(str, len)));
1651 0 }
1652  
1653 template<class F> void utf8::map(F f, const std::string& str, std::string& result) {
1654 map(f, str.c_str(), result);
1655 }
1656  
1657 } // namespace unilib
1658  
1659 /////////
1660 // File: morpho/casing_variants.h
1661 /////////
1662  
1663 // This file is part of MorphoDiTa <http://github.com/ufal/morphodita/>.
1664 //
1665 // Copyright 2015 Institute of Formal and Applied Linguistics, Faculty of
1666 // Mathematics and Physics, Charles University in Prague, Czech Republic.
1667 //
1668 // This Source Code Form is subject to the terms of the Mozilla Public
1669 // License, v. 2.0. If a copy of the MPL was not distributed with this
1670 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
1671  
1672 13 inline void generate_casing_variants(string_piece form, string& form_uclc, string& form_lc) {
1673 using namespace unilib;
1674  
1675 // Detect uppercase+titlecase characters.
1676 13 bool first_Lut = false; // first character is uppercase or titlecase
1677 13 bool rest_has_Lut = false; // any character but first is uppercase or titlecase
1678 {
1679 13 string_piece form_tmp = form;
1680 13 first_Lut = unicode::category(utf8::decode(form_tmp.str, form_tmp.len)) & unicode::Lut;
1681 47 ▶ while (form_tmp.len && !rest_has_Lut)
Branch: 2 branches
BranchTrueFalseTotal
while (form_tmp.len && !rest_has_Lut) 34 13 47
while (form_tmp.len && !rest_has_Lut) 34 0 34
1682 34 rest_has_Lut = unicode::category(utf8::decode(form_tmp.str, form_tmp.len)) & unicode::Lut;
1683 }
1684  
1685 // Generate all casing variants if needed (they are different than given form).
1686 // We only replace letters with their lowercase variants.
1687 // - form_uclc: first uppercase, rest lowercase
1688 // - form_lc: all lowercase
1689  
1690 13 ▶ if (first_Lut && !rest_has_Lut) { // common case allowing fast execution
Branch: 2 branches
BranchTrueFalseTotal
if (first_Lut && !rest_has_Lut) { // common case allowing fast execution 2 11 13
if (first_Lut && !rest_has_Lut) { // common case allowing fast execution 2 0 2
1691 2 ▶ form_lc.reserve(form.len);
Branch: 1 branch
BranchTrueFalseTotal
form_lc.reserve(form.len); 2 0 2
1692 2 string_piece form_tmp = form;
1693 2 ▶ utf8::append(form_lc, unicode::lowercase(utf8::decode(form_tmp.str, form_tmp.len)));
Branch: 1 branch
BranchTrueFalseTotal
utf8::append(form_lc, unicode::lowercase(utf8::decode(form_tmp.str, form_tmp.len))); 2 0 2
1694 2 ▶ form_lc.append(form_tmp.str, form_tmp.len);
Branch: 1 branch
BranchTrueFalseTotal
form_lc.append(form_tmp.str, form_tmp.len); 2 0 2
1695 13 ▶ } else if (!first_Lut && rest_has_Lut) {
Branch: 2 branches
BranchTrueFalseTotal
} else if (!first_Lut && rest_has_Lut) { 11 0 11
} else if (!first_Lut && rest_has_Lut) { 0 11 11
1696 0 form_lc.reserve(form.len);
1697 0 utf8::map(unicode::lowercase, form.str, form.len, form_lc);
1698 11 ▶ } else if (first_Lut && rest_has_Lut) {
Branch: 2 branches
BranchTrueFalseTotal
} else if (first_Lut && rest_has_Lut) { 0 11 11
} else if (first_Lut && rest_has_Lut) { 0 0 0
1699 0 ▶ form_lc.reserve(form.len);
Branch: 1 branch
BranchTrueFalseTotal
form_lc.reserve(form.len); 0 0 0
1700 0 ▶ form_uclc.reserve(form.len);
Branch: 1 branch
BranchTrueFalseTotal
form_uclc.reserve(form.len); 0 0 0
1701 0 string_piece form_tmp = form;
1702 0 char32_t first = utf8::decode(form_tmp.str, form_tmp.len);
1703 0 ▶ utf8::append(form_lc, unicode::lowercase(first));
Branch: 1 branch
BranchTrueFalseTotal
utf8::append(form_lc, unicode::lowercase(first)); 0 0 0
1704 0 ▶ utf8::append(form_uclc, first);
Branch: 1 branch
BranchTrueFalseTotal
utf8::append(form_uclc, first); 0 0 0
1705 0 ▶ while (form_tmp.len) {
Branch: 1 branch
BranchTrueFalseTotal
while (form_tmp.len) { 0 0 0
1706 0 char32_t lowercase = unicode::lowercase(utf8::decode(form_tmp.str, form_tmp.len));
1707 0 ▶ utf8::append(form_lc, lowercase);
Branch: 1 branch
BranchTrueFalseTotal
utf8::append(form_lc, lowercase); 0 0 0
1708 0 ▶ utf8::append(form_uclc, lowercase);
Branch: 1 branch
BranchTrueFalseTotal
utf8::append(form_uclc, lowercase); 0 0 0
1709 }
1710 }
1711 13 }
1712  
1713 /////////
1714 // File: morpho/czech_lemma_addinfo.h
1715 /////////
1716  
1717 // This file is part of MorphoDiTa <http://github.com/ufal/morphodita/>.
1718 //
1719 // Copyright 2015 Institute of Formal and Applied Linguistics, Faculty of
1720 // Mathematics and Physics, Charles University in Prague, Czech Republic.
1721 //
1722 // This Source Code Form is subject to the terms of the Mozilla Public
1723 // License, v. 2.0. If a copy of the MPL was not distributed with this
1724 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
1725  
1726 // Declarations
1727 struct czech_lemma_addinfo {
1728 inline static int raw_lemma_len(string_piece lemma);
1729 inline static int lemma_id_len(string_piece lemma);
1730 inline static string format(const unsigned char* addinfo, int addinfo_len);
1731 inline static bool generatable(const unsigned char* addinfo, int addinfo_len);
1732  
1733 inline int parse(string_piece lemma, bool die_on_failure = false);
1734 inline bool match_lemma_id(const unsigned char* other_addinfo, int other_addinfo_len);
1735  
1736 vector<unsigned char> data;
1737 };
1738  
1739 // Definitions
1740 0 int czech_lemma_addinfo::raw_lemma_len(string_piece lemma) {
1741 // Lemma ends by a '-[0-9]', '`' or '_' on non-first position.
1742 0 ▶ for (unsigned len = 1; len < lemma.len; len++)
Branch: 1 branch
BranchTrueFalseTotal
for (unsigned len = 1; len < lemma.len; len++) 0 0 0
1743 0 ▶ if (lemma.str[len] == '`' || lemma.str[len] == '_' ||
Branch: 2 branches
BranchTrueFalseTotal
if (lemma.str[len] == '`' || lemma.str[len] == '_' || 0 0 0
if (lemma.str[len] == '`' || lemma.str[len] == '_' || 0 0 0
1744 0 ▶ (lemma.str[len] == '-' && len+1 < lemma.len && lemma.str[len+1] >= '0' && lemma.str[len+1] <= '9'))
Branch: 4 branches
BranchTrueFalseTotal
(lemma.str[len] == '-' && len+1 < lemma.len && lemma.str[len+1] >= '0' && lemma.str[len+1] <= '9')) 0 0 0
(lemma.str[len] == '-' && len+1 < lemma.len && lemma.str[len+1] >= '0' && lemma.str[len+1] <= '9')) 0 0 0
(lemma.str[len] == '-' && len+1 < lemma.len && lemma.str[len+1] >= '0' && lemma.str[len+1] <= '9')) 0 0 0
(lemma.str[len] == '-' && len+1 < lemma.len && lemma.str[len+1] >= '0' && lemma.str[len+1] <= '9')) 0 0 0
1745 0 return len;
1746 0 return lemma.len;
1747 }
1748  
1749 0 int czech_lemma_addinfo::lemma_id_len(string_piece lemma) {
1750 // Lemma ends by a '-[0-9]', '`' or '_' on non-first position.
1751 0 ▶ for (unsigned len = 1; len < lemma.len; len++) {
Branch: 1 branch
BranchTrueFalseTotal
for (unsigned len = 1; len < lemma.len; len++) { 0 0 0
1752 0 ▶ if (lemma.str[len] == '`' || lemma.str[len] == '_')
Branch: 2 branches
BranchTrueFalseTotal
if (lemma.str[len] == '`' || lemma.str[len] == '_') 0 0 0
if (lemma.str[len] == '`' || lemma.str[len] == '_') 0 0 0
1753 0 return len;
1754 0 ▶ if (lemma.str[len] == '-' && len+1 < lemma.len && lemma.str[len+1] >= '0' && lemma.str[len+1] <= '9') {
Branch: 4 branches
BranchTrueFalseTotal
if (lemma.str[len] == '-' && len+1 < lemma.len && lemma.str[len+1] >= '0' && lemma.str[len+1] <= '9') { 0 0 0
if (lemma.str[len] == '-' && len+1 < lemma.len && lemma.str[len+1] >= '0' && lemma.str[len+1] <= '9') { 0 0 0
if (lemma.str[len] == '-' && len+1 < lemma.len && lemma.str[len+1] >= '0' && lemma.str[len+1] <= '9') { 0 0 0
if (lemma.str[len] == '-' && len+1 < lemma.len && lemma.str[len+1] >= '0' && lemma.str[len+1] <= '9') { 0 0 0
1755 0 len += 2;
1756 0 ▶ while (len < lemma.len && lemma.str[len] >= '0' && lemma.str[len] <= '9') len++;
Branch: 3 branches
BranchTrueFalseTotal
while (len < lemma.len && lemma.str[len] >= '0' && lemma.str[len] <= '9') len++; 0 0 0
while (len < lemma.len && lemma.str[len] >= '0' && lemma.str[len] <= '9') len++; 0 0 0
while (len < lemma.len && lemma.str[len] >= '0' && lemma.str[len] <= '9') len++; 0 0 0
1757 0 return len;
1758 }
1759 }
1760 0 return lemma.len;
1761 }
1762  
1763 0 string czech_lemma_addinfo::format(const unsigned char* addinfo, int addinfo_len) {
1764 0 string res;
1765  
1766 0 ▶ if (addinfo_len) {
Branch: 1 branch
BranchTrueFalseTotal
if (addinfo_len) { 0 0 0
1767 0 ▶ res.reserve(addinfo_len + 4);
Branch: 1 branch
BranchTrueFalseTotal
res.reserve(addinfo_len + 4); 0 0 0
1768 0 ▶ if (addinfo[0] != 255) {
Branch: 1 branch
BranchTrueFalseTotal
if (addinfo[0] != 255) { 0 0 0
1769 char num[5];
1770 0 snprintf(num, sizeof(num), "-%u", addinfo[0]);
1771 0 ▶ res += num;
Branch: 1 branch
BranchTrueFalseTotal
res += num; 0 0 0
1772 }
1773 0 ▶ for (int i = 1; i < addinfo_len; i++)
Branch: 1 branch
BranchTrueFalseTotal
for (int i = 1; i < addinfo_len; i++) 0 0 0
1774 0 ▶ res += addinfo[i];
Branch: 1 branch
BranchTrueFalseTotal
res += addinfo[i]; 0 0 0
1775 }
1776  
1777 0 return res;
1778 }
1779  
1780 0 bool czech_lemma_addinfo::generatable(const unsigned char* addinfo, int addinfo_len) {
1781 0 ▶ for (int i = 1; i + 2 < addinfo_len; i++)
Branch: 1 branch
BranchTrueFalseTotal
for (int i = 1; i + 2 < addinfo_len; i++) 0 0 0
1782 0 ▶ if (addinfo[i] == '_' && addinfo[i+1] == ',' && addinfo[i+2] == 'x')
Branch: 3 branches
BranchTrueFalseTotal
if (addinfo[i] == '_' && addinfo[i+1] == ',' && addinfo[i+2] == 'x') 0 0 0
if (addinfo[i] == '_' && addinfo[i+1] == ',' && addinfo[i+2] == 'x') 0 0 0
if (addinfo[i] == '_' && addinfo[i+1] == ',' && addinfo[i+2] == 'x') 0 0 0
1783 0 return false;
1784  
1785 0 return true;
1786 }
1787  
1788 0 int czech_lemma_addinfo::parse(string_piece lemma, bool die_on_failure) {
1789 0 data.clear();
1790  
1791 0 const char* lemma_info = lemma.str + raw_lemma_len(lemma);
1792 0 ▶ if (lemma_info < lemma.str + lemma.len) {
Branch: 1 branch
BranchTrueFalseTotal
if (lemma_info < lemma.str + lemma.len) { 0 0 0
1793 0 int lemma_num = 255;
1794 0 const char* lemma_additional_info = lemma_info;
1795  
1796 0 ▶ if (*lemma_info == '-') {
Branch: 1 branch
BranchTrueFalseTotal
if (*lemma_info == '-') { 0 0 0
1797 0 lemma_num = 0;
1798 0 for (lemma_additional_info = lemma_info + 1;
1799 0 ▶ lemma_additional_info < lemma.str + lemma.len && (*lemma_additional_info >= '0' && *lemma_additional_info <= '9');
Branch: 3 branches
BranchTrueFalseTotal
lemma_additional_info < lemma.str + lemma.len && (*lemma_additional_info >= '0' && *lemma_additional_info <= '9'); 0 0 0
lemma_additional_info < lemma.str + lemma.len && (*lemma_additional_info >= '0' && *lemma_additional_info <= '9'); 0 0 0
lemma_additional_info < lemma.str + lemma.len && (*lemma_additional_info >= '0' && *lemma_additional_info <= '9'); 0 0 0
1800 lemma_additional_info++)
1801 0 lemma_num = 10 * lemma_num + (*lemma_additional_info - '0');
1802  
1803 0 ▶ if (lemma_additional_info == lemma_info + 1 || (lemma_additional_info < lemma.str + lemma.len && *lemma_additional_info != '`' && *lemma_additional_info != '_') || lemma_num >= 255) {
Branch: 5 branches
BranchTrueFalseTotal
if (lemma_additional_info == lemma_info + 1 || (lemma_additional_info < lemma.str + lemma.len && *lemma_additional_info != '`' && *lemma_additional_info != '_') || lemma_num >= 255) { 0 0 0
if (lemma_additional_info == lemma_info + 1 || (lemma_additional_info < lemma.str + lemma.len && *lemma_additional_info != '`' && *lemma_additional_info != '_') || lemma_num >= 255) { 0 0 0
if (lemma_additional_info == lemma_info + 1 || (lemma_additional_info < lemma.str + lemma.len && *lemma_additional_info != '`' && *lemma_additional_info != '_') || lemma_num >= 255) { 0 0 0
if (lemma_additional_info == lemma_info + 1 || (lemma_additional_info < lemma.str + lemma.len && *lemma_additional_info != '`' && *lemma_additional_info != '_') || lemma_num >= 255) { 0 0 0
if (lemma_additional_info == lemma_info + 1 || (lemma_additional_info < lemma.str + lemma.len && *lemma_additional_info != '`' && *lemma_additional_info != '_') || lemma_num >= 255) { 0 0 0
1804 0 ▶ if (die_on_failure)
Branch: 1 branch
BranchTrueFalseTotal
if (die_on_failure) 0 0 0
1805 0 ▶ runtime_failure("Lemma number " << lemma_num << " in lemma " << lemma << " out of range!");
Branch: 6 branches
BranchTrueFalseTotal
runtime_failure("Lemma number " << lemma_num << " in lemma " << lemma << " out of range!"); 0 0 0
runtime_failure("Lemma number " << lemma_num << " in lemma " << lemma << " out of range!"); 0 0 0
runtime_failure("Lemma number " << lemma_num << " in lemma " << lemma << " out of range!"); 0 0 0
runtime_failure("Lemma number " << lemma_num << " in lemma " << lemma << " out of range!"); 0 0 0
runtime_failure("Lemma number " << lemma_num << " in lemma " << lemma << " out of range!"); 0 0 0
runtime_failure("Lemma number " << lemma_num << " in lemma " << lemma << " out of range!"); 0 0 0
1806 else
1807 0 lemma_num = 255;
1808 }
1809 }
1810 0 ▶ data.emplace_back(lemma_num);
Branch: 1 branch
BranchTrueFalseTotal
data.emplace_back(lemma_num); 0 0 0
1811 0 ▶ while (lemma_additional_info < lemma.str + lemma.len)
Branch: 1 branch
BranchTrueFalseTotal
while (lemma_additional_info < lemma.str + lemma.len) 0 0 0
1812 0 ▶ data.push_back(*(unsigned char*)lemma_additional_info++);
Branch: 1 branch
BranchTrueFalseTotal
data.push_back(*(unsigned char*)lemma_additional_info++); 0 0 0
1813  
1814 0 ▶ if (data.size() > 255) {
Branch: 1 branch
BranchTrueFalseTotal
if (data.size() > 255) { 0 0 0
1815 0 ▶ if (die_on_failure)
Branch: 1 branch
BranchTrueFalseTotal
if (die_on_failure) 0 0 0
1816 0 ▶ runtime_failure("Too long lemma info " << lemma_info << " in lemma " << lemma << '!');
Branch: 6 branches
BranchTrueFalseTotal
runtime_failure("Too long lemma info " << lemma_info << " in lemma " << lemma << '!'); 0 0 0
runtime_failure("Too long lemma info " << lemma_info << " in lemma " << lemma << '!'); 0 0 0
runtime_failure("Too long lemma info " << lemma_info << " in lemma " << lemma << '!'); 0 0 0
runtime_failure("Too long lemma info " << lemma_info << " in lemma " << lemma << '!'); 0 0 0
runtime_failure("Too long lemma info " << lemma_info << " in lemma " << lemma << '!'); 0 0 0
runtime_failure("Too long lemma info " << lemma_info << " in lemma " << lemma << '!'); 0 0 0
1817 else
1818 0 ▶ data.resize(255);
Branch: 1 branch
BranchTrueFalseTotal
data.resize(255); 0 0 0
1819 }
1820 }
1821  
1822 0 return lemma_info - lemma.str;
1823 }
1824  
1825 0 bool czech_lemma_addinfo::match_lemma_id(const unsigned char* other_addinfo, int other_addinfo_len) {
1826 0 ▶ if (data.empty()) return true;
Branch: 1 branch
BranchTrueFalseTotal
if (data.empty()) return true; 0 0 0
1827 0 ▶ if (data[0] != 255 && (!other_addinfo_len || other_addinfo[0] != data[0])) return false;
Branch: 4 branches
BranchTrueFalseTotal
if (data[0] != 255 && (!other_addinfo_len || other_addinfo[0] != data[0])) return false; 0 0 0
if (data[0] != 255 && (!other_addinfo_len || other_addinfo[0] != data[0])) return false; 0 0 0
if (data[0] != 255 && (!other_addinfo_len || other_addinfo[0] != data[0])) return false; 0 0 0
if (data[0] != 255 && (!other_addinfo_len || other_addinfo[0] != data[0])) return false; 0 0 0
1828 0 return true;
1829 }
1830  
1831 /////////
1832 // File: morpho/tag_filter.h
1833 /////////
1834  
1835 // This file is part of MorphoDiTa <http://github.com/ufal/morphodita/>.
1836 //
1837 // Copyright 2015 Institute of Formal and Applied Linguistics, Faculty of
1838 // Mathematics and Physics, Charles University in Prague, Czech Republic.
1839 //
1840 // This Source Code Form is subject to the terms of the Mozilla Public
1841 // License, v. 2.0. If a copy of the MPL was not distributed with this
1842 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
1843  
1844 // Declarations
1845 class tag_filter {
1846 public:
1847 tag_filter(const char* filter = nullptr);
1848  
1849 inline bool matches(const char* tag) const;
1850  
1851 private:
1852 struct char_filter {
1853 5 char_filter(int pos, bool negate, int chars_offset, int chars_len)
1854 5 : pos(pos), negate(negate), chars_offset(chars_offset), chars_len(chars_len) {}
1855  
1856 int pos;
1857 bool negate;
1858 int chars_offset, chars_len;
1859 };
1860  
1861 string wildcard;
1862 std::vector<char_filter> filters;
1863 };
1864  
1865 // Definitions
1866 40 inline bool tag_filter::matches(const char* tag) const {
1867 40 ▶ if (filters.empty()) return true;
Branch: 1 branch
BranchTrueFalseTotal
if (filters.empty()) return true; 20 20 40
1868  
1869 20 int tag_pos = 0;
1870 39 ▶ for (auto&& filter : filters) {
Branch: 1 branch
BranchTrueFalseTotal
for (auto&& filter : filters) { 36 3 39
1871 // Skip until next filter position. If the tag ends prematurely, accept.
1872 66 ▶ while (tag_pos < filter.pos)
Branch: 1 branch
BranchTrueFalseTotal
while (tag_pos < filter.pos) 30 36 66
1873 30 ▶ if (!tag[tag_pos++])
Branch: 1 branch
BranchTrueFalseTotal
if (!tag[tag_pos++]) 0 30 30
1874 17 return true;
1875 36 ▶ if (!tag[tag_pos])
Branch: 1 branch
BranchTrueFalseTotal
if (!tag[tag_pos]) 0 36 36
1876 0 return true;
1877  
1878 // We assume filter.chars_len >= 1.
1879 36 bool matched = (wildcard[filter.chars_offset] == tag[tag_pos]) ^ filter.negate;
1880 42 ▶ for (int i = 1; i < filter.chars_len && ((!matched) ^ filter.negate); i++)
Branch: 2 branches
BranchTrueFalseTotal
for (int i = 1; i < filter.chars_len && ((!matched) ^ filter.negate); i++) 7 35 42
for (int i = 1; i < filter.chars_len && ((!matched) ^ filter.negate); i++) 6 1 7
1881 6 matched = (wildcard[filter.chars_offset + i] == tag[tag_pos]) ^ filter.negate;
1882 36 ▶ if (!matched) return false;
Branch: 1 branch
BranchTrueFalseTotal
if (!matched) return false; 17 19 36
1883 }
1884 3 return true;
1885 }
1886  
1887 /////////
1888 // File: morpho/morpho_dictionary.h
1889 /////////
1890  
1891 // This file is part of MorphoDiTa <http://github.com/ufal/morphodita/>.
1892 //
1893 // Copyright 2015 Institute of Formal and Applied Linguistics, Faculty of
1894 // Mathematics and Physics, Charles University in Prague, Czech Republic.
1895 //
1896 // This Source Code Form is subject to the terms of the Mozilla Public
1897 // License, v. 2.0. If a copy of the MPL was not distributed with this
1898 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
1899  
1900 // Declarations
1901 template <class LemmaAddinfo>
1902 class morpho_dictionary {
1903 public:
1904 void load(binary_decoder& data);
1905 void analyze(string_piece form, vector<tagged_lemma>& lemmas) const;
1906 bool generate(string_piece lemma, const tag_filter& filter, vector<tagged_lemma_forms>& lemmas_forms) const;
1907 private:
1908 persistent_unordered_map lemmas, roots, suffixes;
1909  
1910 vector<string> tags;
1911 vector<vector<pair<string, vector<uint16_t>>>> classes;
1912 };
1913  
1914 // Definitions
1915 template <class LemmaAddinfo>
1916 0 void morpho_dictionary<LemmaAddinfo>::load(binary_decoder& data) {
1917 // Prepare lemmas and roots hashes
1918 0 ▶ for (int i = data.next_1B(); i > 0; i--)
Branch: 6 branches
BranchTrueFalseTotal
for (int i = data.next_1B(); i > 0; i--) 2 0 2
for (int i = data.next_1B(); i > 0; i--) 14 2 16
for (int i = data.next_1B(); i > 0; i--) 0 0 0
for (int i = data.next_1B(); i > 0; i--) 0 0 0
for (int i = data.next_1B(); i > 0; i--) 0 0 0
for (int i = data.next_1B(); i > 0; i--) 0 0 0
1919 0 ▶ lemmas.resize(data.next_4B());
Branch: 6 branches
BranchTrueFalseTotal
lemmas.resize(data.next_4B()); 14 0 14
lemmas.resize(data.next_4B()); 14 0 14
lemmas.resize(data.next_4B()); 0 0 0
lemmas.resize(data.next_4B()); 0 0 0
lemmas.resize(data.next_4B()); 0 0 0
lemmas.resize(data.next_4B()); 0 0 0
1920 0 ▶ for (int i = data.next_1B(); i > 0; i--)
Branch: 6 branches
BranchTrueFalseTotal
for (int i = data.next_1B(); i > 0; i--) 2 0 2
for (int i = data.next_1B(); i > 0; i--) 18 2 20
for (int i = data.next_1B(); i > 0; i--) 0 0 0
for (int i = data.next_1B(); i > 0; i--) 0 0 0
for (int i = data.next_1B(); i > 0; i--) 0 0 0
for (int i = data.next_1B(); i > 0; i--) 0 0 0
1921 0 ▶ roots.resize(data.next_4B());
Branch: 6 branches
BranchTrueFalseTotal
roots.resize(data.next_4B()); 18 0 18
roots.resize(data.next_4B()); 18 0 18
roots.resize(data.next_4B()); 0 0 0
roots.resize(data.next_4B()); 0 0 0
roots.resize(data.next_4B()); 0 0 0
roots.resize(data.next_4B()); 0 0 0
1922  
1923 // Perform two pass over the lemmas and roots data, filling the hashes.
1924  
1925 0 ▶ vector<char> lemma(max(lemmas.max_length(), roots.max_length()));
Branch: 3 branches
BranchTrueFalseTotal
vector<char> lemma(max(lemmas.max_length(), roots.max_length())); 2 0 2
vector<char> lemma(max(lemmas.max_length(), roots.max_length())); 0 0 0
vector<char> lemma(max(lemmas.max_length(), roots.max_length())); 0 0 0
1926 0 ▶ vector<char> root(max(lemmas.max_length(), roots.max_length()));
Branch: 3 branches
BranchTrueFalseTotal
vector<char> root(max(lemmas.max_length(), roots.max_length())); 2 0 2
vector<char> root(max(lemmas.max_length(), roots.max_length())); 0 0 0
vector<char> root(max(lemmas.max_length(), roots.max_length())); 0 0 0
1927 0 unsigned data_position = data.tell();
1928 0 ▶ for (int pass = 1; pass <= 2; pass++) {
Branch: 3 branches
BranchTrueFalseTotal
for (int pass = 1; pass <= 2; pass++) { 4 2 6
for (int pass = 1; pass <= 2; pass++) { 0 0 0
for (int pass = 1; pass <= 2; pass++) { 0 0 0
1929 0 ▶ if (pass > 1) data.seek(data_position);
Branch: 6 branches
BranchTrueFalseTotal
if (pass > 1) data.seek(data_position); 2 2 4
if (pass > 1) data.seek(data_position); 2 0 2
if (pass > 1) data.seek(data_position); 0 0 0
if (pass > 1) data.seek(data_position); 0 0 0
if (pass > 1) data.seek(data_position); 0 0 0
if (pass > 1) data.seek(data_position); 0 0 0
1930  
1931 0 int lemma_len = 0;
1932 0 int root_len = 0;
1933  
1934 0 ▶ for (int i = data.next_4B(); i > 0; i--) {
Branch: 6 branches
BranchTrueFalseTotal
for (int i = data.next_4B(); i > 0; i--) { 4 0 4
for (int i = data.next_4B(); i > 0; i--) { 8 4 12
for (int i = data.next_4B(); i > 0; i--) { 0 0 0
for (int i = data.next_4B(); i > 0; i--) { 0 0 0
for (int i = data.next_4B(); i > 0; i--) { 0 0 0
for (int i = data.next_4B(); i > 0; i--) { 0 0 0
1935 0 ▶ lemma_len -= data.next_1B();
Branch: 3 branches
BranchTrueFalseTotal
lemma_len -= data.next_1B(); 8 0 8
lemma_len -= data.next_1B(); 0 0 0
lemma_len -= data.next_1B(); 0 0 0
1936 0 ▶ for (int i = data.next_1B(); i > 0; i--)
Branch: 6 branches
BranchTrueFalseTotal
for (int i = data.next_1B(); i > 0; i--) 8 0 8
for (int i = data.next_1B(); i > 0; i--) 48 8 56
for (int i = data.next_1B(); i > 0; i--) 0 0 0
for (int i = data.next_1B(); i > 0; i--) 0 0 0
for (int i = data.next_1B(); i > 0; i--) 0 0 0
for (int i = data.next_1B(); i > 0; i--) 0 0 0
1937 0 ▶ lemma[lemma_len++] = data.next_1B();
Branch: 3 branches
BranchTrueFalseTotal
lemma[lemma_len++] = data.next_1B(); 48 0 48
lemma[lemma_len++] = data.next_1B(); 0 0 0
lemma[lemma_len++] = data.next_1B(); 0 0 0
1938 0 ▶ unsigned char lemma_info_len = data.next_1B();
Branch: 3 branches
BranchTrueFalseTotal
unsigned char lemma_info_len = data.next_1B(); 8 0 8
unsigned char lemma_info_len = data.next_1B(); 0 0 0
unsigned char lemma_info_len = data.next_1B(); 0 0 0
1939 0 ▶ const char* lemma_info = lemma_info_len ? data.next<char>(lemma_info_len) : nullptr;
Branch: 6 branches
BranchTrueFalseTotal
const char* lemma_info = lemma_info_len ? data.next<char>(lemma_info_len) : nullptr; 0 8 8
const char* lemma_info = lemma_info_len ? data.next<char>(lemma_info_len) : nullptr; 0 0 0
const char* lemma_info = lemma_info_len ? data.next<char>(lemma_info_len) : nullptr; 0 0 0
const char* lemma_info = lemma_info_len ? data.next<char>(lemma_info_len) : nullptr; 0 0 0
const char* lemma_info = lemma_info_len ? data.next<char>(lemma_info_len) : nullptr; 0 0 0
const char* lemma_info = lemma_info_len ? data.next<char>(lemma_info_len) : nullptr; 0 0 0
1940 0 ▶ unsigned lemma_roots = data.next_1B();
Branch: 3 branches
BranchTrueFalseTotal
unsigned lemma_roots = data.next_1B(); 8 0 8
unsigned lemma_roots = data.next_1B(); 0 0 0
unsigned lemma_roots = data.next_1B(); 0 0 0
1941  
1942 0 unsigned char* lemma_data /* to keep compiler happy */ = nullptr;
1943 0 unsigned lemma_offset /* to keep compiler happy */ = 0;
1944  
1945 0 ▶ if (pass == 1) {
Branch: 3 branches
BranchTrueFalseTotal
if (pass == 1) { 4 4 8
if (pass == 1) { 0 0 0
if (pass == 1) { 0 0 0
1946 0 ▶ lemmas.add(lemma.data(), lemma_len, 1 + lemma_info_len + 1 + lemma_roots * (sizeof(uint32_t) + sizeof(uint8_t) + sizeof(uint16_t)));
Branch: 3 branches
BranchTrueFalseTotal
lemmas.add(lemma.data(), lemma_len, 1 + lemma_info_len + 1 + lemma_roots * (sizeof(uint32_t) + sizeof(uint8_t) + sizeof(uint16_t))); 4 0 4
lemmas.add(lemma.data(), lemma_len, 1 + lemma_info_len + 1 + lemma_roots * (sizeof(uint32_t) + sizeof(uint8_t) + sizeof(uint16_t))); 0 0 0
lemmas.add(lemma.data(), lemma_len, 1 + lemma_info_len + 1 + lemma_roots * (sizeof(uint32_t) + sizeof(uint8_t) + sizeof(uint16_t))); 0 0 0
1947 } else /*if (pass == 2)*/ {
1948 0 ▶ lemma_data = lemmas.fill(lemma.data(), lemma_len, 1 + lemma_info_len + 1 + lemma_roots * (sizeof(uint32_t) + sizeof(uint8_t) + sizeof(uint16_t)));
Branch: 3 branches
BranchTrueFalseTotal
lemma_data = lemmas.fill(lemma.data(), lemma_len, 1 + lemma_info_len + 1 + lemma_roots * (sizeof(uint32_t) + sizeof(uint8_t) + sizeof(uint16_t))); 4 0 4
lemma_data = lemmas.fill(lemma.data(), lemma_len, 1 + lemma_info_len + 1 + lemma_roots * (sizeof(uint32_t) + sizeof(uint8_t) + sizeof(uint16_t))); 0 0 0
lemma_data = lemmas.fill(lemma.data(), lemma_len, 1 + lemma_info_len + 1 + lemma_roots * (sizeof(uint32_t) + sizeof(uint8_t) + sizeof(uint16_t))); 0 0 0
1949 0 lemma_offset = lemma_data - lemma_len - lemmas.data_start(lemma_len);
1950  
1951 0 *lemma_data++ = lemma_info_len;
1952 0 ▶ if (lemma_info_len) small_memcpy(lemma_data, lemma_info, lemma_info_len), lemma_data += lemma_info_len;
Branch: 3 branches
BranchTrueFalseTotal
if (lemma_info_len) small_memcpy(lemma_data, lemma_info, lemma_info_len), lemma_data += lemma_info_len; 0 4 4
if (lemma_info_len) small_memcpy(lemma_data, lemma_info, lemma_info_len), lemma_data += lemma_info_len; 0 0 0
if (lemma_info_len) small_memcpy(lemma_data, lemma_info, lemma_info_len), lemma_data += lemma_info_len; 0 0 0
1953 0 *lemma_data++ = lemma_roots;
1954 }
1955  
1956 0 small_memcpy(root.data(), lemma.data(), lemma_len); root_len = lemma_len;
1957 0 ▶ for (unsigned i = 0; i < lemma_roots; i++) {
Branch: 3 branches
BranchTrueFalseTotal
for (unsigned i = 0; i < lemma_roots; i++) { 28 8 36
for (unsigned i = 0; i < lemma_roots; i++) { 0 0 0
for (unsigned i = 0; i < lemma_roots; i++) { 0 0 0
1958 enum { REMOVE_START = 1, REMOVE_END = 2, ADD_START = 4, ADD_END = 8 };
1959 0 ▶ int operations = data.next_1B();
Branch: 3 branches
BranchTrueFalseTotal
int operations = data.next_1B(); 28 0 28
int operations = data.next_1B(); 0 0 0
int operations = data.next_1B(); 0 0 0
1960 0 ▶ if (operations & REMOVE_START) { int from = data.next_1B(), to = 0; while (from < root_len) root[to++] = root[from++]; root_len = to; }
Branch: 9 branches
BranchTrueFalseTotal
if (operations & REMOVE_START) { int from = data.next_1B(), to = 0; while (from < root_len) root[to++] = root[from++]; root_len = to; } 0 28 28
if (operations & REMOVE_START) { int from = data.next_1B(), to = 0; while (from < root_len) root[to++] = root[from++]; root_len = to; } 0 0 0
if (operations & REMOVE_START) { int from = data.next_1B(), to = 0; while (from < root_len) root[to++] = root[from++]; root_len = to; } 0 0 0
if (operations & REMOVE_START) { int from = data.next_1B(), to = 0; while (from < root_len) root[to++] = root[from++]; root_len = to; } 0 0 0
if (operations & REMOVE_START) { int from = data.next_1B(), to = 0; while (from < root_len) root[to++] = root[from++]; root_len = to; } 0 0 0
if (operations & REMOVE_START) { int from = data.next_1B(), to = 0; while (from < root_len) root[to++] = root[from++]; root_len = to; } 0 0 0
if (operations & REMOVE_START) { int from = data.next_1B(), to = 0; while (from < root_len) root[to++] = root[from++]; root_len = to; } 0 0 0
if (operations & REMOVE_START) { int from = data.next_1B(), to = 0; while (from < root_len) root[to++] = root[from++]; root_len = to; } 0 0 0
if (operations & REMOVE_START) { int from = data.next_1B(), to = 0; while (from < root_len) root[to++] = root[from++]; root_len = to; } 0 0 0
1961 0 ▶ if (operations & REMOVE_END) root_len -= data.next_1B();
Branch: 6 branches
BranchTrueFalseTotal
if (operations & REMOVE_END) root_len -= data.next_1B(); 24 4 28
if (operations & REMOVE_END) root_len -= data.next_1B(); 24 0 24
if (operations & REMOVE_END) root_len -= data.next_1B(); 0 0 0
if (operations & REMOVE_END) root_len -= data.next_1B(); 0 0 0
if (operations & REMOVE_END) root_len -= data.next_1B(); 0 0 0
if (operations & REMOVE_END) root_len -= data.next_1B(); 0 0 0
1962 0 ▶ if (operations & ADD_START) {
Branch: 3 branches
BranchTrueFalseTotal
if (operations & ADD_START) { 0 28 28
if (operations & ADD_START) { 0 0 0
if (operations & ADD_START) { 0 0 0
1963 0 ▶ int from = root_len, to = from + data.next_1B(); while (from > 0) root[--to] = root[--from]; root_len += to;
Branch: 6 branches
BranchTrueFalseTotal
int from = root_len, to = from + data.next_1B(); while (from > 0) root[--to] = root[--from]; root_len += to; 0 0 0
int from = root_len, to = from + data.next_1B(); while (from > 0) root[--to] = root[--from]; root_len += to; 0 0 0
int from = root_len, to = from + data.next_1B(); while (from > 0) root[--to] = root[--from]; root_len += to; 0 0 0
int from = root_len, to = from + data.next_1B(); while (from > 0) root[--to] = root[--from]; root_len += to; 0 0 0
int from = root_len, to = from + data.next_1B(); while (from > 0) root[--to] = root[--from]; root_len += to; 0 0 0
int from = root_len, to = from + data.next_1B(); while (from > 0) root[--to] = root[--from]; root_len += to; 0 0 0
1964 0 ▶ for (int i = 0; i < to; i++) root[i] = data.next_1B();
Branch: 6 branches
BranchTrueFalseTotal
for (int i = 0; i < to; i++) root[i] = data.next_1B(); 0 0 0
for (int i = 0; i < to; i++) root[i] = data.next_1B(); 0 0 0
for (int i = 0; i < to; i++) root[i] = data.next_1B(); 0 0 0
for (int i = 0; i < to; i++) root[i] = data.next_1B(); 0 0 0
for (int i = 0; i < to; i++) root[i] = data.next_1B(); 0 0 0
for (int i = 0; i < to; i++) root[i] = data.next_1B(); 0 0 0
1965 }
1966 0 ▶ if (operations & ADD_END)
Branch: 3 branches
BranchTrueFalseTotal
if (operations & ADD_END) 28 0 28
if (operations & ADD_END) 0 0 0
if (operations & ADD_END) 0 0 0
1967 0 ▶ for (int len = data.next_1B(); len > 0; len--)
Branch: 6 branches
BranchTrueFalseTotal
for (int len = data.next_1B(); len > 0; len--) 28 0 28
for (int len = data.next_1B(); len > 0; len--) 56 28 84
for (int len = data.next_1B(); len > 0; len--) 0 0 0
for (int len = data.next_1B(); len > 0; len--) 0 0 0
for (int len = data.next_1B(); len > 0; len--) 0 0 0
for (int len = data.next_1B(); len > 0; len--) 0 0 0
1968 0 ▶ root[root_len++] = data.next_1B();
Branch: 3 branches
BranchTrueFalseTotal
root[root_len++] = data.next_1B(); 56 0 56
root[root_len++] = data.next_1B(); 0 0 0
root[root_len++] = data.next_1B(); 0 0 0
1969 0 ▶ uint16_t clas = data.next_2B();
Branch: 3 branches
BranchTrueFalseTotal
uint16_t clas = data.next_2B(); 28 0 28
uint16_t clas = data.next_2B(); 0 0 0
uint16_t clas = data.next_2B(); 0 0 0
1970  
1971 0 ▶ if (pass == 1) { // for each root
Branch: 3 branches
BranchTrueFalseTotal
if (pass == 1) { // for each root 14 14 28
if (pass == 1) { // for each root 0 0 0
if (pass == 1) { // for each root 0 0 0
1972 0 ▶ roots.add(root.data(), root_len, sizeof(uint16_t) + sizeof(uint32_t) + sizeof(uint8_t));
Branch: 3 branches
BranchTrueFalseTotal
roots.add(root.data(), root_len, sizeof(uint16_t) + sizeof(uint32_t) + sizeof(uint8_t)); 14 0 14
roots.add(root.data(), root_len, sizeof(uint16_t) + sizeof(uint32_t) + sizeof(uint8_t)); 0 0 0
roots.add(root.data(), root_len, sizeof(uint16_t) + sizeof(uint32_t) + sizeof(uint8_t)); 0 0 0
1973 } else /*if (pass == 2)*/ {
1974 0 ▶ unsigned char* root_data = roots.fill(root.data(), root_len, sizeof(uint16_t) + sizeof(uint32_t) + sizeof(uint8_t));
Branch: 3 branches
BranchTrueFalseTotal
unsigned char* root_data = roots.fill(root.data(), root_len, sizeof(uint16_t) + sizeof(uint32_t) + sizeof(uint8_t)); 14 0 14
unsigned char* root_data = roots.fill(root.data(), root_len, sizeof(uint16_t) + sizeof(uint32_t) + sizeof(uint8_t)); 0 0 0
unsigned char* root_data = roots.fill(root.data(), root_len, sizeof(uint16_t) + sizeof(uint32_t) + sizeof(uint8_t)); 0 0 0
1975 0 unsigned root_offset = root_data - root_len - roots.data_start(root_len);
1976  
1977 0 unaligned_store_inc<uint16_t>(root_data, clas);
1978 0 unaligned_store_inc<uint32_t>(root_data, lemma_offset);
1979 0 unaligned_store_inc<uint8_t>(root_data, lemma_len);
1980 0 ▶ assert(uint8_t(lemma_len) == lemma_len);
Branch: 3 branches
BranchTrueFalseTotal
assert(uint8_t(lemma_len) == lemma_len); 0 14 14
assert(uint8_t(lemma_len) == lemma_len); 0 0 0
assert(uint8_t(lemma_len) == lemma_len); 0 0 0
1981  
1982 0 unaligned_store_inc<uint32_t>(lemma_data, root_offset);
1983 0 unaligned_store_inc<uint8_t>(lemma_data, root_len);
1984 0 unaligned_store_inc<uint16_t>(lemma_data, clas);
1985 0 ▶ assert(uint8_t(root_len) == root_len);
Branch: 3 branches
BranchTrueFalseTotal
assert(uint8_t(root_len) == root_len); 0 14 14
assert(uint8_t(root_len) == root_len); 0 0 0
assert(uint8_t(root_len) == root_len); 0 0 0
1986 }
1987 }
1988 }
1989  
1990 0 ▶ if (pass == 1) { // after the whole pass
Branch: 3 branches
BranchTrueFalseTotal
if (pass == 1) { // after the whole pass 2 2 4
if (pass == 1) { // after the whole pass 0 0 0
if (pass == 1) { // after the whole pass 0 0 0
1991 0 ▶ lemmas.done_adding();
Branch: 3 branches
BranchTrueFalseTotal
lemmas.done_adding(); 2 0 2
lemmas.done_adding(); 0 0 0
lemmas.done_adding(); 0 0 0
1992 0 ▶ roots.done_adding();
Branch: 3 branches
BranchTrueFalseTotal
roots.done_adding(); 2 0 2
roots.done_adding(); 0 0 0
roots.done_adding(); 0 0 0
1993 } else /*if (pass == 2)*/ {
1994 0 lemmas.done_filling();
1995 0 roots.done_filling();
1996 }
1997 }
1998  
1999 // Load tags
2000 0 ▶ tags.resize(data.next_2B());
Branch: 6 branches
BranchTrueFalseTotal
tags.resize(data.next_2B()); 2 0 2
tags.resize(data.next_2B()); 2 0 2
tags.resize(data.next_2B()); 0 0 0
tags.resize(data.next_2B()); 0 0 0
tags.resize(data.next_2B()); 0 0 0
tags.resize(data.next_2B()); 0 0 0
2001 0 ▶ for (auto&& tag : tags) {
Branch: 3 branches
BranchTrueFalseTotal
for (auto&& tag : tags) { 40 2 42
for (auto&& tag : tags) { 0 0 0
for (auto&& tag : tags) { 0 0 0
2002 0 ▶ tag.resize(data.next_1B());
Branch: 6 branches
BranchTrueFalseTotal
tag.resize(data.next_1B()); 40 0 40
tag.resize(data.next_1B()); 40 0 40
tag.resize(data.next_1B()); 0 0 0
tag.resize(data.next_1B()); 0 0 0
tag.resize(data.next_1B()); 0 0 0
tag.resize(data.next_1B()); 0 0 0
2003 0 ▶ for (unsigned i = 0; i < tag.size(); i++)
Branch: 3 branches
BranchTrueFalseTotal
for (unsigned i = 0; i < tag.size(); i++) 120 40 160
for (unsigned i = 0; i < tag.size(); i++) 0 0 0
for (unsigned i = 0; i < tag.size(); i++) 0 0 0
2004 0 ▶ tag[i] = data.next_1B();
Branch: 6 branches
BranchTrueFalseTotal
tag[i] = data.next_1B(); 120 0 120
tag[i] = data.next_1B(); 120 0 120
tag[i] = data.next_1B(); 0 0 0
tag[i] = data.next_1B(); 0 0 0
tag[i] = data.next_1B(); 0 0 0
tag[i] = data.next_1B(); 0 0 0
2005 }
2006  
2007 // Load suffixes
2008 0 ▶ suffixes.load(data);
Branch: 3 branches
BranchTrueFalseTotal
suffixes.load(data); 2 0 2
suffixes.load(data); 0 0 0
suffixes.load(data); 0 0 0
2009  
2010 // Fill classes from suffixes
2011 0 ▶ suffixes.iter_all([this](const char* suffix, int len, pointer_decoder& data) mutable {
Branch: 3 branches
BranchTrueFalseTotal
suffixes.iter_all([this](const char* suffix, int len, pointer_decoder& data) mutable { 2 0 2
suffixes.iter_all([this](const char* suffix, int len, pointer_decoder& data) mutable { 0 0 0
suffixes.iter_all([this](const char* suffix, int len, pointer_decoder& data) mutable { 0 0 0
2012 26 unsigned classes_len = data.next_2B();
2013 26 const uint16_t* classes_ptr = data.next<uint16_t>(classes_len);
2014 26 const uint16_t* indices_ptr = data.next<uint16_t>(classes_len);
2015 26 const uint16_t* tags_ptr = data.next<uint16_t>(data.next_2B());
2016  
2017 26 ▶ string suffix_str(suffix, len);
Branch: 3 branches
BranchTrueFalseTotal
string suffix_str(suffix, len); 26 0 26
string suffix_str(suffix, len); 0 0 0
string suffix_str(suffix, len); 0 0 0
2018 56 ▶ for (unsigned i = 0; i < classes_len; i++) {
Branch: 3 branches
BranchTrueFalseTotal
for (unsigned i = 0; i < classes_len; i++) { 30 26 56
for (unsigned i = 0; i < classes_len; i++) { 0 0 0
for (unsigned i = 0; i < classes_len; i++) { 0 0 0
2019 30 auto classes_ptr_i = unaligned_load<uint16_t>(classes_ptr + i);
2020 30 ▶ if (classes_ptr_i >= classes.size()) classes.resize(classes_ptr_i + 1);
Branch: 6 branches
BranchTrueFalseTotal
if (classes_ptr_i >= classes.size()) classes.resize(classes_ptr_i + 1); 10 20 30
if (classes_ptr_i >= classes.size()) classes.resize(classes_ptr_i + 1); 10 0 10
if (classes_ptr_i >= classes.size()) classes.resize(classes_ptr_i + 1); 0 0 0
if (classes_ptr_i >= classes.size()) classes.resize(classes_ptr_i + 1); 0 0 0
if (classes_ptr_i >= classes.size()) classes.resize(classes_ptr_i + 1); 0 0 0
if (classes_ptr_i >= classes.size()) classes.resize(classes_ptr_i + 1); 0 0 0
2021 30 ▶ classes[classes_ptr_i].emplace_back(suffix_str, vector<uint16_t>());
Branch: 3 branches
BranchTrueFalseTotal
classes[classes_ptr_i].emplace_back(suffix_str, vector<uint16_t>()); 30 0 30
classes[classes_ptr_i].emplace_back(suffix_str, vector<uint16_t>()); 0 0 0
classes[classes_ptr_i].emplace_back(suffix_str, vector<uint16_t>()); 0 0 0
2022 30 for (const uint16_t* ptr = tags_ptr + unaligned_load<uint16_t>(indices_ptr + i),
2023 30 * end = tags_ptr + unaligned_load<uint16_t>(indices_ptr + i + 1);
2024 70 ▶ ptr < end; ptr++)
Branch: 3 branches
BranchTrueFalseTotal
ptr < end; ptr++) 40 30 70
ptr < end; ptr++) 0 0 0
ptr < end; ptr++) 0 0 0
2025 40 ▶ classes[classes_ptr_i].back().second.emplace_back(unaligned_load<uint16_t>(ptr));
Branch: 3 branches
BranchTrueFalseTotal
classes[classes_ptr_i].back().second.emplace_back(unaligned_load<uint16_t>(ptr)); 40 0 40
classes[classes_ptr_i].back().second.emplace_back(unaligned_load<uint16_t>(ptr)); 0 0 0
classes[classes_ptr_i].back().second.emplace_back(unaligned_load<uint16_t>(ptr)); 0 0 0
2026 }
2027 26 });
2028 0 }
2029  
2030 template <class LemmaAddinfo>
2031 0 void morpho_dictionary<LemmaAddinfo>::analyze(string_piece form, vector<tagged_lemma>& lemmas) const {
2032 0 int max_suffix_len = suffixes.max_length();
2033  
2034 0 uint16_t* suff_stack[16]; vector<uint16_t*> suff_heap;
2035 0 ▶ uint16_t** suff = max_suffix_len <= 16 ? suff_stack : (suff_heap.resize(max_suffix_len), suff_heap.data());
Branch: 6 branches
BranchTrueFalseTotal
uint16_t** suff = max_suffix_len <= 16 ? suff_stack : (suff_heap.resize(max_suffix_len), suff_heap.data()); 15 0 15
uint16_t** suff = max_suffix_len <= 16 ? suff_stack : (suff_heap.resize(max_suffix_len), suff_heap.data()); 0 0 0
uint16_t** suff = max_suffix_len <= 16 ? suff_stack : (suff_heap.resize(max_suffix_len), suff_heap.data()); 0 0 0
uint16_t** suff = max_suffix_len <= 16 ? suff_stack : (suff_heap.resize(max_suffix_len), suff_heap.data()); 0 0 0
uint16_t** suff = max_suffix_len <= 16 ? suff_stack : (suff_heap.resize(max_suffix_len), suff_heap.data()); 0 0 0
uint16_t** suff = max_suffix_len <= 16 ? suff_stack : (suff_heap.resize(max_suffix_len), suff_heap.data()); 0 0 0
2036 0 int suff_len = 0;
2037 0 ▶ for (int i = form.len; i >= 0 && suff_len < max_suffix_len; i--, suff_len++) {
Branch: 6 branches
BranchTrueFalseTotal
for (int i = form.len; i >= 0 && suff_len < max_suffix_len; i--, suff_len++) { 36 0 36
for (int i = form.len; i >= 0 && suff_len < max_suffix_len; i--, suff_len++) { 36 0 36
for (int i = form.len; i >= 0 && suff_len < max_suffix_len; i--, suff_len++) { 0 0 0
for (int i = form.len; i >= 0 && suff_len < max_suffix_len; i--, suff_len++) { 0 0 0
for (int i = form.len; i >= 0 && suff_len < max_suffix_len; i--, suff_len++) { 0 0 0
for (int i = form.len; i >= 0 && suff_len < max_suffix_len; i--, suff_len++) { 0 0 0
2038 0 ▶ suff[suff_len] = (uint16_t*) suffixes.at(form.str + i, suff_len, [](pointer_decoder& data) {
Branch: 3 branches
BranchTrueFalseTotal
suff[suff_len] = (uint16_t*) suffixes.at(form.str + i, suff_len, [](pointer_decoder& data) { 36 0 36
suff[suff_len] = (uint16_t*) suffixes.at(form.str + i, suff_len, [](pointer_decoder& data) { 0 0 0
suff[suff_len] = (uint16_t*) suffixes.at(form.str + i, suff_len, [](pointer_decoder& data) { 0 0 0
2039 0 data.next<uint16_t>(2 * data.next_2B());
2040 0 data.next<uint16_t>(data.next_2B());
2041 });
2042 0 ▶ if (!suff[suff_len]) break;
Branch: 3 branches
BranchTrueFalseTotal
if (!suff[suff_len]) break; 15 21 36
if (!suff[suff_len]) break; 0 0 0
if (!suff[suff_len]) break; 0 0 0
2043 }
2044  
2045 0 ▶ for (int root_len = int(form.len) - --suff_len; suff_len >= 0 && root_len < int(roots.max_length()); suff_len--, root_len++)
Branch: 9 branches
BranchTrueFalseTotal
for (int root_len = int(form.len) - --suff_len; suff_len >= 0 && root_len < int(roots.max_length()); suff_len--, root_len++) 21 15 36
for (int root_len = int(form.len) - --suff_len; suff_len >= 0 && root_len < int(roots.max_length()); suff_len--, root_len++) 21 0 21
for (int root_len = int(form.len) - --suff_len; suff_len >= 0 && root_len < int(roots.max_length()); suff_len--, root_len++) 21 15 36
for (int root_len = int(form.len) - --suff_len; suff_len >= 0 && root_len < int(roots.max_length()); suff_len--, root_len++) 0 0 0
for (int root_len = int(form.len) - --suff_len; suff_len >= 0 && root_len < int(roots.max_length()); suff_len--, root_len++) 0 0 0
for (int root_len = int(form.len) - --suff_len; suff_len >= 0 && root_len < int(roots.max_length()); suff_len--, root_len++) 0 0 0
for (int root_len = int(form.len) - --suff_len; suff_len >= 0 && root_len < int(roots.max_length()); suff_len--, root_len++) 0 0 0
for (int root_len = int(form.len) - --suff_len; suff_len >= 0 && root_len < int(roots.max_length()); suff_len--, root_len++) 0 0 0
for (int root_len = int(form.len) - --suff_len; suff_len >= 0 && root_len < int(roots.max_length()); suff_len--, root_len++) 0 0 0
2046 0 ▶ if (unaligned_load<uint16_t>(suff[suff_len])) {
Branch: 3 branches
BranchTrueFalseTotal
if (unaligned_load<uint16_t>(suff[suff_len])) { 21 0 21
if (unaligned_load<uint16_t>(suff[suff_len])) { 0 0 0
if (unaligned_load<uint16_t>(suff[suff_len])) { 0 0 0
2047 0 unsigned suff_classes = unaligned_load<uint16_t>(suff[suff_len]);
2048 0 uint16_t* suff_data = suff[suff_len] + 1;
2049  
2050 0 ▶ roots.iter(form.str, root_len, [&](const char* root, pointer_decoder& root_data) {
Branch: 3 branches
BranchTrueFalseTotal
roots.iter(form.str, root_len, [&](const char* root, pointer_decoder& root_data) { 21 0 21
roots.iter(form.str, root_len, [&](const char* root, pointer_decoder& root_data) { 0 0 0
roots.iter(form.str, root_len, [&](const char* root, pointer_decoder& root_data) { 0 0 0
2051 20 uint16_t root_class = root_data.next_2B();
2052 20 unsigned lemma_offset = root_data.next_4B();
2053 20 unsigned lemma_len = root_data.next_1B();
2054  
2055 20 ▶ if (small_memeq(form.str, root, root_len)) {
Branch: 3 branches
BranchTrueFalseTotal
if (small_memeq(form.str, root, root_len)) { 6 14 20
if (small_memeq(form.str, root, root_len)) { 0 0 0
if (small_memeq(form.str, root, root_len)) { 0 0 0
2056 6 uint16_t* suffix_class_ptr = unaligned_lower_bound(suff_data, suff_classes, root_class);
2057 6 ▶ if (suffix_class_ptr < suff_data + suff_classes && unaligned_load<uint16_t>(suffix_class_ptr) == root_class) {
Branch: 5 branches
BranchTrueFalseTotal
if (suffix_class_ptr < suff_data + suff_classes && unaligned_load<uint16_t>(suffix_class_ptr) == root_class) { 6 0 6
if (suffix_class_ptr < suff_data + suff_classes && unaligned_load<uint16_t>(suffix_class_ptr) == root_class) { 6 0 6
if (suffix_class_ptr < suff_data + suff_classes && unaligned_load<uint16_t>(suffix_class_ptr) == root_class) { 0 0 0
if (suffix_class_ptr < suff_data + suff_classes && unaligned_load<uint16_t>(suffix_class_ptr) == root_class) { 0 0 0
if (suffix_class_ptr < suff_data + suff_classes && unaligned_load<uint16_t>(suffix_class_ptr) == root_class) { 0 0 0
2058 6 const unsigned char* lemma_data = this->lemmas.data_start(lemma_len) + lemma_offset;
2059 6 ▶ string lemma((const char*)lemma_data, lemma_len);
Branch: 3 branches
BranchTrueFalseTotal
string lemma((const char*)lemma_data, lemma_len); 6 0 6
string lemma((const char*)lemma_data, lemma_len); 0 0 0
string lemma((const char*)lemma_data, lemma_len); 0 0 0
2060 6 ▶ if (lemma_data[lemma_len]) lemma += LemmaAddinfo::format(lemma_data + lemma_len + 1, lemma_data[lemma_len]);
Branch: 8 branches
BranchTrueFalseTotal
if (lemma_data[lemma_len]) lemma += LemmaAddinfo::format(lemma_data + lemma_len + 1, lemma_data[lemma_len]); 0 6 6
if (lemma_data[lemma_len]) lemma += LemmaAddinfo::format(lemma_data + lemma_len + 1, lemma_data[lemma_len]); 0 0 0
if (lemma_data[lemma_len]) lemma += LemmaAddinfo::format(lemma_data + lemma_len + 1, lemma_data[lemma_len]); 0 0 0
if (lemma_data[lemma_len]) lemma += LemmaAddinfo::format(lemma_data + lemma_len + 1, lemma_data[lemma_len]); 0 0 0
if (lemma_data[lemma_len]) lemma += LemmaAddinfo::format(lemma_data + lemma_len + 1, lemma_data[lemma_len]); 0 0 0
if (lemma_data[lemma_len]) lemma += LemmaAddinfo::format(lemma_data + lemma_len + 1, lemma_data[lemma_len]); 0 0 0
if (lemma_data[lemma_len]) lemma += LemmaAddinfo::format(lemma_data + lemma_len + 1, lemma_data[lemma_len]); 0 0 0
if (lemma_data[lemma_len]) lemma += LemmaAddinfo::format(lemma_data + lemma_len + 1, lemma_data[lemma_len]); 0 0 0
2061  
2062 6 uint16_t* suff_tag_indices = suff_data + suff_classes;
2063 6 uint16_t* suff_tags = suff_tag_indices + suff_classes + 1;
2064 23 for (unsigned i = unaligned_load<uint16_t>(suff_tag_indices + (suffix_class_ptr - suff_data));
2065 23 ▶ i < unaligned_load<uint16_t>(suff_tag_indices + (suffix_class_ptr - suff_data) + 1); i++)
Branch: 3 branches
BranchTrueFalseTotal
i < unaligned_load<uint16_t>(suff_tag_indices + (suffix_class_ptr - suff_data) + 1); i++) 17 6 23
i < unaligned_load<uint16_t>(suff_tag_indices + (suffix_class_ptr - suff_data) + 1); i++) 0 0 0
i < unaligned_load<uint16_t>(suff_tag_indices + (suffix_class_ptr - suff_data) + 1); i++) 0 0 0
2066 17 ▶ lemmas.emplace_back(lemma, tags[unaligned_load<uint16_t>(suff_tags + i)]);
Branch: 3 branches
BranchTrueFalseTotal
lemmas.emplace_back(lemma, tags[unaligned_load<uint16_t>(suff_tags + i)]); 17 0 17
lemmas.emplace_back(lemma, tags[unaligned_load<uint16_t>(suff_tags + i)]); 0 0 0
lemmas.emplace_back(lemma, tags[unaligned_load<uint16_t>(suff_tags + i)]); 0 0 0
2067 6 }
2068 }
2069 });
2070 }
2071 0 }
2072  
2073 template <class LemmaAddinfo>
2074 0 bool morpho_dictionary<LemmaAddinfo>::generate(string_piece lemma, const tag_filter& filter, vector<tagged_lemma_forms>& lemmas_forms) const {
2075 0 LemmaAddinfo addinfo;
2076 0 ▶ int raw_lemma_len = addinfo.parse(lemma);
Branch: 2 branches
BranchTrueFalseTotal
int raw_lemma_len = addinfo.parse(lemma); 0 0 0
int raw_lemma_len = addinfo.parse(lemma); 0 0 0
2077 0 bool matched_lemma = false;
2078  
2079 0 ▶ lemmas.iter(lemma.str, raw_lemma_len, [&](const char* lemma_str, pointer_decoder& data) {
Branch: 3 branches
BranchTrueFalseTotal
lemmas.iter(lemma.str, raw_lemma_len, [&](const char* lemma_str, pointer_decoder& data) { 4 0 4
lemmas.iter(lemma.str, raw_lemma_len, [&](const char* lemma_str, pointer_decoder& data) { 0 0 0
lemmas.iter(lemma.str, raw_lemma_len, [&](const char* lemma_str, pointer_decoder& data) { 0 0 0
2080 4 unsigned lemma_info_len = data.next_1B();
2081 4 const auto* lemma_info = data.next<unsigned char>(lemma_info_len);
2082 4 unsigned lemma_roots_len = data.next_1B();
2083 4 auto* lemma_roots_ptr = data.next<unsigned char>(lemma_roots_len * (sizeof(uint32_t) + sizeof(uint8_t) + sizeof(uint16_t)));
2084  
2085 4 ▶ if (small_memeq(lemma.str, lemma_str, raw_lemma_len) && addinfo.match_lemma_id(lemma_info, lemma_info_len) && LemmaAddinfo::generatable(lemma_info, lemma_info_len)) {
Branch: 12 branches
BranchTrueFalseTotal
if (small_memeq(lemma.str, lemma_str, raw_lemma_len) && addinfo.match_lemma_id(lemma_info, lemma_info_len) && LemmaAddinfo::generatable(lemma_info, lemma_info_len)) { 4 0 4
if (small_memeq(lemma.str, lemma_str, raw_lemma_len) && addinfo.match_lemma_id(lemma_info, lemma_info_len) && LemmaAddinfo::generatable(lemma_info, lemma_info_len)) { 4 0 4
if (small_memeq(lemma.str, lemma_str, raw_lemma_len) && addinfo.match_lemma_id(lemma_info, lemma_info_len) && LemmaAddinfo::generatable(lemma_info, lemma_info_len)) { 4 0 4
if (small_memeq(lemma.str, lemma_str, raw_lemma_len) && addinfo.match_lemma_id(lemma_info, lemma_info_len) && LemmaAddinfo::generatable(lemma_info, lemma_info_len)) { 4 0 4
if (small_memeq(lemma.str, lemma_str, raw_lemma_len) && addinfo.match_lemma_id(lemma_info, lemma_info_len) && LemmaAddinfo::generatable(lemma_info, lemma_info_len)) { 0 0 0
if (small_memeq(lemma.str, lemma_str, raw_lemma_len) && addinfo.match_lemma_id(lemma_info, lemma_info_len) && LemmaAddinfo::generatable(lemma_info, lemma_info_len)) { 0 0 0
if (small_memeq(lemma.str, lemma_str, raw_lemma_len) && addinfo.match_lemma_id(lemma_info, lemma_info_len) && LemmaAddinfo::generatable(lemma_info, lemma_info_len)) { 0 0 0
if (small_memeq(lemma.str, lemma_str, raw_lemma_len) && addinfo.match_lemma_id(lemma_info, lemma_info_len) && LemmaAddinfo::generatable(lemma_info, lemma_info_len)) { 0 0 0
if (small_memeq(lemma.str, lemma_str, raw_lemma_len) && addinfo.match_lemma_id(lemma_info, lemma_info_len) && LemmaAddinfo::generatable(lemma_info, lemma_info_len)) { 0 0 0
if (small_memeq(lemma.str, lemma_str, raw_lemma_len) && addinfo.match_lemma_id(lemma_info, lemma_info_len) && LemmaAddinfo::generatable(lemma_info, lemma_info_len)) { 0 0 0
if (small_memeq(lemma.str, lemma_str, raw_lemma_len) && addinfo.match_lemma_id(lemma_info, lemma_info_len) && LemmaAddinfo::generatable(lemma_info, lemma_info_len)) { 0 0 0
if (small_memeq(lemma.str, lemma_str, raw_lemma_len) && addinfo.match_lemma_id(lemma_info, lemma_info_len) && LemmaAddinfo::generatable(lemma_info, lemma_info_len)) { 0 0 0
2086 4 matched_lemma = true;
2087  
2088 4 vector<tagged_form>* forms = nullptr;
2089 4 pointer_decoder lemma_roots(lemma_roots_ptr);
2090 18 ▶ for (unsigned i = 0; i < lemma_roots_len; i++) {
Branch: 3 branches
BranchTrueFalseTotal
for (unsigned i = 0; i < lemma_roots_len; i++) { 14 4 18
for (unsigned i = 0; i < lemma_roots_len; i++) { 0 0 0
for (unsigned i = 0; i < lemma_roots_len; i++) { 0 0 0
2091 14 unsigned root_offset = lemma_roots.next_4B();
2092 14 unsigned root_len = lemma_roots.next_1B();
2093 14 unsigned clas = lemma_roots.next_2B();
2094  
2095 14 const unsigned char* root_data = roots.data_start(root_len) + root_offset;
2096 44 ▶ for (auto&& suffix : classes[clas]) {
Branch: 3 branches
BranchTrueFalseTotal
for (auto&& suffix : classes[clas]) { 30 14 44
for (auto&& suffix : classes[clas]) { 0 0 0
for (auto&& suffix : classes[clas]) { 0 0 0
2097 30 string root_with_suffix;
2098 70 ▶ for (auto&& tag : suffix.second)
Branch: 3 branches
BranchTrueFalseTotal
for (auto&& tag : suffix.second) 40 30 70
for (auto&& tag : suffix.second) 0 0 0
for (auto&& tag : suffix.second) 0 0 0
2099 40 ▶ if (filter.matches(tags[tag].c_str())) {
Branch: 3 branches
BranchTrueFalseTotal
if (filter.matches(tags[tag].c_str())) { 23 17 40
if (filter.matches(tags[tag].c_str())) { 0 0 0
if (filter.matches(tags[tag].c_str())) { 0 0 0
2100 23 ▶ if (!forms) {
Branch: 3 branches
BranchTrueFalseTotal
if (!forms) { 4 19 23
if (!forms) { 0 0 0
if (!forms) { 0 0 0
2101 12 ▶ lemmas_forms.emplace_back(string(lemma.str, raw_lemma_len) + LemmaAddinfo::format(lemma_info, lemma_info_len));
Branch: 11 branches
BranchTrueFalseTotal
lemmas_forms.emplace_back(string(lemma.str, raw_lemma_len) + LemmaAddinfo::format(lemma_info, lemma_info_len)); 4 0 4
lemmas_forms.emplace_back(string(lemma.str, raw_lemma_len) + LemmaAddinfo::format(lemma_info, lemma_info_len)); 4 0 4
lemmas_forms.emplace_back(string(lemma.str, raw_lemma_len) + LemmaAddinfo::format(lemma_info, lemma_info_len)); 4 0 4
lemmas_forms.emplace_back(string(lemma.str, raw_lemma_len) + LemmaAddinfo::format(lemma_info, lemma_info_len)); 0 0 0
lemmas_forms.emplace_back(string(lemma.str, raw_lemma_len) + LemmaAddinfo::format(lemma_info, lemma_info_len)); 0 0 0
lemmas_forms.emplace_back(string(lemma.str, raw_lemma_len) + LemmaAddinfo::format(lemma_info, lemma_info_len)); 0 0 0
lemmas_forms.emplace_back(string(lemma.str, raw_lemma_len) + LemmaAddinfo::format(lemma_info, lemma_info_len)); 0 0 0
lemmas_forms.emplace_back(string(lemma.str, raw_lemma_len) + LemmaAddinfo::format(lemma_info, lemma_info_len)); 0 0 0
lemmas_forms.emplace_back(string(lemma.str, raw_lemma_len) + LemmaAddinfo::format(lemma_info, lemma_info_len)); 0 0 0
lemmas_forms.emplace_back(string(lemma.str, raw_lemma_len) + LemmaAddinfo::format(lemma_info, lemma_info_len)); 0 0 0
lemmas_forms.emplace_back(string(lemma.str, raw_lemma_len) + LemmaAddinfo::format(lemma_info, lemma_info_len)); 0 0 0
2102 4 forms = &lemmas_forms.back().forms;
2103 }
2104  
2105 23 ▶ if (root_with_suffix.empty() && root_len + suffix.first.size()) {
Branch: 9 branches
BranchTrueFalseTotal
if (root_with_suffix.empty() && root_len + suffix.first.size()) { 18 5 23
if (root_with_suffix.empty() && root_len + suffix.first.size()) { 18 0 18
if (root_with_suffix.empty() && root_len + suffix.first.size()) { 18 5 23
if (root_with_suffix.empty() && root_len + suffix.first.size()) { 0 0 0
if (root_with_suffix.empty() && root_len + suffix.first.size()) { 0 0 0
if (root_with_suffix.empty() && root_len + suffix.first.size()) { 0 0 0
if (root_with_suffix.empty() && root_len + suffix.first.size()) { 0 0 0
if (root_with_suffix.empty() && root_len + suffix.first.size()) { 0 0 0
if (root_with_suffix.empty() && root_len + suffix.first.size()) { 0 0 0
2106 18 ▶ root_with_suffix.reserve(root_len + suffix.first.size());
Branch: 3 branches
BranchTrueFalseTotal
root_with_suffix.reserve(root_len + suffix.first.size()); 18 0 18
root_with_suffix.reserve(root_len + suffix.first.size()); 0 0 0
root_with_suffix.reserve(root_len + suffix.first.size()); 0 0 0
2107 18 ▶ root_with_suffix.assign((const char*)root_data, root_len);
Branch: 3 branches
BranchTrueFalseTotal
root_with_suffix.assign((const char*)root_data, root_len); 18 0 18
root_with_suffix.assign((const char*)root_data, root_len); 0 0 0
root_with_suffix.assign((const char*)root_data, root_len); 0 0 0
2108 18 ▶ root_with_suffix.append(suffix.first);
Branch: 3 branches
BranchTrueFalseTotal
root_with_suffix.append(suffix.first); 18 0 18
root_with_suffix.append(suffix.first); 0 0 0
root_with_suffix.append(suffix.first); 0 0 0
2109 }
2110  
2111 23 ▶ forms->emplace_back(root_with_suffix, tags[tag]);
Branch: 3 branches
BranchTrueFalseTotal
forms->emplace_back(root_with_suffix, tags[tag]); 23 0 23
forms->emplace_back(root_with_suffix, tags[tag]); 0 0 0
forms->emplace_back(root_with_suffix, tags[tag]); 0 0 0
2112 }
2113 }
2114 }
2115 }
2116 });
2117  
2118 0 return matched_lemma;
2119 0 }
2120  
2121 /////////
2122 // File: morpho/morpho_prefix_guesser.h
2123 /////////
2124  
2125 // This file is part of MorphoDiTa <http://github.com/ufal/morphodita/>.
2126 //
2127 // Copyright 2015 Institute of Formal and Applied Linguistics, Faculty of
2128 // Mathematics and Physics, Charles University in Prague, Czech Republic.
2129 //
2130 // This Source Code Form is subject to the terms of the Mozilla Public
2131 // License, v. 2.0. If a copy of the MPL was not distributed with this
2132 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
2133  
2134 // Declarations
2135 template <class MorphoDictionary>
2136 class morpho_prefix_guesser {
2137 public:
2138 0 morpho_prefix_guesser(const MorphoDictionary& dictionary) : dictionary(dictionary) {}
2139  
2140 void load(binary_decoder& data);
2141 void analyze(string_piece form, vector<tagged_lemma>& lemmas);
2142 bool generate(string_piece lemma, const tag_filter& filter, vector<tagged_lemma_forms>& lemmas_forms);
2143  
2144 private:
2145 const MorphoDictionary& dictionary;
2146 vector<tag_filter> tag_filters;
2147 persistent_unordered_map prefixes_initial, prefixes_middle;
2148 };
2149  
2150 // Definitions
2151 template <class MorphoDictionary>
2152 0 void morpho_prefix_guesser<MorphoDictionary>::load(binary_decoder& data) {
2153 // Load and construct tag filters
2154 0 ▶ for (unsigned tag_filters_len = data.next_1B(); tag_filters_len; tag_filters_len--) {
Branch: 1 branch
BranchTrueFalseTotal
for (unsigned tag_filters_len = data.next_1B(); tag_filters_len; tag_filters_len--) { 0 0 0
2155 0 ▶ unsigned tag_filter_len = data.next_1B();
Branch: 1 branch
BranchTrueFalseTotal
unsigned tag_filter_len = data.next_1B(); 0 0 0
2156 0 ▶ string tag_filter(data.next<char>(tag_filter_len), tag_filter_len);
Branch: 2 branches
BranchTrueFalseTotal
string tag_filter(data.next<char>(tag_filter_len), tag_filter_len); 0 0 0
string tag_filter(data.next<char>(tag_filter_len), tag_filter_len); 0 0 0
2157  
2158 0 ▶ tag_filters.emplace_back(tag_filter.c_str());
Branch: 1 branch
BranchTrueFalseTotal
tag_filters.emplace_back(tag_filter.c_str()); 0 0 0
2159 }
2160  
2161 // Load prefixes
2162 0 prefixes_initial.load(data);
2163 0 prefixes_middle.load(data);
2164 0 }
2165  
2166 // Analyze can return non-unique lemma-tag pairs.
2167 template <class MorphoDictionary>
2168 0 void morpho_prefix_guesser<MorphoDictionary>::analyze(string_piece form, vector<tagged_lemma>& lemmas) {
2169 0 ▶ if (!form.len) return;
Branch: 1 branch
BranchTrueFalseTotal
if (!form.len) return; 0 0 0
2170  
2171 0 vector<char> form_tmp;
2172 0 vector<unsigned> middle_masks;
2173 0 ▶ middle_masks.reserve(form.len);
Branch: 1 branch
BranchTrueFalseTotal
middle_masks.reserve(form.len); 0 0 0
2174  
2175 0 ▶ for (unsigned initial = 0; initial < form.len; initial++) {
Branch: 1 branch
BranchTrueFalseTotal
for (unsigned initial = 0; initial < form.len; initial++) { 0 0 0
2176 // Match the initial prefix.
2177 0 unsigned initial_mask = (1<<tag_filters.size()) - 1; // full mask for empty initial prefix
2178 0 ▶ if (initial) {
Branch: 1 branch
BranchTrueFalseTotal
if (initial) { 0 0 0
2179 0 ▶ auto found = prefixes_initial.at_typed<uint32_t>(form.str, initial);
Branch: 1 branch
BranchTrueFalseTotal
auto found = prefixes_initial.at_typed<uint32_t>(form.str, initial); 0 0 0
2180 0 ▶ if (!found) break;
Branch: 1 branch
BranchTrueFalseTotal
if (!found) break; 0 0 0
2181 0 initial_mask = unaligned_load<uint32_t>(found);
2182 }
2183  
2184 // If we have found an initial prefix (including the empty one), match middle prefixes.
2185 0 ▶ if (initial_mask) {
Branch: 1 branch
BranchTrueFalseTotal
if (initial_mask) { 0 0 0
2186 0 ▶ middle_masks.resize(initial);
Branch: 1 branch
BranchTrueFalseTotal
middle_masks.resize(initial); 0 0 0
2187 0 ▶ middle_masks.emplace_back(initial_mask);
Branch: 1 branch
BranchTrueFalseTotal
middle_masks.emplace_back(initial_mask); 0 0 0
2188 0 ▶ for (unsigned middle = initial; middle < middle_masks.size(); middle++) {
Branch: 1 branch
BranchTrueFalseTotal
for (unsigned middle = initial; middle < middle_masks.size(); middle++) { 0 0 0
2189 0 ▶ if (!middle_masks[middle]) continue;
Branch: 1 branch
BranchTrueFalseTotal
if (!middle_masks[middle]) continue; 0 0 0
2190 // Try matching middle prefixes from current index.
2191 0 ▶ for (unsigned i = middle + 1; i < form.len; i++) {
Branch: 1 branch
BranchTrueFalseTotal
for (unsigned i = middle + 1; i < form.len; i++) { 0 0 0
2192 0 ▶ auto found = prefixes_middle.at_typed<uint32_t>(form.str + middle, i - middle);
Branch: 1 branch
BranchTrueFalseTotal
auto found = prefixes_middle.at_typed<uint32_t>(form.str + middle, i - middle); 0 0 0
2193 0 ▶ if (!found) break;
Branch: 1 branch
BranchTrueFalseTotal
if (!found) break; 0 0 0
2194 0 ▶ if (unaligned_load<uint32_t>(found)) {
Branch: 1 branch
BranchTrueFalseTotal
if (unaligned_load<uint32_t>(found)) { 0 0 0
2195 0 ▶ if (i + 1 > middle_masks.size()) middle_masks.resize(i + 1);
Branch: 2 branches
BranchTrueFalseTotal
if (i + 1 > middle_masks.size()) middle_masks.resize(i + 1); 0 0 0
if (i + 1 > middle_masks.size()) middle_masks.resize(i + 1); 0 0 0
2196 0 middle_masks[i] |= middle_masks[middle] & unaligned_load<uint32_t>(found);
2197 }
2198 }
2199  
2200 // Try matching word forms if at least one middle prefix was found.
2201 0 ▶ if (middle > initial && middle < form.len ) {
Branch: 2 branches
BranchTrueFalseTotal
if (middle > initial && middle < form.len ) { 0 0 0
if (middle > initial && middle < form.len ) { 0 0 0
2202 0 ▶ if (initial) {
Branch: 1 branch
BranchTrueFalseTotal
if (initial) { 0 0 0
2203 0 ▶ if (form_tmp.empty()) form_tmp.assign(form.str, form.str + form.len);
Branch: 2 branches
BranchTrueFalseTotal
if (form_tmp.empty()) form_tmp.assign(form.str, form.str + form.len); 0 0 0
if (form_tmp.empty()) form_tmp.assign(form.str, form.str + form.len); 0 0 0
2204 0 small_memcpy(form_tmp.data() + middle - initial, form.str, initial);
2205 }
2206 0 unsigned lemmas_ori_size = lemmas.size();
2207 0 ▶ dictionary.analyze(string_piece((initial ? form_tmp.data() : form.str) + middle - initial, form.len - middle + initial), lemmas);
Branch: 2 branches
BranchTrueFalseTotal
dictionary.analyze(string_piece((initial ? form_tmp.data() : form.str) + middle - initial, form.len - middle + initial), lemmas); 0 0 0
dictionary.analyze(string_piece((initial ? form_tmp.data() : form.str) + middle - initial, form.len - middle + initial), lemmas); 0 0 0
2208 0 unsigned lemmas_new_size = lemmas_ori_size;
2209 0 ▶ for (unsigned i = lemmas_ori_size; i < lemmas.size(); i++) {
Branch: 1 branch
BranchTrueFalseTotal
for (unsigned i = lemmas_ori_size; i < lemmas.size(); i++) { 0 0 0
2210 0 ▶ for (unsigned filter = 0; filter < tag_filters.size(); filter++)
Branch: 1 branch
BranchTrueFalseTotal
for (unsigned filter = 0; filter < tag_filters.size(); filter++) 0 0 0
2211 0 ▶ if ((middle_masks[middle] & (1<<filter)) && tag_filters[filter].matches(lemmas[i].tag.c_str())) {
Branch: 3 branches
BranchTrueFalseTotal
if ((middle_masks[middle] & (1<<filter)) && tag_filters[filter].matches(lemmas[i].tag.c_str())) { 0 0 0
if ((middle_masks[middle] & (1<<filter)) && tag_filters[filter].matches(lemmas[i].tag.c_str())) { 0 0 0
if ((middle_masks[middle] & (1<<filter)) && tag_filters[filter].matches(lemmas[i].tag.c_str())) { 0 0 0
2212 0 ▶ if (i == lemmas_new_size) {
Branch: 1 branch
BranchTrueFalseTotal
if (i == lemmas_new_size) { 0 0 0
2213 0 ▶ lemmas[lemmas_new_size].lemma.insert(0, form.str + initial, middle - initial);
Branch: 1 branch
BranchTrueFalseTotal
lemmas[lemmas_new_size].lemma.insert(0, form.str + initial, middle - initial); 0 0 0
2214 } else {
2215 0 ▶ lemmas[lemmas_new_size].lemma.reserve(lemmas[i].lemma.size() + middle - initial);
Branch: 1 branch
BranchTrueFalseTotal
lemmas[lemmas_new_size].lemma.reserve(lemmas[i].lemma.size() + middle - initial); 0 0 0
2216 0 ▶ lemmas[lemmas_new_size].lemma.assign(form.str + initial, middle - initial);
Branch: 1 branch
BranchTrueFalseTotal
lemmas[lemmas_new_size].lemma.assign(form.str + initial, middle - initial); 0 0 0
2217 0 ▶ lemmas[lemmas_new_size].lemma.append(lemmas[i].lemma);
Branch: 1 branch
BranchTrueFalseTotal
lemmas[lemmas_new_size].lemma.append(lemmas[i].lemma); 0 0 0
2218 0 ▶ lemmas[lemmas_new_size].tag = lemmas[i].tag;
Branch: 1 branch
BranchTrueFalseTotal
lemmas[lemmas_new_size].tag = lemmas[i].tag; 0 0 0
2219 }
2220 0 lemmas_new_size++;
2221 0 break;
2222 }
2223 }
2224 0 ▶ if (lemmas_new_size < lemmas.size()) lemmas.erase(lemmas.begin() + lemmas_new_size, lemmas.end());
Branch: 2 branches
BranchTrueFalseTotal
if (lemmas_new_size < lemmas.size()) lemmas.erase(lemmas.begin() + lemmas_new_size, lemmas.end()); 0 0 0
if (lemmas_new_size < lemmas.size()) lemmas.erase(lemmas.begin() + lemmas_new_size, lemmas.end()); 0 0 0
2225 }
2226 }
2227 }
2228 }
2229 0 }
2230  
2231 template <class MorphoDictionary>
2232 0 bool morpho_prefix_guesser<MorphoDictionary>::generate(string_piece /*lemma*/, const tag_filter& /*filter*/, vector<tagged_lemma_forms>& /*lemmas_forms*/) {
2233 // Not implemented yet. Is it actually needed?
2234 0 return false;
2235 }
2236  
2237 /////////
2238 // File: morpho/morpho_statistical_guesser.h
2239 /////////
2240  
2241 // This file is part of MorphoDiTa <http://github.com/ufal/morphodita/>.
2242 //
2243 // Copyright 2015 Institute of Formal and Applied Linguistics, Faculty of
2244 // Mathematics and Physics, Charles University in Prague, Czech Republic.
2245 //
2246 // This Source Code Form is subject to the terms of the Mozilla Public
2247 // License, v. 2.0. If a copy of the MPL was not distributed with this
2248 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
2249  
2250 class morpho_statistical_guesser {
2251 public:
2252 void load(binary_decoder& data);
2253 typedef vector<string> used_rules;
2254 void analyze(string_piece form, vector<tagged_lemma>& lemmas, used_rules* used);
2255  
2256 private:
2257 vector<string> tags;
2258 unsigned default_tag;
2259 persistent_unordered_map rules;
2260 };
2261  
2262 /////////
2263 // File: tokenizer/unicode_tokenizer.h
2264 /////////
2265  
2266 // This file is part of MorphoDiTa <http://github.com/ufal/morphodita/>.
2267 //
2268 // Copyright 2015 Institute of Formal and Applied Linguistics, Faculty of
2269 // Mathematics and Physics, Charles University in Prague, Czech Republic.
2270 //
2271 // This Source Code Form is subject to the terms of the Mozilla Public
2272 // License, v. 2.0. If a copy of the MPL was not distributed with this
2273 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
2274  
2275 class unicode_tokenizer : public tokenizer {
2276 public:
2277 enum { URL_EMAIL_LATEST = 2 };
2278 unicode_tokenizer(unsigned url_email_tokenizer);
2279  
2280 virtual void set_text(string_piece text, bool make_copy = false) override;
2281 virtual bool next_sentence(vector<string_piece>* forms, vector<token_range>* tokens) override;
2282  
2283 virtual bool next_sentence(vector<token_range>& tokens) = 0;
2284  
2285 protected:
2286 struct char_info {
2287 char32_t chr;
2288 unilib::unicode::category_t cat;
2289 const char* str;
2290  
2291 136 char_info(char32_t chr, const char* str) : chr(chr), cat(unilib::unicode::category(chr)), str(str) {}
2292 };
2293 vector<char_info> chars;
2294 size_t current;
2295  
2296 bool tokenize_url_email(vector<token_range>& tokens);
2297 bool emergency_sentence_split(const vector<token_range>& tokens);
2298 bool is_eos(const vector<token_range>& tokens, char32_t eos_chr, const unordered_set<string>* abbreviations);
2299  
2300 private:
2301 unsigned url_email_tokenizer;
2302 string text_buffer;
2303 vector<token_range> tokens_buffer;
2304 string eos_buffer;
2305 };
2306  
2307 /////////
2308 // File: tokenizer/ragel_tokenizer.h
2309 /////////
2310  
2311 // This file is part of MorphoDiTa <http://github.com/ufal/morphodita/>.
2312 //
2313 // Copyright 2015 Institute of Formal and Applied Linguistics, Faculty of
2314 // Mathematics and Physics, Charles University in Prague, Czech Republic.
2315 //
2316 // This Source Code Form is subject to the terms of the Mozilla Public
2317 // License, v. 2.0. If a copy of the MPL was not distributed with this
2318 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
2319  
2320 class ragel_tokenizer : public unicode_tokenizer {
2321 public:
2322 ragel_tokenizer(unsigned url_email_tokenizer);
2323  
2324 protected:
2325 static inline uint8_t ragel_char(const char_info& chr);
2326  
2327 private:
2328 static void initialize_ragel_map();
2329 static vector<uint8_t> ragel_map;
2330 static atomic_flag ragel_map_flag;
2331 static void ragel_map_add(char32_t chr, uint8_t mapping);
2332  
2333 friend class unicode_tokenizer;
2334 static bool ragel_url_email(unsigned version, const vector<char_info>& chars, size_t& current_char, vector<token_range>& tokens);
2335 };
2336  
2337 322 uint8_t ragel_tokenizer::ragel_char(const char_info& chr) {
2338 322 ▶ return chr.chr < ragel_map.size() && ragel_map[chr.chr] != 128 ? ragel_map[chr.chr] : 128 + (uint32_t(chr.cat) * uint32_t(0x077CB531U) >> 27);
Branch: 2 branches
BranchTrueFalseTotal
return chr.chr < ragel_map.size() && ragel_map[chr.chr] != 128 ? ragel_map[chr.chr] : 128 + (uint32_t(chr.cat) * uint32_t(0x077CB531U) >> 27); 322 0 322
return chr.chr < ragel_map.size() && ragel_map[chr.chr] != 128 ? ragel_map[chr.chr] : 128 + (uint32_t(chr.cat) * uint32_t(0x077CB531U) >> 27); 303 19 322
2339 }
2340  
2341 /////////
2342 // File: tokenizer/czech_tokenizer.h
2343 /////////
2344  
2345 // This file is part of MorphoDiTa <http://github.com/ufal/morphodita/>.
2346 //
2347 // Copyright 2015 Institute of Formal and Applied Linguistics, Faculty of
2348 // Mathematics and Physics, Charles University in Prague, Czech Republic.
2349 //
2350 // This Source Code Form is subject to the terms of the Mozilla Public
2351 // License, v. 2.0. If a copy of the MPL was not distributed with this
2352 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
2353  
2354 class czech_tokenizer : public ragel_tokenizer {
2355 public:
2356 enum tokenizer_language { CZECH = 0, SLOVAK = 1 };
2357 enum { LATEST = 2 };
2358 czech_tokenizer(tokenizer_language language, unsigned version, const morpho* m = nullptr);
2359  
2360 virtual bool next_sentence(vector<token_range>& tokens) override;
2361  
2362 private:
2363 const morpho* m;
2364 const unordered_set<string>* abbreviations;
2365 vector<tagged_lemma> lemmas;
2366  
2367 void merge_hyphenated(vector<token_range>& tokens);
2368  
2369 static const unordered_set<string> abbreviations_czech;
2370 static const unordered_set<string> abbreviations_slovak;
2371 };
2372  
2373 /////////
2374 // File: morpho/czech_morpho.h
2375 /////////
2376  
2377 // This file is part of MorphoDiTa <http://github.com/ufal/morphodita/>.
2378 //
2379 // Copyright 2015 Institute of Formal and Applied Linguistics, Faculty of
2380 // Mathematics and Physics, Charles University in Prague, Czech Republic.
2381 //
2382 // This Source Code Form is subject to the terms of the Mozilla Public
2383 // License, v. 2.0. If a copy of the MPL was not distributed with this
2384 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
2385  
2386 class czech_morpho : public morpho {
2387 public:
2388 using morpho_language = czech_tokenizer::tokenizer_language;
2389  
2390 0 ▶ czech_morpho(morpho_language language, unsigned version) : language(language), version(version) {}
Branch: 3 branches
BranchTrueFalseTotal
czech_morpho(morpho_language language, unsigned version) : language(language), version(version) {} 0 0 0
czech_morpho(morpho_language language, unsigned version) : language(language), version(version) {} 0 0 0
czech_morpho(morpho_language language, unsigned version) : language(language), version(version) {} 0 0 0
2391  
2392 virtual int analyze(string_piece form, morpho::guesser_mode guesser, vector<tagged_lemma>& lemmas) const override;
2393 virtual int generate(string_piece lemma, const char* tag_wildcard, guesser_mode guesser, vector<tagged_lemma_forms>& forms) const override;
2394 virtual int raw_lemma_len(string_piece lemma) const override;
2395 virtual int lemma_id_len(string_piece lemma) const override;
2396 virtual int raw_form_len(string_piece form) const override;
2397 virtual tokenizer* new_tokenizer() const override;
2398  
2399 bool load(istream& is);
2400 private:
2401 inline void analyze_special(string_piece form, vector<tagged_lemma>& lemmas) const;
2402  
2403 morpho_language language;
2404 unsigned version;
2405 morpho_dictionary<czech_lemma_addinfo> dictionary;
2406 unique_ptr<morpho_prefix_guesser<decltype(dictionary)>> prefix_guesser;
2407 unique_ptr<morpho_statistical_guesser> statistical_guesser;
2408  
2409 string unknown_tag = "X@-------------";
2410 string number_tag = "C=-------------";
2411 string punctuation_tag = "Z:-------------";
2412 };
2413  
2414 /////////
2415 // File: morpho/czech_morpho.cpp
2416 /////////
2417  
2418 // This file is part of MorphoDiTa <http://github.com/ufal/morphodita/>.
2419 //
2420 // Copyright 2015 Institute of Formal and Applied Linguistics, Faculty of
2421 // Mathematics and Physics, Charles University in Prague, Czech Republic.
2422 //
2423 // This Source Code Form is subject to the terms of the Mozilla Public
2424 // License, v. 2.0. If a copy of the MPL was not distributed with this
2425 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
2426  
2427 0 bool czech_morpho::load(istream& is) {
2428 0 binary_decoder data;
2429 0 ▶ if (!compressor::load(is, data)) return false;
Branch: 2 branches
BranchTrueFalseTotal
if (!compressor::load(is, data)) return false; 0 0 0
if (!compressor::load(is, data)) return false; 0 0 0
2430  
2431 try {
2432 // Load tag length
2433 0 ▶ unsigned tag_length = data.next_1B();
Branch: 1 branch
BranchTrueFalseTotal
unsigned tag_length = data.next_1B(); 0 0 0
2434 0 ▶ if (tag_length < unknown_tag.size()) unknown_tag.erase(tag_length);
Branch: 2 branches
BranchTrueFalseTotal
if (tag_length < unknown_tag.size()) unknown_tag.erase(tag_length); 0 0 0
if (tag_length < unknown_tag.size()) unknown_tag.erase(tag_length); 0 0 0
2435 0 ▶ if (tag_length < number_tag.size()) number_tag.erase(tag_length);
Branch: 2 branches
BranchTrueFalseTotal
if (tag_length < number_tag.size()) number_tag.erase(tag_length); 0 0 0
if (tag_length < number_tag.size()) number_tag.erase(tag_length); 0 0 0
2436 0 ▶ if (tag_length < punctuation_tag.size()) punctuation_tag.erase(tag_length);
Branch: 2 branches
BranchTrueFalseTotal
if (tag_length < punctuation_tag.size()) punctuation_tag.erase(tag_length); 0 0 0
if (tag_length < punctuation_tag.size()) punctuation_tag.erase(tag_length); 0 0 0
2437  
2438 // Load dictionary
2439 0 ▶ dictionary.load(data);
Branch: 1 branch
BranchTrueFalseTotal
dictionary.load(data); 0 0 0
2440  
2441 // Optionally prefix guesser if present
2442 0 prefix_guesser.reset();
2443 0 ▶ if (data.next_1B()) {
Branch: 2 branches
BranchTrueFalseTotal
if (data.next_1B()) { 0 0 0
if (data.next_1B()) { 0 0 0
2444 0 ▶ prefix_guesser.reset(new morpho_prefix_guesser<decltype(dictionary)>(dictionary));
Branch: 1 branch
BranchTrueFalseTotal
prefix_guesser.reset(new morpho_prefix_guesser<decltype(dictionary)>(dictionary)); 0 0 0
2445 0 ▶ prefix_guesser->load(data);
Branch: 1 branch
BranchTrueFalseTotal
prefix_guesser->load(data); 0 0 0
2446 }
2447  
2448 // Optionally statistical guesser if present
2449 0 statistical_guesser.reset();
2450 0 ▶ if (data.next_1B()) {
Branch: 2 branches
BranchTrueFalseTotal
if (data.next_1B()) { 0 0 0
if (data.next_1B()) { 0 0 0
2451 0 ▶ statistical_guesser.reset(new morpho_statistical_guesser());
Branch: 1 branch
BranchTrueFalseTotal
statistical_guesser.reset(new morpho_statistical_guesser()); 0 0 0
2452 0 ▶ statistical_guesser->load(data);
Branch: 1 branch
BranchTrueFalseTotal
statistical_guesser->load(data); 0 0 0
2453 ▶ }
Branch: 1 branch
BranchTrueFalseTotal
} 0 0 0
2454 } catch (binary_decoder_error&) {
2455 return false;
2456 }
2457  
2458 0 return data.is_end();
2459 0 }
2460  
2461 0 int czech_morpho::analyze(string_piece form, guesser_mode guesser, vector<tagged_lemma>& lemmas) const {
2462 0 lemmas.clear();
2463  
2464 0 ▶ if (form.len) {
Branch: 1 branch
BranchTrueFalseTotal
if (form.len) { 0 0 0
2465 // Generate all casing variants if needed (they are different than given form).
2466 0 string form_uclc; // first uppercase, rest lowercase
2467 0 string form_lc; // all lowercase
2468 0 ▶ generate_casing_variants(form, form_uclc, form_lc);
Branch: 1 branch
BranchTrueFalseTotal
generate_casing_variants(form, form_uclc, form_lc); 0 0 0
2469  
2470 // Start by analysing using the dictionary and all casing variants.
2471 0 ▶ dictionary.analyze(form, lemmas);
Branch: 1 branch
BranchTrueFalseTotal
dictionary.analyze(form, lemmas); 0 0 0
2472 0 ▶ if (!form_uclc.empty()) dictionary.analyze(form_uclc, lemmas);
Branch: 2 branches
BranchTrueFalseTotal
if (!form_uclc.empty()) dictionary.analyze(form_uclc, lemmas); 0 0 0
if (!form_uclc.empty()) dictionary.analyze(form_uclc, lemmas); 0 0 0
2473 0 ▶ if (!form_lc.empty()) dictionary.analyze(form_lc, lemmas);
Branch: 2 branches
BranchTrueFalseTotal
if (!form_lc.empty()) dictionary.analyze(form_lc, lemmas); 0 0 0
if (!form_lc.empty()) dictionary.analyze(form_lc, lemmas); 0 0 0
2474 0 ▶ if (!lemmas.empty()) return NO_GUESSER;
Branch: 1 branch
BranchTrueFalseTotal
if (!lemmas.empty()) return NO_GUESSER; 0 0 0
2475  
2476 // Then call analyze_special to handle numbers and punctuation.
2477 0 ▶ analyze_special(form, lemmas);
Branch: 1 branch
BranchTrueFalseTotal
analyze_special(form, lemmas); 0 0 0
2478 0 ▶ if (!lemmas.empty()) return NO_GUESSER;
Branch: 1 branch
BranchTrueFalseTotal
if (!lemmas.empty()) return NO_GUESSER; 0 0 0
2479  
2480 // For the prefix guesser, use only form_lc.
2481 0 ▶ if (guesser == GUESSER && prefix_guesser)
Branch: 3 branches
BranchTrueFalseTotal
if (guesser == GUESSER && prefix_guesser) 0 0 0
if (guesser == GUESSER && prefix_guesser) 0 0 0
if (guesser == GUESSER && prefix_guesser) 0 0 0
2482 0 ▶ prefix_guesser->analyze(form_lc.empty() ? form : form_lc, lemmas);
Branch: 2 branches
BranchTrueFalseTotal
prefix_guesser->analyze(form_lc.empty() ? form : form_lc, lemmas); 0 0 0
prefix_guesser->analyze(form_lc.empty() ? form : form_lc, lemmas); 0 0 0
2483 0 bool prefix_guesser_guesses = !lemmas.empty();
2484  
2485 // For the statistical guesser, use all casing variants.
2486 0 ▶ if (guesser == GUESSER && statistical_guesser) {
Branch: 3 branches
BranchTrueFalseTotal
if (guesser == GUESSER && statistical_guesser) { 0 0 0
if (guesser == GUESSER && statistical_guesser) { 0 0 0
if (guesser == GUESSER && statistical_guesser) { 0 0 0
2487 0 ▶ if (form_uclc.empty() && form_lc.empty())
Branch: 3 branches
BranchTrueFalseTotal
if (form_uclc.empty() && form_lc.empty()) 0 0 0
if (form_uclc.empty() && form_lc.empty()) 0 0 0
if (form_uclc.empty() && form_lc.empty()) 0 0 0
2488 0 ▶ statistical_guesser->analyze(form, lemmas, nullptr);
Branch: 1 branch
BranchTrueFalseTotal
statistical_guesser->analyze(form, lemmas, nullptr); 0 0 0
2489 else {
2490 0 ▶ morpho_statistical_guesser::used_rules used_rules; used_rules.reserve(3);
Branch: 1 branch
BranchTrueFalseTotal
morpho_statistical_guesser::used_rules used_rules; used_rules.reserve(3); 0 0 0
2491 0 ▶ statistical_guesser->analyze(form, lemmas, &used_rules);
Branch: 1 branch
BranchTrueFalseTotal
statistical_guesser->analyze(form, lemmas, &used_rules); 0 0 0
2492 0 ▶ if (!form_uclc.empty()) statistical_guesser->analyze(form_uclc, lemmas, &used_rules);
Branch: 2 branches
BranchTrueFalseTotal
if (!form_uclc.empty()) statistical_guesser->analyze(form_uclc, lemmas, &used_rules); 0 0 0
if (!form_uclc.empty()) statistical_guesser->analyze(form_uclc, lemmas, &used_rules); 0 0 0
2493 0 ▶ if (!form_lc.empty()) statistical_guesser->analyze(form_lc, lemmas, &used_rules);
Branch: 2 branches
BranchTrueFalseTotal
if (!form_lc.empty()) statistical_guesser->analyze(form_lc, lemmas, &used_rules); 0 0 0
if (!form_lc.empty()) statistical_guesser->analyze(form_lc, lemmas, &used_rules); 0 0 0
2494 0 }
2495 }
2496  
2497 // Make sure results are unique lemma-tag pairs. Statistical guesser produces
2498 // unique lemma-tag pairs, but prefix guesser does not.
2499 0 ▶ if (prefix_guesser_guesses) {
Branch: 1 branch
BranchTrueFalseTotal
if (prefix_guesser_guesses) { 0 0 0
2500 0 ▶ sort(lemmas.begin(), lemmas.end(), [](const tagged_lemma& a, const tagged_lemma& b) {
Branch: 1 branch
BranchTrueFalseTotal
sort(lemmas.begin(), lemmas.end(), [](const tagged_lemma& a, const tagged_lemma& b) { 0 0 0
2501 0 int lemma_compare = a.lemma.compare(b.lemma);
2502 0 ▶ return lemma_compare < 0 || (lemma_compare == 0 && a.tag < b.tag);
Branch: 3 branches
BranchTrueFalseTotal
return lemma_compare < 0 || (lemma_compare == 0 && a.tag < b.tag); 0 0 0
return lemma_compare < 0 || (lemma_compare == 0 && a.tag < b.tag); 0 0 0
return lemma_compare < 0 || (lemma_compare == 0 && a.tag < b.tag); 0 0 0
2503 });
2504 0 ▶ auto lemmas_end = unique(lemmas.begin(), lemmas.end(), [](const tagged_lemma& a, const tagged_lemma& b) {
Branch: 1 branch
BranchTrueFalseTotal
auto lemmas_end = unique(lemmas.begin(), lemmas.end(), [](const tagged_lemma& a, const tagged_lemma& b) { 0 0 0
2505 0 ▶ return a.lemma == b.lemma && a.tag == b.tag;
Branch: 2 branches
BranchTrueFalseTotal
return a.lemma == b.lemma && a.tag == b.tag; 0 0 0
return a.lemma == b.lemma && a.tag == b.tag; 0 0 0
2506 });
2507 0 ▶ if (lemmas_end != lemmas.end()) lemmas.erase(lemmas_end, lemmas.end());
Branch: 2 branches
BranchTrueFalseTotal
if (lemmas_end != lemmas.end()) lemmas.erase(lemmas_end, lemmas.end()); 0 0 0
if (lemmas_end != lemmas.end()) lemmas.erase(lemmas_end, lemmas.end()); 0 0 0
2508 }
2509  
2510 0 ▶ if (!lemmas.empty()) return GUESSER;
Branch: 1 branch
BranchTrueFalseTotal
if (!lemmas.empty()) return GUESSER; 0 0 0
2511 0 ▶ }
Branch: 2 branches
BranchTrueFalseTotal
} 0 0 0
} 0 0 0
2512  
2513 0 ▶ lemmas.emplace_back(string(form.str, form.len), unknown_tag);
Branch: 2 branches
BranchTrueFalseTotal
lemmas.emplace_back(string(form.str, form.len), unknown_tag); 0 0 0
lemmas.emplace_back(string(form.str, form.len), unknown_tag); 0 0 0
2514 0 return -1;
2515 }
2516  
2517 0 int czech_morpho::generate(string_piece lemma, const char* tag_wildcard, morpho::guesser_mode guesser, vector<tagged_lemma_forms>& forms) const {
2518 0 forms.clear();
2519  
2520 0 ▶ tag_filter filter(tag_wildcard);
Branch: 1 branch
BranchTrueFalseTotal
tag_filter filter(tag_wildcard); 0 0 0
2521  
2522 0 ▶ if (lemma.len) {
Branch: 1 branch
BranchTrueFalseTotal
if (lemma.len) { 0 0 0
2523 0 ▶ if (dictionary.generate(lemma, filter, forms))
Branch: 2 branches
BranchTrueFalseTotal
if (dictionary.generate(lemma, filter, forms)) 0 0 0
if (dictionary.generate(lemma, filter, forms)) 0 0 0
2524 0 return NO_GUESSER;
2525  
2526 0 ▶ if (guesser == GUESSER && prefix_guesser)
Branch: 3 branches
BranchTrueFalseTotal
if (guesser == GUESSER && prefix_guesser) 0 0 0
if (guesser == GUESSER && prefix_guesser) 0 0 0
if (guesser == GUESSER && prefix_guesser) 0 0 0
2527 0 ▶ if (prefix_guesser->generate(lemma, filter, forms))
Branch: 1 branch
BranchTrueFalseTotal
if (prefix_guesser->generate(lemma, filter, forms)) 0 0 0
2528 0 return GUESSER;
2529 }
2530  
2531 0 return -1;
2532 0 }
2533  
2534 0 int czech_morpho::raw_lemma_len(string_piece lemma) const {
2535 0 return czech_lemma_addinfo::raw_lemma_len(lemma);
2536 }
2537  
2538 0 int czech_morpho::lemma_id_len(string_piece lemma) const {
2539 0 return czech_lemma_addinfo::lemma_id_len(lemma);
2540 }
2541  
2542 0 int czech_morpho::raw_form_len(string_piece form) const {
2543 0 return form.len;
2544 }
2545  
2546 0 tokenizer* czech_morpho::new_tokenizer() const {
2547 0 ▶ return new czech_tokenizer(language, version, this);
Branch: 2 branches
BranchTrueFalseTotal
return new czech_tokenizer(language, version, this); 0 0 0
return new czech_tokenizer(language, version, this); 0 0 0
2548 }
2549  
2550 // What characters are considered punctuation except for the ones in unicode Punctuation category.
2551 static bool punctuation_additional[] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1/*$*/,
2552 0,0,0,0,0,0,1/*+*/,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1/*<*/,1/*=*/,1/*>*/,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
2553 0,0,0,0,0,0,0,0,1/*^*/,0,1/*`*/,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1/*|*/,0,1/*~*/,0,0,0,0,0,0,0,0,
2554 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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0,0,0,
2563 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1/*caron*/};
2564  
2565 // What characters of unicode Punctuation category are not considered punctuation.
2566 static bool punctuation_exceptions[] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
2567 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
2568 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
2569 0,0,0,0,0,0,0,0,0,1/*paragraph*/};
2570  
2571 0 void czech_morpho::analyze_special(string_piece form, vector<tagged_lemma>& lemmas) const {
2572 using namespace unilib;
2573  
2574 // Analyzer for numbers and punctuation.
2575 // Number is anything matching [+-]? is_Pn* ([.,] is_Pn*)? ([Ee] [+-]? is_Pn+)? for at least one is_Pn* nonempty.
2576 // Punctuation is any form beginning with either unicode punctuation or punctuation_exceptions character.
2577 // Beware that numbers takes precedence, so - is punctuation, -3 is number, -. is punctuation, -.3 is number.
2578 0 ▶ if (!form.len) return;
Branch: 1 branch
BranchTrueFalseTotal
if (!form.len) return; 0 0 0
2579  
2580 0 string_piece form_ori = form;
2581 0 char32_t first = utf8::decode(form.str, form.len);
2582  
2583 // Try matching a number.
2584 0 char32_t codepoint = first;
2585 0 bool any_digit = false;
2586 0 ▶ if (codepoint == '+' || codepoint == '-') codepoint = utf8::decode(form.str, form.len);
Branch: 2 branches
BranchTrueFalseTotal
if (codepoint == '+' || codepoint == '-') codepoint = utf8::decode(form.str, form.len); 0 0 0
if (codepoint == '+' || codepoint == '-') codepoint = utf8::decode(form.str, form.len); 0 0 0
2587 0 ▶ while (unicode::category(codepoint) & unicode::N) any_digit = true, codepoint = utf8::decode(form.str, form.len);
Branch: 1 branch
BranchTrueFalseTotal
while (unicode::category(codepoint) & unicode::N) any_digit = true, codepoint = utf8::decode(form.str, form.len); 0 0 0
2588 0 ▶ if ((codepoint == '.' && form.len) || codepoint == ',') codepoint = utf8::decode(form.str, form.len);
Branch: 3 branches
BranchTrueFalseTotal
if ((codepoint == '.' && form.len) || codepoint == ',') codepoint = utf8::decode(form.str, form.len); 0 0 0
if ((codepoint == '.' && form.len) || codepoint == ',') codepoint = utf8::decode(form.str, form.len); 0 0 0
if ((codepoint == '.' && form.len) || codepoint == ',') codepoint = utf8::decode(form.str, form.len); 0 0 0
2589 0 ▶ while (unicode::category(codepoint) & unicode::N) any_digit = true, codepoint = utf8::decode(form.str, form.len);
Branch: 1 branch
BranchTrueFalseTotal
while (unicode::category(codepoint) & unicode::N) any_digit = true, codepoint = utf8::decode(form.str, form.len); 0 0 0
2590 0 ▶ if (any_digit && (codepoint == 'e' || codepoint == 'E')) {
Branch: 3 branches
BranchTrueFalseTotal
if (any_digit && (codepoint == 'e' || codepoint == 'E')) { 0 0 0
if (any_digit && (codepoint == 'e' || codepoint == 'E')) { 0 0 0
if (any_digit && (codepoint == 'e' || codepoint == 'E')) { 0 0 0
2591 0 codepoint = utf8::decode(form.str, form.len);
2592 0 ▶ if (codepoint == '+' || codepoint == '-') codepoint = utf8::decode(form.str, form.len);
Branch: 2 branches
BranchTrueFalseTotal
if (codepoint == '+' || codepoint == '-') codepoint = utf8::decode(form.str, form.len); 0 0 0
if (codepoint == '+' || codepoint == '-') codepoint = utf8::decode(form.str, form.len); 0 0 0
2593 0 any_digit = false;
2594 0 ▶ while (unicode::category(codepoint) & unicode::N) any_digit = true, codepoint = utf8::decode(form.str, form.len);
Branch: 1 branch
BranchTrueFalseTotal
while (unicode::category(codepoint) & unicode::N) any_digit = true, codepoint = utf8::decode(form.str, form.len); 0 0 0
2595 }
2596  
2597 0 ▶ if (any_digit && !form.len && (!codepoint || codepoint == '.')) {
Branch: 4 branches
BranchTrueFalseTotal
if (any_digit && !form.len && (!codepoint || codepoint == '.')) { 0 0 0
if (any_digit && !form.len && (!codepoint || codepoint == '.')) { 0 0 0
if (any_digit && !form.len && (!codepoint || codepoint == '.')) { 0 0 0
if (any_digit && !form.len && (!codepoint || codepoint == '.')) { 0 0 0
2598 0 ▶ lemmas.emplace_back(string(form_ori.str, form_ori.len), number_tag);
Branch: 2 branches
BranchTrueFalseTotal
lemmas.emplace_back(string(form_ori.str, form_ori.len), number_tag); 0 0 0
lemmas.emplace_back(string(form_ori.str, form_ori.len), number_tag); 0 0 0
2599 0 ▶ } else if ((first < sizeof(punctuation_additional) && punctuation_additional[first]) ||
Branch: 3 branches
BranchTrueFalseTotal
} else if ((first < sizeof(punctuation_additional) && punctuation_additional[first]) || 0 0 0
} else if ((first < sizeof(punctuation_additional) && punctuation_additional[first]) || 0 0 0
} else if ((first < sizeof(punctuation_additional) && punctuation_additional[first]) || 0 0 0
2600 0 ▶ ((unicode::category(first) & unicode::P) && (first >= sizeof(punctuation_exceptions) || !punctuation_exceptions[first])))
Branch: 3 branches
BranchTrueFalseTotal
((unicode::category(first) & unicode::P) && (first >= sizeof(punctuation_exceptions) || !punctuation_exceptions[first]))) 0 0 0
((unicode::category(first) & unicode::P) && (first >= sizeof(punctuation_exceptions) || !punctuation_exceptions[first]))) 0 0 0
((unicode::category(first) & unicode::P) && (first >= sizeof(punctuation_exceptions) || !punctuation_exceptions[first]))) 0 0 0
2601 0 ▶ lemmas.emplace_back(string(form_ori.str, form_ori.len), punctuation_tag);
Branch: 2 branches
BranchTrueFalseTotal
lemmas.emplace_back(string(form_ori.str, form_ori.len), punctuation_tag); 0 0 0
lemmas.emplace_back(string(form_ori.str, form_ori.len), punctuation_tag); 0 0 0
2602 }
2603  
2604 /////////
2605 // File: morpho/english_lemma_addinfo.h
2606 /////////
2607  
2608 // This file is part of MorphoDiTa <http://github.com/ufal/morphodita/>.
2609 //
2610 // Copyright 2015 Institute of Formal and Applied Linguistics, Faculty of
2611 // Mathematics and Physics, Charles University in Prague, Czech Republic.
2612 //
2613 // This Source Code Form is subject to the terms of the Mozilla Public
2614 // License, v. 2.0. If a copy of the MPL was not distributed with this
2615 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
2616  
2617 // Declarations
2618 struct english_lemma_addinfo {
2619 inline static int raw_lemma_len(string_piece lemma);
2620 inline static int lemma_id_len(string_piece lemma);
2621 inline static string format(const unsigned char* addinfo, int addinfo_len);
2622 inline static bool generatable(const unsigned char* addinfo, int addinfo_len);
2623  
2624 inline int parse(string_piece lemma, bool die_on_failure = false);
2625 inline bool match_lemma_id(const unsigned char* other_addinfo, int other_addinfo_len);
2626  
2627 vector<unsigned char> data;
2628 };
2629  
2630 // Definitions
2631 0 int english_lemma_addinfo::raw_lemma_len(string_piece lemma) {
2632 // Lemma ends either by
2633 // - '^' on non-first position followed by nothing or [A-Za-z][-A-Za-z]*
2634 // - '+' on non-first position followed by nothing
2635 0 ▶ for (unsigned len = 1; len < lemma.len; len++) {
Branch: 1 branch
BranchTrueFalseTotal
for (unsigned len = 1; len < lemma.len; len++) { 0 0 0
2636 0 ▶ if (len + 1 == lemma.len && (lemma.str[len] == '^' || lemma.str[len] == '+'))
Branch: 3 branches
BranchTrueFalseTotal
if (len + 1 == lemma.len && (lemma.str[len] == '^' || lemma.str[len] == '+')) 0 0 0
if (len + 1 == lemma.len && (lemma.str[len] == '^' || lemma.str[len] == '+')) 0 0 0
if (len + 1 == lemma.len && (lemma.str[len] == '^' || lemma.str[len] == '+')) 0 0 0
2637 0 return len;
2638 0 ▶ if (len + 1 < lemma.len && lemma.str[len] == '^') {
Branch: 2 branches
BranchTrueFalseTotal
if (len + 1 < lemma.len && lemma.str[len] == '^') { 0 0 0
if (len + 1 < lemma.len && lemma.str[len] == '^') { 0 0 0
2639 0 bool ok = true;
2640 0 ▶ for (unsigned i = len + 1; ok && i < lemma.len; i++)
Branch: 2 branches
BranchTrueFalseTotal
for (unsigned i = len + 1; ok && i < lemma.len; i++) 0 0 0
for (unsigned i = len + 1; ok && i < lemma.len; i++) 0 0 0
2641 0 ▶ ok &= (lemma.str[i] >= 'A' && lemma.str[i] <= 'Z') ||
Branch: 1 branch
BranchTrueFalseTotal
ok &= (lemma.str[i] >= 'A' && lemma.str[i] <= 'Z') || 0 0 0
2642 0 ▶ (lemma.str[i] >= 'a' && lemma.str[i] <= 'z') ||
Branch: 3 branches
BranchTrueFalseTotal
(lemma.str[i] >= 'a' && lemma.str[i] <= 'z') || 0 0 0
(lemma.str[i] >= 'a' && lemma.str[i] <= 'z') || 0 0 0
(lemma.str[i] >= 'a' && lemma.str[i] <= 'z') || 0 0 0
2643 0 ▶ (i > len + 1 && lemma.str[i] == '-');
Branch: 2 branches
BranchTrueFalseTotal
(i > len + 1 && lemma.str[i] == '-'); 0 0 0
(i > len + 1 && lemma.str[i] == '-'); 0 0 0
2644 0 ▶ if (ok) return len;
Branch: 1 branch
BranchTrueFalseTotal
if (ok) return len; 0 0 0
2645 }
2646 }
2647 0 return lemma.len;
2648 }
2649  
2650 0 int english_lemma_addinfo::lemma_id_len(string_piece lemma) {
2651 // No lemma comments.
2652 0 return lemma.len;
2653 }
2654  
2655 0 string english_lemma_addinfo::format(const unsigned char* addinfo, int addinfo_len) {
2656 0 ▶ return string((const char*) addinfo, addinfo_len);
Branch: 1 branch
BranchTrueFalseTotal
return string((const char*) addinfo, addinfo_len); 0 0 0
2657 }
2658  
2659 0 bool english_lemma_addinfo::generatable(const unsigned char* /*addinfo*/, int /*addinfo_len*/) {
2660 0 return true;
2661 }
2662  
2663 0 int english_lemma_addinfo::parse(string_piece lemma, bool /*die_on_failure*/) {
2664 0 data.clear();
2665  
2666 0 size_t len = raw_lemma_len(lemma);
2667 0 ▶ for (size_t i = len; i < lemma.len; i++)
Branch: 1 branch
BranchTrueFalseTotal
for (size_t i = len; i < lemma.len; i++) 0 0 0
2668 0 ▶ data.push_back(lemma.str[i]);
Branch: 1 branch
BranchTrueFalseTotal
data.push_back(lemma.str[i]); 0 0 0
2669  
2670 0 return len;
2671 }
2672  
2673 0 bool english_lemma_addinfo::match_lemma_id(const unsigned char* other_addinfo, int other_addinfo_len) {
2674 0 ▶ if (data.empty()) return true;
Branch: 1 branch
BranchTrueFalseTotal
if (data.empty()) return true; 0 0 0
2675 0 ▶ if (data.size() == 1 && data[0] == '^') return other_addinfo_len > 0 && other_addinfo[0] == '^';
Branch: 5 branches
BranchTrueFalseTotal
if (data.size() == 1 && data[0] == '^') return other_addinfo_len > 0 && other_addinfo[0] == '^'; 0 0 0
if (data.size() == 1 && data[0] == '^') return other_addinfo_len > 0 && other_addinfo[0] == '^'; 0 0 0
if (data.size() == 1 && data[0] == '^') return other_addinfo_len > 0 && other_addinfo[0] == '^'; 0 0 0
if (data.size() == 1 && data[0] == '^') return other_addinfo_len > 0 && other_addinfo[0] == '^'; 0 0 0
if (data.size() == 1 && data[0] == '^') return other_addinfo_len > 0 && other_addinfo[0] == '^'; 0 0 0
2676 0 ▶ if (data.size() == 1 && data[0] == '+') return other_addinfo_len == 0;
Branch: 3 branches
BranchTrueFalseTotal
if (data.size() == 1 && data[0] == '+') return other_addinfo_len == 0; 0 0 0
if (data.size() == 1 && data[0] == '+') return other_addinfo_len == 0; 0 0 0
if (data.size() == 1 && data[0] == '+') return other_addinfo_len == 0; 0 0 0
2677 0 ▶ return data.size() == size_t(other_addinfo_len) && small_memeq(data.data(), other_addinfo, other_addinfo_len);
Branch: 2 branches
BranchTrueFalseTotal
return data.size() == size_t(other_addinfo_len) && small_memeq(data.data(), other_addinfo, other_addinfo_len); 0 0 0
return data.size() == size_t(other_addinfo_len) && small_memeq(data.data(), other_addinfo, other_addinfo_len); 0 0 0
2678 }
2679  
2680 /////////
2681 // File: morpho/english_morpho_guesser.h
2682 /////////
2683  
2684 // This file is part of MorphoDiTa <http://github.com/ufal/morphodita/>.
2685 //
2686 // Copyright 2015 Institute of Formal and Applied Linguistics, Faculty of
2687 // Mathematics and Physics, Charles University in Prague, Czech Republic.
2688 //
2689 // This Source Code Form is subject to the terms of the Mozilla Public
2690 // License, v. 2.0. If a copy of the MPL was not distributed with this
2691 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
2692  
2693 class english_morpho_guesser {
2694 public:
2695 void load(binary_decoder& data);
2696 void analyze(string_piece form, string_piece form_lc, vector<tagged_lemma>& lemmas) const;
2697 bool analyze_proper_names(string_piece form, string_piece form_lc, vector<tagged_lemma>& lemmas) const;
2698  
2699 private:
2700 inline void add(const string& tag, const string& form, vector<tagged_lemma>& lemmas) const;
2701 inline void add(const string& tag, const string& tag2, const string& form, vector<tagged_lemma>& lemmas) const;
2702 inline void add(const string& tag, const string& form, unsigned negation_len, vector<tagged_lemma>& lemmas) const;
2703 inline void add(const string& tag, const string& tag2, const string& form, unsigned negation_len, vector<tagged_lemma>& lemmas) const;
2704 void add_NNS(const string& form, unsigned negation_len, vector<tagged_lemma>& lemmas) const;
2705 void add_NNPS(const string& form, vector<tagged_lemma>& lemmas) const;
2706 void add_VBG(const string& form, vector<tagged_lemma>& lemmas) const;
2707 void add_VBD_VBN(const string& form, vector<tagged_lemma>& lemmas) const;
2708 void add_VBZ(const string& form, vector<tagged_lemma>& lemmas) const;
2709 void add_JJR_RBR(const string& form, unsigned negation_len, vector<tagged_lemma>& lemmas) const;
2710 void add_JJS_RBS(const string& form, unsigned negation_len, vector<tagged_lemma>& lemmas) const;
2711  
2712 enum { NEGATION_LEN = 0, TO_FOLLOW = 1, TOTAL = 2 };
2713 vector<string> exceptions_tags;
2714 persistent_unordered_map exceptions;
2715 persistent_unordered_map negations;
2716 string CD = "CD", FW = "FW", JJ = "JJ", JJR = "JJR", JJS = "JJS",
2717 NN = "NN", NNP = "NNP", NNPS = "NNPS", NNS = "NNS", RB = "RB",
2718 RBR = "RBR", RBS = "RBS", SYM = "SYM", VB = "VB", VBD = "VBD",
2719 VBG = "VBG", VBN = "VBN", VBP = "VBP", VBZ = "VBZ";
2720 };
2721  
2722 /////////
2723 // File: morpho/english_morpho.h
2724 /////////
2725  
2726 // This file is part of MorphoDiTa <http://github.com/ufal/morphodita/>.
2727 //
2728 // Copyright 2015 Institute of Formal and Applied Linguistics, Faculty of
2729 // Mathematics and Physics, Charles University in Prague, Czech Republic.
2730 //
2731 // This Source Code Form is subject to the terms of the Mozilla Public
2732 // License, v. 2.0. If a copy of the MPL was not distributed with this
2733 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
2734  
2735 class english_morpho : public morpho {
2736 public:
2737 0 ▶ english_morpho(unsigned version) : version(version) {}
Branch: 21 branches
BranchTrueFalseTotal
english_morpho(unsigned version) : version(version) {} 0 0 0
english_morpho(unsigned version) : version(version) {} 0 0 0
english_morpho(unsigned version) : version(version) {} 0 0 0
english_morpho(unsigned version) : version(version) {} 0 0 0
english_morpho(unsigned version) : version(version) {} 0 0 0
english_morpho(unsigned version) : version(version) {} 0 0 0
english_morpho(unsigned version) : version(version) {} 0 0 0
english_morpho(unsigned version) : version(version) {} 0 0 0
english_morpho(unsigned version) : version(version) {} 0 0 0
english_morpho(unsigned version) : version(version) {} 0 0 0
english_morpho(unsigned version) : version(version) {} 0 0 0
english_morpho(unsigned version) : version(version) {} 0 0 0
english_morpho(unsigned version) : version(version) {} 0 0 0
english_morpho(unsigned version) : version(version) {} 0 0 0
english_morpho(unsigned version) : version(version) {} 0 0 0
english_morpho(unsigned version) : version(version) {} 0 0 0
english_morpho(unsigned version) : version(version) {} 0 0 0
english_morpho(unsigned version) : version(version) {} 0 0 0
english_morpho(unsigned version) : version(version) {} 0 0 0
english_morpho(unsigned version) : version(version) {} 0 0 0
english_morpho(unsigned version) : version(version) {} 0 0 0
2738  
2739 virtual int analyze(string_piece form, morpho::guesser_mode guesser, vector<tagged_lemma>& lemmas) const override;
2740 virtual int generate(string_piece lemma, const char* tag_wildcard, guesser_mode guesser, vector<tagged_lemma_forms>& forms) const override;
2741 virtual int raw_lemma_len(string_piece lemma) const override;
2742 virtual int lemma_id_len(string_piece lemma) const override;
2743 virtual int raw_form_len(string_piece form) const override;
2744 virtual tokenizer* new_tokenizer() const override;
2745  
2746 bool load(istream& is);
2747 private:
2748 inline void analyze_special(string_piece form, vector<tagged_lemma>& lemmas) const;
2749  
2750 unsigned version;
2751 morpho_dictionary<english_lemma_addinfo> dictionary;
2752 english_morpho_guesser morpho_guesser;
2753  
2754 string unknown_tag = "UNK";
2755 string number_tag = "CD", nnp_tag = "NNP", ls_tag = "LS";
2756 string open_quotation_tag = "``", close_quotation_tag = "''";
2757 string open_parenthesis_tag = "(", close_parenthesis_tag = ")";
2758 string comma_tag = ",", dot_tag = ".", punctuation_tag = ":", hash_tag = "#", dollar_tag = "$";
2759 string sym_tag = "SYM", jj_tag = "JJ", nn_tag = "NN", nns_tag = "NNS", cc_tag = "CC", pos_tag = "POS", in_tag = "IN";
2760 };
2761  
2762 /////////
2763 // File: tokenizer/english_tokenizer.h
2764 /////////
2765  
2766 // This file is part of MorphoDiTa <http://github.com/ufal/morphodita/>.
2767 //
2768 // Copyright 2015 Institute of Formal and Applied Linguistics, Faculty of
2769 // Mathematics and Physics, Charles University in Prague, Czech Republic.
2770 //
2771 // This Source Code Form is subject to the terms of the Mozilla Public
2772 // License, v. 2.0. If a copy of the MPL was not distributed with this
2773 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
2774  
2775 class english_tokenizer : public ragel_tokenizer {
2776 public:
2777 enum { LATEST = 2 };
2778 english_tokenizer(unsigned version);
2779  
2780 virtual bool next_sentence(vector<token_range>& tokens) override;
2781  
2782 private:
2783 void split_token(vector<token_range>& tokens);
2784  
2785 static const unordered_set<string> abbreviations;
2786 };
2787  
2788 /////////
2789 // File: morpho/english_morpho.cpp
2790 /////////
2791  
2792 // This file is part of MorphoDiTa <http://github.com/ufal/morphodita/>.
2793 //
2794 // Copyright 2015 Institute of Formal and Applied Linguistics, Faculty of
2795 // Mathematics and Physics, Charles University in Prague, Czech Republic.
2796 //
2797 // This Source Code Form is subject to the terms of the Mozilla Public
2798 // License, v. 2.0. If a copy of the MPL was not distributed with this
2799 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
2800  
2801 0 bool english_morpho::load(istream& is) {
2802 0 binary_decoder data;
2803 0 ▶ if (!compressor::load(is, data)) return false;
Branch: 2 branches
BranchTrueFalseTotal
if (!compressor::load(is, data)) return false; 0 0 0
if (!compressor::load(is, data)) return false; 0 0 0
2804  
2805 try {
2806 0 ▶ dictionary.load(data);
Branch: 1 branch
BranchTrueFalseTotal
dictionary.load(data); 0 0 0
2807 0 ▶ morpho_guesser.load(data);
Branch: 2 branches
BranchTrueFalseTotal
morpho_guesser.load(data); 0 0 0
morpho_guesser.load(data); 0 0 0
2808 } catch (binary_decoder_error&) {
2809 return false;
2810 }
2811  
2812 0 return data.is_end();
2813 0 }
2814  
2815 0 int english_morpho::analyze(string_piece form, guesser_mode guesser, vector<tagged_lemma>& lemmas) const {
2816 0 lemmas.clear();
2817  
2818 0 ▶ if (form.len) {
Branch: 1 branch
BranchTrueFalseTotal
if (form.len) { 0 0 0
2819 // Generate all casing variants if needed (they are different than given form).
2820 0 string form_uclc; // first uppercase, rest lowercase
2821 0 string form_lc; // all lowercase
2822 0 ▶ generate_casing_variants(form, form_uclc, form_lc);
Branch: 1 branch
BranchTrueFalseTotal
generate_casing_variants(form, form_uclc, form_lc); 0 0 0
2823  
2824 // Start by analysing using the dictionary and all casing variants.
2825 0 ▶ dictionary.analyze(form, lemmas);
Branch: 1 branch
BranchTrueFalseTotal
dictionary.analyze(form, lemmas); 0 0 0
2826 0 ▶ if (!form_uclc.empty()) dictionary.analyze(form_uclc, lemmas);
Branch: 2 branches
BranchTrueFalseTotal
if (!form_uclc.empty()) dictionary.analyze(form_uclc, lemmas); 0 0 0
if (!form_uclc.empty()) dictionary.analyze(form_uclc, lemmas); 0 0 0
2827 0 ▶ if (!form_lc.empty()) dictionary.analyze(form_lc, lemmas);
Branch: 2 branches
BranchTrueFalseTotal
if (!form_lc.empty()) dictionary.analyze(form_lc, lemmas); 0 0 0
if (!form_lc.empty()) dictionary.analyze(form_lc, lemmas); 0 0 0
2828 0 ▶ if (!lemmas.empty())
Branch: 1 branch
BranchTrueFalseTotal
if (!lemmas.empty()) 0 0 0
2829 0 ▶ return guesser == NO_GUESSER || !morpho_guesser.analyze_proper_names(form, form_lc.empty() ? form : form_lc, lemmas) ? NO_GUESSER : GUESSER;
Branch: 4 branches
BranchTrueFalseTotal
return guesser == NO_GUESSER || !morpho_guesser.analyze_proper_names(form, form_lc.empty() ? form : form_lc, lemmas) ? NO_GUESSER : GUESSER; 0 0 0
return guesser == NO_GUESSER || !morpho_guesser.analyze_proper_names(form, form_lc.empty() ? form : form_lc, lemmas) ? NO_GUESSER : GUESSER; 0 0 0
return guesser == NO_GUESSER || !morpho_guesser.analyze_proper_names(form, form_lc.empty() ? form : form_lc, lemmas) ? NO_GUESSER : GUESSER; 0 0 0
return guesser == NO_GUESSER || !morpho_guesser.analyze_proper_names(form, form_lc.empty() ? form : form_lc, lemmas) ? NO_GUESSER : GUESSER; 0 0 0
2830  
2831 // Then call analyze_special to handle numbers, punctuation and symbols.
2832 0 ▶ analyze_special(form, lemmas);
Branch: 1 branch
BranchTrueFalseTotal
analyze_special(form, lemmas); 0 0 0
2833 0 ▶ if (!lemmas.empty()) return NO_GUESSER;
Branch: 1 branch
BranchTrueFalseTotal
if (!lemmas.empty()) return NO_GUESSER; 0 0 0
2834  
2835 // Use English guesser on form_lc if allowed.
2836 0 ▶ if (guesser == GUESSER)
Branch: 1 branch
BranchTrueFalseTotal
if (guesser == GUESSER) 0 0 0
2837 0 ▶ morpho_guesser.analyze(form, form_lc.empty() ? form : form_lc, lemmas);
Branch: 2 branches
BranchTrueFalseTotal
morpho_guesser.analyze(form, form_lc.empty() ? form : form_lc, lemmas); 0 0 0
morpho_guesser.analyze(form, form_lc.empty() ? form : form_lc, lemmas); 0 0 0
2838 0 ▶ if (!lemmas.empty()) return GUESSER;
Branch: 1 branch
BranchTrueFalseTotal
if (!lemmas.empty()) return GUESSER; 0 0 0
2839 0 ▶ }
Branch: 2 branches
BranchTrueFalseTotal
} 0 0 0
} 0 0 0
2840  
2841 0 ▶ lemmas.emplace_back(string(form.str, form.len), unknown_tag);
Branch: 2 branches
BranchTrueFalseTotal
lemmas.emplace_back(string(form.str, form.len), unknown_tag); 0 0 0
lemmas.emplace_back(string(form.str, form.len), unknown_tag); 0 0 0
2842 0 return -1;
2843 }
2844  
2845 0 int english_morpho::generate(string_piece lemma, const char* tag_wildcard, morpho::guesser_mode /*guesser*/, vector<tagged_lemma_forms>& forms) const {
2846 0 forms.clear();
2847  
2848 0 ▶ tag_filter filter(tag_wildcard);
Branch: 1 branch
BranchTrueFalseTotal
tag_filter filter(tag_wildcard); 0 0 0
2849  
2850 0 ▶ if (lemma.len) {
Branch: 1 branch
BranchTrueFalseTotal
if (lemma.len) { 0 0 0
2851 0 ▶ if (dictionary.generate(lemma, filter, forms))
Branch: 2 branches
BranchTrueFalseTotal
if (dictionary.generate(lemma, filter, forms)) 0 0 0
if (dictionary.generate(lemma, filter, forms)) 0 0 0
2852 0 return NO_GUESSER;
2853 }
2854  
2855 0 return -1;
2856 0 }
2857  
2858 0 int english_morpho::raw_lemma_len(string_piece lemma) const {
2859 0 return english_lemma_addinfo::raw_lemma_len(lemma);
2860 }
2861  
2862 0 int english_morpho::lemma_id_len(string_piece lemma) const {
2863 0 return english_lemma_addinfo::lemma_id_len(lemma);
2864 }
2865  
2866 0 int english_morpho::raw_form_len(string_piece form) const {
2867 0 return form.len;
2868 }
2869  
2870 0 tokenizer* english_morpho::new_tokenizer() const {
2871 0 ▶ return new english_tokenizer(version <= 2 ? 1 : 2);
Branch: 3 branches
BranchTrueFalseTotal
return new english_tokenizer(version <= 2 ? 1 : 2); 0 0 0
return new english_tokenizer(version <= 2 ? 1 : 2); 0 0 0
return new english_tokenizer(version <= 2 ? 1 : 2); 0 0 0
2872 }
2873  
2874 0 void english_morpho::analyze_special(string_piece form, vector<tagged_lemma>& lemmas) const {
2875 using namespace unilib;
2876  
2877 // Analyzer for numbers and punctuation.
2878 0 ▶ if (!form.len) return;
Branch: 1 branch
BranchTrueFalseTotal
if (!form.len) return; 0 0 0
2879  
2880 // One-letter punctuation exceptions.
2881 0 ▶ if (form.len == 1)
Branch: 1 branch
BranchTrueFalseTotal
if (form.len == 1) 0 0 0
2882 0 switch(*form.str) {
2883 0 case '.':
2884 case '!':
2885 0 ▶ case '?': lemmas.emplace_back(string(form.str, form.len), dot_tag); return;
Branch: 2 branches
BranchTrueFalseTotal
case '?': lemmas.emplace_back(string(form.str, form.len), dot_tag); return; 0 0 0
case '?': lemmas.emplace_back(string(form.str, form.len), dot_tag); return; 0 0 0
2886 0 ▶ case ',': lemmas.emplace_back(string(form.str, form.len), comma_tag); return;
Branch: 2 branches
BranchTrueFalseTotal
case ',': lemmas.emplace_back(string(form.str, form.len), comma_tag); return; 0 0 0
case ',': lemmas.emplace_back(string(form.str, form.len), comma_tag); return; 0 0 0
2887 0 ▶ case '#': lemmas.emplace_back(string(form.str, form.len), hash_tag); return;
Branch: 2 branches
BranchTrueFalseTotal
case '#': lemmas.emplace_back(string(form.str, form.len), hash_tag); return; 0 0 0
case '#': lemmas.emplace_back(string(form.str, form.len), hash_tag); return; 0 0 0
2888 0 ▶ case '$': lemmas.emplace_back(string(form.str, form.len), dollar_tag); return;
Branch: 2 branches
BranchTrueFalseTotal
case '$': lemmas.emplace_back(string(form.str, form.len), dollar_tag); return; 0 0 0
case '$': lemmas.emplace_back(string(form.str, form.len), dollar_tag); return; 0 0 0
2889 0 ▶ case '[': lemmas.emplace_back(string(form.str, form.len), sym_tag); return;
Branch: 2 branches
BranchTrueFalseTotal
case '[': lemmas.emplace_back(string(form.str, form.len), sym_tag); return; 0 0 0
case '[': lemmas.emplace_back(string(form.str, form.len), sym_tag); return; 0 0 0
2890 0 ▶ case ']': lemmas.emplace_back(string(form.str, form.len), sym_tag); return;
Branch: 2 branches
BranchTrueFalseTotal
case ']': lemmas.emplace_back(string(form.str, form.len), sym_tag); return; 0 0 0
case ']': lemmas.emplace_back(string(form.str, form.len), sym_tag); return; 0 0 0
2891 0 ▶ case '%': lemmas.emplace_back(string(form.str, form.len), jj_tag);
Branch: 2 branches
BranchTrueFalseTotal
case '%': lemmas.emplace_back(string(form.str, form.len), jj_tag); 0 0 0
case '%': lemmas.emplace_back(string(form.str, form.len), jj_tag); 0 0 0
2892 0 ▶ lemmas.emplace_back(string(form.str, form.len), nn_tag); return;
Branch: 2 branches
BranchTrueFalseTotal
lemmas.emplace_back(string(form.str, form.len), nn_tag); return; 0 0 0
lemmas.emplace_back(string(form.str, form.len), nn_tag); return; 0 0 0
2893 0 ▶ case '&': lemmas.emplace_back(string(form.str, form.len), cc_tag);
Branch: 2 branches
BranchTrueFalseTotal
case '&': lemmas.emplace_back(string(form.str, form.len), cc_tag); 0 0 0
case '&': lemmas.emplace_back(string(form.str, form.len), cc_tag); 0 0 0
2894 0 ▶ lemmas.emplace_back(string(form.str, form.len), sym_tag); return;
Branch: 2 branches
BranchTrueFalseTotal
lemmas.emplace_back(string(form.str, form.len), sym_tag); return; 0 0 0
lemmas.emplace_back(string(form.str, form.len), sym_tag); return; 0 0 0
2895 0 ▶ case '*': lemmas.emplace_back(string(form.str, form.len), sym_tag);
Branch: 2 branches
BranchTrueFalseTotal
case '*': lemmas.emplace_back(string(form.str, form.len), sym_tag); 0 0 0
case '*': lemmas.emplace_back(string(form.str, form.len), sym_tag); 0 0 0
2896 0 ▶ lemmas.emplace_back(string(form.str, form.len), nn_tag); return;
Branch: 2 branches
BranchTrueFalseTotal
lemmas.emplace_back(string(form.str, form.len), nn_tag); return; 0 0 0
lemmas.emplace_back(string(form.str, form.len), nn_tag); return; 0 0 0
2897 0 ▶ case '@': lemmas.emplace_back(string(form.str, form.len), sym_tag);
Branch: 2 branches
BranchTrueFalseTotal
case '@': lemmas.emplace_back(string(form.str, form.len), sym_tag); 0 0 0
case '@': lemmas.emplace_back(string(form.str, form.len), sym_tag); 0 0 0
2898 0 ▶ lemmas.emplace_back(string(form.str, form.len), in_tag); return;
Branch: 2 branches
BranchTrueFalseTotal
lemmas.emplace_back(string(form.str, form.len), in_tag); return; 0 0 0
lemmas.emplace_back(string(form.str, form.len), in_tag); return; 0 0 0
2899 0 ▶ case '\'': lemmas.emplace_back(string(form.str, form.len), close_quotation_tag);
Branch: 2 branches
BranchTrueFalseTotal
case '\'': lemmas.emplace_back(string(form.str, form.len), close_quotation_tag); 0 0 0
case '\'': lemmas.emplace_back(string(form.str, form.len), close_quotation_tag); 0 0 0
2900 0 ▶ lemmas.emplace_back(string(form.str, form.len), pos_tag); return;
Branch: 2 branches
BranchTrueFalseTotal
lemmas.emplace_back(string(form.str, form.len), pos_tag); return; 0 0 0
lemmas.emplace_back(string(form.str, form.len), pos_tag); return; 0 0 0
2901 }
2902  
2903 // Try matching a number: [+-]? is_Pn* (, is_Pn{3})? (. is_Pn*)? (s | [Ee] [+-]? is_Pn+)? with at least one digit
2904 0 string_piece number = form;
2905 0 char32_t codepoint = utf8::decode(number.str, number.len);
2906 0 bool any_digit = false;
2907 0 ▶ if (codepoint == '+' || codepoint == '-') codepoint = utf8::decode(number.str, number.len);
Branch: 2 branches
BranchTrueFalseTotal
if (codepoint == '+' || codepoint == '-') codepoint = utf8::decode(number.str, number.len); 0 0 0
if (codepoint == '+' || codepoint == '-') codepoint = utf8::decode(number.str, number.len); 0 0 0
2908 0 ▶ while (unicode::category(codepoint) & unicode::N) any_digit = true, codepoint = utf8::decode(number.str, number.len);
Branch: 1 branch
BranchTrueFalseTotal
while (unicode::category(codepoint) & unicode::N) any_digit = true, codepoint = utf8::decode(number.str, number.len); 0 0 0
2909 0 ▶ while (codepoint == ',') {
Branch: 1 branch
BranchTrueFalseTotal
while (codepoint == ',') { 0 0 0
2910 0 string_piece group = number;
2911 0 ▶ if (unicode::category(utf8::decode(group.str, group.len) & ~unicode::N)) break;
Branch: 1 branch
BranchTrueFalseTotal
if (unicode::category(utf8::decode(group.str, group.len) & ~unicode::N)) break; 0 0 0
2912 0 ▶ if (unicode::category(utf8::decode(group.str, group.len) & ~unicode::N)) break;
Branch: 1 branch
BranchTrueFalseTotal
if (unicode::category(utf8::decode(group.str, group.len) & ~unicode::N)) break; 0 0 0
2913 0 ▶ if (unicode::category(utf8::decode(group.str, group.len) & ~unicode::N)) break;
Branch: 1 branch
BranchTrueFalseTotal
if (unicode::category(utf8::decode(group.str, group.len) & ~unicode::N)) break; 0 0 0
2914 0 any_digit = true;
2915 0 number = group;
2916 0 codepoint = utf8::decode(number.str, number.len);
2917 }
2918 0 ▶ if (codepoint == '.' && number.len) {
Branch: 2 branches
BranchTrueFalseTotal
if (codepoint == '.' && number.len) { 0 0 0
if (codepoint == '.' && number.len) { 0 0 0
2919 0 codepoint = utf8::decode(number.str, number.len);
2920 0 ▶ while (unicode::category(codepoint) & unicode::N) any_digit = true, codepoint = utf8::decode(number.str, number.len);
Branch: 1 branch
BranchTrueFalseTotal
while (unicode::category(codepoint) & unicode::N) any_digit = true, codepoint = utf8::decode(number.str, number.len); 0 0 0
2921 }
2922 0 ▶ if (version >= 2 && any_digit && codepoint == 's' && !number.len) {
Branch: 4 branches
BranchTrueFalseTotal
if (version >= 2 && any_digit && codepoint == 's' && !number.len) { 0 0 0
if (version >= 2 && any_digit && codepoint == 's' && !number.len) { 0 0 0
if (version >= 2 && any_digit && codepoint == 's' && !number.len) { 0 0 0
if (version >= 2 && any_digit && codepoint == 's' && !number.len) { 0 0 0
2923 0 ▶ lemmas.emplace_back(string(form.str, form.len), number_tag);
Branch: 2 branches
BranchTrueFalseTotal
lemmas.emplace_back(string(form.str, form.len), number_tag); 0 0 0
lemmas.emplace_back(string(form.str, form.len), number_tag); 0 0 0
2924 0 ▶ lemmas.emplace_back(string(form.str, form.len - 1), nns_tag);
Branch: 2 branches
BranchTrueFalseTotal
lemmas.emplace_back(string(form.str, form.len - 1), nns_tag); 0 0 0
lemmas.emplace_back(string(form.str, form.len - 1), nns_tag); 0 0 0
2925 0 return;
2926 }
2927 0 ▶ if (any_digit && (codepoint == 'e' || codepoint == 'E')) {
Branch: 3 branches
BranchTrueFalseTotal
if (any_digit && (codepoint == 'e' || codepoint == 'E')) { 0 0 0
if (any_digit && (codepoint == 'e' || codepoint == 'E')) { 0 0 0
if (any_digit && (codepoint == 'e' || codepoint == 'E')) { 0 0 0
2928 0 codepoint = utf8::decode(number.str, number.len);
2929 0 ▶ if (codepoint == '+' || codepoint == '-') codepoint = utf8::decode(number.str, number.len);
Branch: 2 branches
BranchTrueFalseTotal
if (codepoint == '+' || codepoint == '-') codepoint = utf8::decode(number.str, number.len); 0 0 0
if (codepoint == '+' || codepoint == '-') codepoint = utf8::decode(number.str, number.len); 0 0 0
2930 0 any_digit = false;
2931 0 ▶ while (unicode::category(codepoint) & unicode::N) any_digit = true, codepoint = utf8::decode(number.str, number.len);
Branch: 1 branch
BranchTrueFalseTotal
while (unicode::category(codepoint) & unicode::N) any_digit = true, codepoint = utf8::decode(number.str, number.len); 0 0 0
2932 }
2933 0 ▶ if (any_digit && !number.len && (!codepoint || codepoint == '.')) {
Branch: 4 branches
BranchTrueFalseTotal
if (any_digit && !number.len && (!codepoint || codepoint == '.')) { 0 0 0
if (any_digit && !number.len && (!codepoint || codepoint == '.')) { 0 0 0
if (any_digit && !number.len && (!codepoint || codepoint == '.')) { 0 0 0
if (any_digit && !number.len && (!codepoint || codepoint == '.')) { 0 0 0
2934 0 ▶ lemmas.emplace_back(string(form.str, form.len), number_tag);
Branch: 2 branches
BranchTrueFalseTotal
lemmas.emplace_back(string(form.str, form.len), number_tag); 0 0 0
lemmas.emplace_back(string(form.str, form.len), number_tag); 0 0 0
2935 0 ▶ lemmas.emplace_back(string(form.str, form.len), nnp_tag);
Branch: 2 branches
BranchTrueFalseTotal
lemmas.emplace_back(string(form.str, form.len), nnp_tag); 0 0 0
lemmas.emplace_back(string(form.str, form.len), nnp_tag); 0 0 0
2936 0 ▶ if (form.len == 1 + (codepoint == '.') && *form.str >= '1' && *form.str <= '9')
Branch: 4 branches
BranchTrueFalseTotal
if (form.len == 1 + (codepoint == '.') && *form.str >= '1' && *form.str <= '9') 0 0 0
if (form.len == 1 + (codepoint == '.') && *form.str >= '1' && *form.str <= '9') 0 0 0
if (form.len == 1 + (codepoint == '.') && *form.str >= '1' && *form.str <= '9') 0 0 0
if (form.len == 1 + (codepoint == '.') && *form.str >= '1' && *form.str <= '9') 0 0 0
2937 0 ▶ lemmas.emplace_back(string(form.str, form.len), ls_tag);
Branch: 2 branches
BranchTrueFalseTotal
lemmas.emplace_back(string(form.str, form.len), ls_tag); 0 0 0
lemmas.emplace_back(string(form.str, form.len), ls_tag); 0 0 0
2938 0 return;
2939 }
2940  
2941 // Open quotation, end quotation, open parentheses, end parentheses, symbol, or other
2942 0 string_piece punctuation = form;
2943 0 bool open_quotation = true, close_quotation = true, open_parenthesis = true, close_parenthesis = true, any_punctuation = true, symbol = true;
2944 0 ▶ while ((symbol || any_punctuation) && punctuation.len) {
Branch: 3 branches
BranchTrueFalseTotal
while ((symbol || any_punctuation) && punctuation.len) { 0 0 0
while ((symbol || any_punctuation) && punctuation.len) { 0 0 0
while ((symbol || any_punctuation) && punctuation.len) { 0 0 0
2945 0 codepoint = utf8::decode(punctuation.str, punctuation.len);
2946 0 ▶ if (open_quotation) open_quotation = codepoint == '`' || unicode::category(codepoint) & unicode::Pi;
Branch: 3 branches
BranchTrueFalseTotal
if (open_quotation) open_quotation = codepoint == '`' || unicode::category(codepoint) & unicode::Pi; 0 0 0
if (open_quotation) open_quotation = codepoint == '`' || unicode::category(codepoint) & unicode::Pi; 0 0 0
if (open_quotation) open_quotation = codepoint == '`' || unicode::category(codepoint) & unicode::Pi; 0 0 0
2947 0 ▶ if (close_quotation) close_quotation = codepoint == '\'' || codepoint == '"' || unicode::category(codepoint) & unicode::Pf;
Branch: 4 branches
BranchTrueFalseTotal
if (close_quotation) close_quotation = codepoint == '\'' || codepoint == '"' || unicode::category(codepoint) & unicode::Pf; 0 0 0
if (close_quotation) close_quotation = codepoint == '\'' || codepoint == '"' || unicode::category(codepoint) & unicode::Pf; 0 0 0
if (close_quotation) close_quotation = codepoint == '\'' || codepoint == '"' || unicode::category(codepoint) & unicode::Pf; 0 0 0
if (close_quotation) close_quotation = codepoint == '\'' || codepoint == '"' || unicode::category(codepoint) & unicode::Pf; 0 0 0
2948 0 ▶ if (open_parenthesis) open_parenthesis = unicode::category(codepoint) & unicode::Ps;
Branch: 1 branch
BranchTrueFalseTotal
if (open_parenthesis) open_parenthesis = unicode::category(codepoint) & unicode::Ps; 0 0 0
2949 0 ▶ if (close_parenthesis) close_parenthesis = unicode::category(codepoint) & unicode::Pe;
Branch: 1 branch
BranchTrueFalseTotal
if (close_parenthesis) close_parenthesis = unicode::category(codepoint) & unicode::Pe; 0 0 0
2950 0 ▶ if (any_punctuation) any_punctuation = unicode::category(codepoint) & unicode::P;
Branch: 1 branch
BranchTrueFalseTotal
if (any_punctuation) any_punctuation = unicode::category(codepoint) & unicode::P; 0 0 0
2951 0 ▶ if (symbol) symbol = codepoint == '*' || unicode::category(codepoint) & unicode::S;
Branch: 3 branches
BranchTrueFalseTotal
if (symbol) symbol = codepoint == '*' || unicode::category(codepoint) & unicode::S; 0 0 0
if (symbol) symbol = codepoint == '*' || unicode::category(codepoint) & unicode::S; 0 0 0
if (symbol) symbol = codepoint == '*' || unicode::category(codepoint) & unicode::S; 0 0 0
2952 }
2953 0 ▶ if (!punctuation.len && open_quotation) { lemmas.emplace_back(string(form.str, form.len), open_quotation_tag); return; }
Branch: 4 branches
BranchTrueFalseTotal
if (!punctuation.len && open_quotation) { lemmas.emplace_back(string(form.str, form.len), open_quotation_tag); return; } 0 0 0
if (!punctuation.len && open_quotation) { lemmas.emplace_back(string(form.str, form.len), open_quotation_tag); return; } 0 0 0
if (!punctuation.len && open_quotation) { lemmas.emplace_back(string(form.str, form.len), open_quotation_tag); return; } 0 0 0
if (!punctuation.len && open_quotation) { lemmas.emplace_back(string(form.str, form.len), open_quotation_tag); return; } 0 0 0
2954 0 ▶ if (!punctuation.len && close_quotation) { lemmas.emplace_back(string(form.str, form.len), close_quotation_tag); return; }
Branch: 4 branches
BranchTrueFalseTotal
if (!punctuation.len && close_quotation) { lemmas.emplace_back(string(form.str, form.len), close_quotation_tag); return; } 0 0 0
if (!punctuation.len && close_quotation) { lemmas.emplace_back(string(form.str, form.len), close_quotation_tag); return; } 0 0 0
if (!punctuation.len && close_quotation) { lemmas.emplace_back(string(form.str, form.len), close_quotation_tag); return; } 0 0 0
if (!punctuation.len && close_quotation) { lemmas.emplace_back(string(form.str, form.len), close_quotation_tag); return; } 0 0 0
2955 0 ▶ if (!punctuation.len && open_parenthesis) { lemmas.emplace_back(string(form.str, form.len), open_parenthesis_tag); return; }
Branch: 4 branches
BranchTrueFalseTotal
if (!punctuation.len && open_parenthesis) { lemmas.emplace_back(string(form.str, form.len), open_parenthesis_tag); return; } 0 0 0
if (!punctuation.len && open_parenthesis) { lemmas.emplace_back(string(form.str, form.len), open_parenthesis_tag); return; } 0 0 0
if (!punctuation.len && open_parenthesis) { lemmas.emplace_back(string(form.str, form.len), open_parenthesis_tag); return; } 0 0 0
if (!punctuation.len && open_parenthesis) { lemmas.emplace_back(string(form.str, form.len), open_parenthesis_tag); return; } 0 0 0
2956 0 ▶ if (!punctuation.len && close_parenthesis) { lemmas.emplace_back(string(form.str, form.len), close_parenthesis_tag); return; }
Branch: 4 branches
BranchTrueFalseTotal
if (!punctuation.len && close_parenthesis) { lemmas.emplace_back(string(form.str, form.len), close_parenthesis_tag); return; } 0 0 0
if (!punctuation.len && close_parenthesis) { lemmas.emplace_back(string(form.str, form.len), close_parenthesis_tag); return; } 0 0 0
if (!punctuation.len && close_parenthesis) { lemmas.emplace_back(string(form.str, form.len), close_parenthesis_tag); return; } 0 0 0
if (!punctuation.len && close_parenthesis) { lemmas.emplace_back(string(form.str, form.len), close_parenthesis_tag); return; } 0 0 0
2957 0 ▶ if (!punctuation.len && symbol) { lemmas.emplace_back(string(form.str, form.len), sym_tag); return; }
Branch: 4 branches
BranchTrueFalseTotal
if (!punctuation.len && symbol) { lemmas.emplace_back(string(form.str, form.len), sym_tag); return; } 0 0 0
if (!punctuation.len && symbol) { lemmas.emplace_back(string(form.str, form.len), sym_tag); return; } 0 0 0
if (!punctuation.len && symbol) { lemmas.emplace_back(string(form.str, form.len), sym_tag); return; } 0 0 0
if (!punctuation.len && symbol) { lemmas.emplace_back(string(form.str, form.len), sym_tag); return; } 0 0 0
2958 0 ▶ if (!punctuation.len && any_punctuation) { lemmas.emplace_back(string(form.str, form.len), punctuation_tag); return; }
Branch: 4 branches
BranchTrueFalseTotal
if (!punctuation.len && any_punctuation) { lemmas.emplace_back(string(form.str, form.len), punctuation_tag); return; } 0 0 0
if (!punctuation.len && any_punctuation) { lemmas.emplace_back(string(form.str, form.len), punctuation_tag); return; } 0 0 0
if (!punctuation.len && any_punctuation) { lemmas.emplace_back(string(form.str, form.len), punctuation_tag); return; } 0 0 0
if (!punctuation.len && any_punctuation) { lemmas.emplace_back(string(form.str, form.len), punctuation_tag); return; } 0 0 0
2959 }
2960  
2961 /////////
2962 // File: morpho/english_morpho_guesser.cpp
2963 /////////
2964  
2965 // This file is part of MorphoDiTa <http://github.com/ufal/morphodita/>.
2966 //
2967 // Copyright 2015 Institute of Formal and Applied Linguistics, Faculty of
2968 // Mathematics and Physics, Charles University in Prague, Czech Republic.
2969 //
2970 // This Source Code Form is subject to the terms of the Mozilla Public
2971 // License, v. 2.0. If a copy of the MPL was not distributed with this
2972 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
2973  
2974 // This code is a reimplementation of morphologic analyzer Morphium
2975 // by Johanka Spoustova (Treex::Tool::EnglishMorpho::Analysis Perl module)
2976 // and reimplementation of morphologic lemmatizer by Martin Popel
2977 // (Treex::Tool::EnglishMorpho::Lemmatizer Perl module). The latter is based
2978 // on morpha:
2979 // Minnen, G., J. Carroll and D. Pearce (2001). Applied morphological
2980 // processing of English, Natural Language Engineering, 7(3). 207-223.
2981 // Morpha has been released under LGPL as a part of RASP system
2982 // http://ilexir.co.uk/applications/rasp/.
2983  
2984 0 void english_morpho_guesser::load(binary_decoder& data) {
2985 0 unsigned tags = data.next_2B();
2986 0 exceptions_tags.clear();
2987 0 exceptions_tags.reserve(tags);
2988 0 ▶ while (tags--) {
Branch: 1 branch
BranchTrueFalseTotal
while (tags--) { 0 0 0
2989 0 unsigned len = data.next_1B();
2990 0 ▶ exceptions_tags.emplace_back(string(data.next<char>(len), len));
Branch: 3 branches
BranchTrueFalseTotal
exceptions_tags.emplace_back(string(data.next<char>(len), len)); 0 0 0
exceptions_tags.emplace_back(string(data.next<char>(len), len)); 0 0 0
exceptions_tags.emplace_back(string(data.next<char>(len), len)); 0 0 0
2991 }
2992  
2993 0 exceptions.load(data);
2994 0 negations.load(data);
2995 0 }
2996  
2997 static const char _tag_guesser_actions[] = {
2998 0, 1, 0, 1, 1, 1, 2, 1,
2999 3, 1, 4, 1, 5, 1, 6, 1,
3000 7, 2, 2, 6, 2, 2, 7, 2,
3001 4, 6, 2, 4, 7, 2, 5, 6,
3002 2, 5, 7, 2, 6, 7, 3, 2,
3003 6, 7, 3, 4, 6, 7, 3, 5,
3004 6, 7
3005 };
3006  
3007 static const unsigned char _tag_guesser_key_offsets[] = {
3008 0, 19, 26, 34, 42, 50, 58, 66,
3009 74, 82, 90, 100, 108, 116, 124, 132,
3010 145, 153, 161, 168, 179, 195, 212, 220,
3011 228, 236
3012 };
3013  
3014 static const char _tag_guesser_trans_keys[] = {
3015 45, 46, 99, 100, 103, 105, 109, 110,
3016 114, 115, 116, 118, 120, 48, 57, 65,
3017 90, 97, 122, 45, 48, 57, 65, 90,
3018 97, 122, 45, 114, 48, 57, 65, 90,
3019 97, 122, 45, 111, 48, 57, 65, 90,
3020 97, 122, 45, 109, 48, 57, 65, 90,
3021 97, 122, 45, 101, 48, 57, 65, 90,
3022 97, 122, 45, 115, 48, 57, 65, 90,
3023 97, 122, 45, 101, 48, 57, 65, 90,
3024 97, 122, 45, 108, 48, 57, 65, 90,
3025 97, 122, 45, 115, 48, 57, 65, 90,
3026 97, 122, 45, 97, 101, 111, 48, 57,
3027 65, 90, 98, 122, 45, 101, 48, 57,
3028 65, 90, 97, 122, 45, 108, 48, 57,
3029 65, 90, 97, 122, 45, 109, 48, 57,
3030 65, 90, 97, 122, 45, 105, 48, 57,
3031 65, 90, 97, 122, 45, 97, 101, 105,
3032 111, 117, 121, 48, 57, 65, 90, 98,
3033 122, 45, 115, 48, 57, 65, 90, 97,
3034 122, 45, 101, 48, 57, 65, 90, 97,
3035 122, 45, 48, 57, 65, 90, 97, 122,
3036 45, 101, 114, 115, 116, 48, 57, 65,
3037 90, 97, 122, 45, 46, 105, 109, 118,
3038 120, 48, 57, 65, 90, 97, 98, 99,
3039 100, 101, 122, 45, 46, 101, 105, 109,
3040 118, 120, 48, 57, 65, 90, 97, 98,
3041 99, 100, 102, 122, 45, 110, 48, 57,
3042 65, 90, 97, 122, 45, 105, 48, 57,
3043 65, 90, 97, 122, 45, 101, 48, 57,
3044 65, 90, 97, 122, 45, 115, 48, 57,
3045 65, 90, 97, 122, 0
3046 };
3047  
3048 static const char _tag_guesser_single_lengths[] = {
3049 13, 1, 2, 2, 2, 2, 2, 2,
3050 2, 2, 4, 2, 2, 2, 2, 7,
3051 2, 2, 1, 5, 6, 7, 2, 2,
3052 2, 2
3053 };
3054  
3055 static const char _tag_guesser_range_lengths[] = {
3056 3, 3, 3, 3, 3, 3, 3, 3,
3057 3, 3, 3, 3, 3, 3, 3, 3,
3058 3, 3, 3, 3, 5, 5, 3, 3,
3059 3, 3
3060 };
3061  
3062 static const unsigned char _tag_guesser_index_offsets[] = {
3063 0, 17, 22, 28, 34, 40, 46, 52,
3064 58, 64, 70, 78, 84, 90, 96, 102,
3065 113, 119, 125, 130, 139, 151, 164, 170,
3066 176, 182
3067 };
3068  
3069 static const char _tag_guesser_indicies[] = {
3070 1, 2, 5, 6, 7, 5, 5, 8,
3071 9, 10, 11, 5, 5, 3, 4, 4,
3072 0, 13, 14, 15, 15, 12, 13, 16,
3073 14, 15, 15, 12, 13, 17, 14, 15,
3074 15, 12, 13, 18, 14, 15, 15, 12,
3075 13, 18, 14, 15, 15, 12, 13, 19,
3076 14, 15, 15, 12, 13, 20, 14, 15,
3077 15, 12, 13, 18, 14, 15, 15, 12,
3078 13, 21, 14, 15, 15, 12, 13, 22,
3079 23, 24, 14, 15, 15, 12, 13, 25,
3080 14, 15, 15, 12, 13, 23, 14, 15,
3081 15, 12, 13, 23, 14, 15, 15, 12,
3082 13, 26, 14, 15, 15, 12, 28, 15,
3083 15, 15, 15, 15, 15, 29, 26, 26,
3084 27, 31, 4, 32, 33, 33, 30, 13,
3085 23, 14, 15, 15, 12, 13, 14, 15,
3086 15, 12, 13, 34, 35, 36, 37, 14,
3087 15, 15, 12, 13, 38, 39, 39, 39,
3088 39, 14, 15, 15, 39, 15, 12, 13,
3089 38, 40, 39, 39, 39, 39, 14, 15,
3090 15, 39, 15, 12, 13, 41, 14, 15,
3091 15, 12, 13, 42, 14, 15, 15, 12,
3092 13, 18, 14, 15, 15, 12, 13, 43,
3093 14, 15, 15, 12, 0
3094 };
3095  
3096 static const char _tag_guesser_trans_targs[] = {
3097 18, 19, 20, 18, 18, 20, 21, 22,
3098 23, 24, 16, 25, 18, 19, 18, 1,
3099 3, 4, 18, 7, 8, 10, 11, 18,
3100 13, 12, 18, 18, 19, 18, 18, 19,
3101 18, 18, 2, 5, 6, 9, 20, 20,
3102 18, 14, 15, 17
3103 };
3104  
3105 static const char _tag_guesser_trans_actions[] = {
3106 29, 46, 29, 32, 11, 11, 11, 11,
3107 11, 11, 0, 11, 13, 35, 15, 0,
3108 0, 0, 1, 0, 0, 0, 0, 3,
3109 0, 0, 5, 17, 38, 20, 23, 42,
3110 26, 9, 0, 0, 0, 0, 13, 0,
3111 7, 0, 0, 0
3112 };
3113  
3114 static const char _tag_guesser_eof_actions[] = {
3115 0, 0, 0, 0, 0, 0, 0, 0,
3116 0, 0, 0, 0, 0, 0, 0, 0,
3117 0, 0, 0, 0, 15, 15, 0, 0,
3118 0, 0
3119 };
3120  
3121 static const int tag_guesser_start = 0;
3122  
3123 0 void english_morpho_guesser::analyze(string_piece form, string_piece form_lc, vector<tagged_lemma>& lemmas) const {
3124 // Try exceptions list
3125 0 ▶ auto* exception = exceptions.at(form_lc.str, form_lc.len, [](pointer_decoder& data){
Branch: 1 branch
BranchTrueFalseTotal
auto* exception = exceptions.at(form_lc.str, form_lc.len, [](pointer_decoder& data){ 0 0 0
3126 0 ▶ for (unsigned len = data.next_1B(); len; len--) {
Branch: 1 branch
BranchTrueFalseTotal
for (unsigned len = data.next_1B(); len; len--) { 0 0 0
3127 0 data.next<char>(data.next_1B());
3128 0 data.next<uint16_t>(data.next_1B());
3129 }
3130 0 });
3131  
3132 0 ▶ if (exception) {
Branch: 1 branch
BranchTrueFalseTotal
if (exception) { 0 0 0
3133 // Found in exceptions list
3134 0 pointer_decoder data(exception);
3135 0 ▶ for (unsigned len = data.next_1B(); len; len--) {
Branch: 1 branch
BranchTrueFalseTotal
for (unsigned len = data.next_1B(); len; len--) { 0 0 0
3136 0 unsigned lemma_len = data.next_1B();
3137 0 ▶ string lemma(data.next<char>(lemma_len), lemma_len);
Branch: 1 branch
BranchTrueFalseTotal
string lemma(data.next<char>(lemma_len), lemma_len); 0 0 0
3138 0 ▶ for (unsigned tags = data.next_1B(); tags; tags--)
Branch: 1 branch
BranchTrueFalseTotal
for (unsigned tags = data.next_1B(); tags; tags--) 0 0 0
3139 0 ▶ lemmas.emplace_back(lemma, exceptions_tags[data.next_2B()]);
Branch: 1 branch
BranchTrueFalseTotal
lemmas.emplace_back(lemma, exceptions_tags[data.next_2B()]); 0 0 0
3140 0 }
3141 } else {
3142 // Try stripping negative prefix and use rule guesser
3143 0 ▶ string lemma_lc(form_lc.str, form_lc.len);
Branch: 1 branch
BranchTrueFalseTotal
string lemma_lc(form_lc.str, form_lc.len); 0 0 0
3144 // Try finding negative prefix
3145 0 unsigned negation_len = 0;
3146 0 ▶ for (unsigned prefix = 1; prefix <= form_lc.len; prefix++) {
Branch: 1 branch
BranchTrueFalseTotal
for (unsigned prefix = 1; prefix <= form_lc.len; prefix++) { 0 0 0
3147 0 ▶ auto found = negations.at(form_lc.str, prefix, [](pointer_decoder& data){ data.next<unsigned char>(TOTAL); });
Branch: 1 branch
BranchTrueFalseTotal
auto found = negations.at(form_lc.str, prefix, [](pointer_decoder& data){ data.next<unsigned char>(TOTAL); }); 0 0 0
3148 0 ▶ if (!found) break;
Branch: 1 branch
BranchTrueFalseTotal
if (!found) break; 0 0 0
3149 0 ▶ if (found[NEGATION_LEN]) {
Branch: 1 branch
BranchTrueFalseTotal
if (found[NEGATION_LEN]) { 0 0 0
3150 0 ▶ if (form_lc.len - prefix >= found[TO_FOLLOW]) negation_len = found[NEGATION_LEN];
Branch: 1 branch
BranchTrueFalseTotal
if (form_lc.len - prefix >= found[TO_FOLLOW]) negation_len = found[NEGATION_LEN]; 0 0 0
3151 }
3152 }
3153  
3154 // Add default tags
3155 0 ▶ add(FW, lemma_lc, lemmas);
Branch: 1 branch
BranchTrueFalseTotal
add(FW, lemma_lc, lemmas); 0 0 0
3156 0 ▶ add(JJ, lemma_lc, negation_len, lemmas);
Branch: 1 branch
BranchTrueFalseTotal
add(JJ, lemma_lc, negation_len, lemmas); 0 0 0
3157 0 ▶ add(RB, lemma_lc, negation_len, lemmas);
Branch: 1 branch
BranchTrueFalseTotal
add(RB, lemma_lc, negation_len, lemmas); 0 0 0
3158 0 ▶ add(NN, lemma_lc, negation_len, lemmas);
Branch: 1 branch
BranchTrueFalseTotal
add(NN, lemma_lc, negation_len, lemmas); 0 0 0
3159 0 ▶ add_NNS(lemma_lc, negation_len, lemmas);
Branch: 1 branch
BranchTrueFalseTotal
add_NNS(lemma_lc, negation_len, lemmas); 0 0 0
3160  
3161 // Add specialized tags
3162 0 const char* p = form_lc.str; int cs;
3163 0 bool added_JJR_RBR = false, added_JJS_RBS = false, added_SYM = false, added_CD = false;
3164
3165 {
3166 0 cs = tag_guesser_start;
3167 }
3168  
3169 {
3170 int _klen;
3171 unsigned int _trans;
3172 const char *_acts;
3173 unsigned int _nacts;
3174 const char *_keys;
3175  
3176 0 ▶ if ( p == ( (form_lc.str + form_lc.len)) )
Branch: 1 branch
BranchTrueFalseTotal
if ( p == ( (form_lc.str + form_lc.len)) ) 0 0 0
3177 0 goto _test_eof;
3178 0 _resume:
3179 0 _keys = _tag_guesser_trans_keys + _tag_guesser_key_offsets[cs];
3180 0 _trans = _tag_guesser_index_offsets[cs];
3181  
3182 0 _klen = _tag_guesser_single_lengths[cs];
3183 0 ▶ if ( _klen > 0 ) {
Branch: 1 branch
BranchTrueFalseTotal
if ( _klen > 0 ) { 0 0 0
3184 0 const char *_lower = _keys;
3185 const char *_mid;
3186 0 const char *_upper = _keys + _klen - 1;
3187 while (1) {
3188 0 ▶ if ( _upper < _lower )
Branch: 1 branch
BranchTrueFalseTotal
if ( _upper < _lower ) 0 0 0
3189 0 break;
3190  
3191 0 _mid = _lower + ((_upper-_lower) >> 1);
3192 0 ▶ if ( ( form_lc.str[form_lc.len - 1 - (p - form_lc.str)]) < *_mid )
Branch: 1 branch
BranchTrueFalseTotal
if ( ( form_lc.str[form_lc.len - 1 - (p - form_lc.str)]) < *_mid ) 0 0 0
3193 0 _upper = _mid - 1;
3194 0 ▶ else if ( ( form_lc.str[form_lc.len - 1 - (p - form_lc.str)]) > *_mid )
Branch: 1 branch
BranchTrueFalseTotal
else if ( ( form_lc.str[form_lc.len - 1 - (p - form_lc.str)]) > *_mid ) 0 0 0
3195 0 _lower = _mid + 1;
3196 else {
3197 0 _trans += (unsigned int)(_mid - _keys);
3198 0 goto _match;
3199 }
3200 }
3201 0 _keys += _klen;
3202 0 _trans += _klen;
3203 }
3204  
3205 0 _klen = _tag_guesser_range_lengths[cs];
3206 0 ▶ if ( _klen > 0 ) {
Branch: 1 branch
BranchTrueFalseTotal
if ( _klen > 0 ) { 0 0 0
3207 0 const char *_lower = _keys;
3208 const char *_mid;
3209 0 const char *_upper = _keys + (_klen<<1) - 2;
3210 while (1) {
3211 0 ▶ if ( _upper < _lower )
Branch: 1 branch
BranchTrueFalseTotal
if ( _upper < _lower ) 0 0 0
3212 0 break;
3213  
3214 0 _mid = _lower + (((_upper-_lower) >> 1) & ~1);
3215 0 ▶ if ( ( form_lc.str[form_lc.len - 1 - (p - form_lc.str)]) < _mid[0] )
Branch: 1 branch
BranchTrueFalseTotal
if ( ( form_lc.str[form_lc.len - 1 - (p - form_lc.str)]) < _mid[0] ) 0 0 0
3216 0 _upper = _mid - 2;
3217 0 ▶ else if ( ( form_lc.str[form_lc.len - 1 - (p - form_lc.str)]) > _mid[1] )
Branch: 1 branch
BranchTrueFalseTotal
else if ( ( form_lc.str[form_lc.len - 1 - (p - form_lc.str)]) > _mid[1] ) 0 0 0
3218 0 _lower = _mid + 2;
3219 else {
3220 0 _trans += (unsigned int)((_mid - _keys)>>1);
3221 0 goto _match;
3222 }
3223 }
3224 0 _trans += _klen;
3225 }
3226  
3227 0 _match:
3228 0 _trans = _tag_guesser_indicies[_trans];
3229 0 cs = _tag_guesser_trans_targs[_trans];
3230  
3231 0 ▶ if ( _tag_guesser_trans_actions[_trans] == 0 )
Branch: 1 branch
BranchTrueFalseTotal
if ( _tag_guesser_trans_actions[_trans] == 0 ) 0 0 0
3232 0 goto _again;
3233  
3234 0 _acts = _tag_guesser_actions + _tag_guesser_trans_actions[_trans];
3235 0 _nacts = (unsigned int) *_acts++;
3236 0 ▶ while ( _nacts-- > 0 )
Branch: 1 branch
BranchTrueFalseTotal
while ( _nacts-- > 0 ) 0 0 0
3237 {
3238 0 switch ( *_acts++ )
3239 {
3240 0 case 0:
3241 0 ▶ { if (!added_JJR_RBR) added_JJR_RBR = true, add_JJR_RBR(lemma_lc, negation_len, lemmas); }
Branch: 2 branches
BranchTrueFalseTotal
{ if (!added_JJR_RBR) added_JJR_RBR = true, add_JJR_RBR(lemma_lc, negation_len, lemmas); } 0 0 0
{ if (!added_JJR_RBR) added_JJR_RBR = true, add_JJR_RBR(lemma_lc, negation_len, lemmas); } 0 0 0
3242 0 break;
3243 0 case 1:
3244 0 ▶ { if (!added_JJS_RBS) added_JJS_RBS = true, add_JJS_RBS(lemma_lc, negation_len, lemmas); }
Branch: 2 branches
BranchTrueFalseTotal
{ if (!added_JJS_RBS) added_JJS_RBS = true, add_JJS_RBS(lemma_lc, negation_len, lemmas); } 0 0 0
{ if (!added_JJS_RBS) added_JJS_RBS = true, add_JJS_RBS(lemma_lc, negation_len, lemmas); } 0 0 0
3245 0 break;
3246 0 case 2:
3247 0 ▶ { add_VBG(lemma_lc, lemmas); }
Branch: 1 branch
BranchTrueFalseTotal
{ add_VBG(lemma_lc, lemmas); } 0 0 0
3248 0 break;
3249 0 case 3:
3250 0 ▶ { add_VBD_VBN(lemma_lc, lemmas); }
Branch: 1 branch
BranchTrueFalseTotal
{ add_VBD_VBN(lemma_lc, lemmas); } 0 0 0
3251 0 break;
3252 0 case 4:
3253 0 ▶ { add_VBZ(lemma_lc, lemmas); }
Branch: 1 branch
BranchTrueFalseTotal
{ add_VBZ(lemma_lc, lemmas); } 0 0 0
3254 0 break;
3255 0 case 5:
3256 0 ▶ { add(VB, lemma_lc, lemmas); add(VBP, lemma_lc, lemmas); }
Branch: 2 branches
BranchTrueFalseTotal
{ add(VB, lemma_lc, lemmas); add(VBP, lemma_lc, lemmas); } 0 0 0
{ add(VB, lemma_lc, lemmas); add(VBP, lemma_lc, lemmas); } 0 0 0
3257 0 break;
3258 0 case 6:
3259 0 ▶ { if (!added_SYM) added_SYM = true, add(SYM, lemma_lc, lemmas); }
Branch: 2 branches
BranchTrueFalseTotal
{ if (!added_SYM) added_SYM = true, add(SYM, lemma_lc, lemmas); } 0 0 0
{ if (!added_SYM) added_SYM = true, add(SYM, lemma_lc, lemmas); } 0 0 0
3260 0 break;
3261 0 case 7:
3262 0 ▶ { if (!added_CD) added_CD = true, add(CD, lemma_lc, lemmas); }
Branch: 2 branches
BranchTrueFalseTotal
{ if (!added_CD) added_CD = true, add(CD, lemma_lc, lemmas); } 0 0 0
{ if (!added_CD) added_CD = true, add(CD, lemma_lc, lemmas); } 0 0 0
3263 0 break;
3264 }
3265 }
3266  
3267 0 _again:
3268 0 ▶ if ( ++p != ( (form_lc.str + form_lc.len)) )
Branch: 1 branch
BranchTrueFalseTotal
if ( ++p != ( (form_lc.str + form_lc.len)) ) 0 0 0
3269 0 goto _resume;
3270 0 _test_eof: {}
3271 0 ▶ if ( p == ( (form_lc.str + form_lc.len)) )
Branch: 1 branch
BranchTrueFalseTotal
if ( p == ( (form_lc.str + form_lc.len)) ) 0 0 0
3272 {
3273 0 const char *__acts = _tag_guesser_actions + _tag_guesser_eof_actions[cs];
3274 0 unsigned int __nacts = (unsigned int) *__acts++;
3275 0 ▶ while ( __nacts-- > 0 ) {
Branch: 1 branch
BranchTrueFalseTotal
while ( __nacts-- > 0 ) { 0 0 0
3276 0 ▶ switch ( *__acts++ ) {
Branch: 1 branch
BranchTrueFalseTotal
switch ( *__acts++ ) { 0 0 0
3277 0 case 7:
3278 0 ▶ { if (!added_CD) added_CD = true, add(CD, lemma_lc, lemmas); }
Branch: 2 branches
BranchTrueFalseTotal
{ if (!added_CD) added_CD = true, add(CD, lemma_lc, lemmas); } 0 0 0
{ if (!added_CD) added_CD = true, add(CD, lemma_lc, lemmas); } 0 0 0
3279 0 break;
3280 }
3281 }
3282 }
3283  
3284 }
3285  
3286 0 }
3287  
3288 // Add proper names
3289 0 ▶ analyze_proper_names(form, form_lc, lemmas);
Branch: 1 branch
BranchTrueFalseTotal
analyze_proper_names(form, form_lc, lemmas); 0 0 0
3290 0 }
3291  
3292 0 bool english_morpho_guesser::analyze_proper_names(string_piece form, string_piece form_lc, vector<tagged_lemma>& lemmas) const {
3293 // NNP if form_lc != form or form.str[0] =~ /[0-9']/, NNPS if form_lc != form
3294 0 ▶ bool is_NNP = form.str != form_lc.str || (form.len && (*form.str == '\'' || (*form.str >= '0' && *form.str <= '9')));
Branch: 5 branches
BranchTrueFalseTotal
bool is_NNP = form.str != form_lc.str || (form.len && (*form.str == '\'' || (*form.str >= '0' && *form.str <= '9'))); 0 0 0
bool is_NNP = form.str != form_lc.str || (form.len && (*form.str == '\'' || (*form.str >= '0' && *form.str <= '9'))); 0 0 0
bool is_NNP = form.str != form_lc.str || (form.len && (*form.str == '\'' || (*form.str >= '0' && *form.str <= '9'))); 0 0 0
bool is_NNP = form.str != form_lc.str || (form.len && (*form.str == '\'' || (*form.str >= '0' && *form.str <= '9'))); 0 0 0
bool is_NNP = form.str != form_lc.str || (form.len && (*form.str == '\'' || (*form.str >= '0' && *form.str <= '9'))); 0 0 0
3295 0 bool is_NNPS = form.str != form_lc.str;
3296 0 ▶ if (!is_NNP && !is_NNPS) return false;
Branch: 2 branches
BranchTrueFalseTotal
if (!is_NNP && !is_NNPS) return false; 0 0 0
if (!is_NNP && !is_NNPS) return false; 0 0 0
3297  
3298 0 bool was_NNP = false, was_NNPS = false;
3299 0 ▶ for (auto&& lemma : lemmas) {
Branch: 1 branch
BranchTrueFalseTotal
for (auto&& lemma : lemmas) { 0 0 0
3300 0 was_NNP |= lemma.tag == NNP;
3301 0 was_NNPS |= lemma.tag == NNPS;
3302 }
3303 0 ▶ if (!((is_NNP && !was_NNP) || (is_NNPS && !was_NNPS))) return false;
Branch: 4 branches
BranchTrueFalseTotal
if (!((is_NNP && !was_NNP) || (is_NNPS && !was_NNPS))) return false; 0 0 0
if (!((is_NNP && !was_NNP) || (is_NNPS && !was_NNPS))) return false; 0 0 0
if (!((is_NNP && !was_NNP) || (is_NNPS && !was_NNPS))) return false; 0 0 0
if (!((is_NNP && !was_NNP) || (is_NNPS && !was_NNPS))) return false; 0 0 0
3304  
3305 0 ▶ string lemma(form.str, form.len);
Branch: 1 branch
BranchTrueFalseTotal
string lemma(form.str, form.len); 0 0 0
3306 0 ▶ if (is_NNP && !was_NNP) add(NNP, lemma, lemmas);
Branch: 3 branches
BranchTrueFalseTotal
if (is_NNP && !was_NNP) add(NNP, lemma, lemmas); 0 0 0
if (is_NNP && !was_NNP) add(NNP, lemma, lemmas); 0 0 0
if (is_NNP && !was_NNP) add(NNP, lemma, lemmas); 0 0 0
3307 0 ▶ if (is_NNPS && !was_NNPS) add_NNPS(lemma, lemmas);
Branch: 3 branches
BranchTrueFalseTotal
if (is_NNPS && !was_NNPS) add_NNPS(lemma, lemmas); 0 0 0
if (is_NNPS && !was_NNPS) add_NNPS(lemma, lemmas); 0 0 0
if (is_NNPS && !was_NNPS) add_NNPS(lemma, lemmas); 0 0 0
3308 0 return true;
3309 0 }
3310  
3311 0 inline void english_morpho_guesser::add(const string& tag, const string& form, vector<tagged_lemma>& lemmas) const {
3312 0 lemmas.emplace_back(form, tag);
3313 0 }
3314  
3315 0 inline void english_morpho_guesser::add(const string& tag, const string& tag2, const string& form, vector<tagged_lemma>& lemmas) const {
3316 0 add(tag, form, lemmas);
3317 0 add(tag2, form, lemmas);
3318 0 }
3319  
3320 0 inline void english_morpho_guesser::add(const string& tag, const string& form, unsigned negation_len, vector<tagged_lemma>& lemmas) const {
3321 0 ▶ lemmas.emplace_back(negation_len ? form.substr(negation_len) + "^" + form.substr(0, negation_len) : form, tag);
Branch: 13 branches
BranchTrueFalseTotal
lemmas.emplace_back(negation_len ? form.substr(negation_len) + "^" + form.substr(0, negation_len) : form, tag); 0 0 0
lemmas.emplace_back(negation_len ? form.substr(negation_len) + "^" + form.substr(0, negation_len) : form, tag); 0 0 0
lemmas.emplace_back(negation_len ? form.substr(negation_len) + "^" + form.substr(0, negation_len) : form, tag); 0 0 0
lemmas.emplace_back(negation_len ? form.substr(negation_len) + "^" + form.substr(0, negation_len) : form, tag); 0 0 0
lemmas.emplace_back(negation_len ? form.substr(negation_len) + "^" + form.substr(0, negation_len) : form, tag); 0 0 0
lemmas.emplace_back(negation_len ? form.substr(negation_len) + "^" + form.substr(0, negation_len) : form, tag); 0 0 0
lemmas.emplace_back(negation_len ? form.substr(negation_len) + "^" + form.substr(0, negation_len) : form, tag); 0 0 0
lemmas.emplace_back(negation_len ? form.substr(negation_len) + "^" + form.substr(0, negation_len) : form, tag); 0 0 0
lemmas.emplace_back(negation_len ? form.substr(negation_len) + "^" + form.substr(0, negation_len) : form, tag); 0 0 0
lemmas.emplace_back(negation_len ? form.substr(negation_len) + "^" + form.substr(0, negation_len) : form, tag); 0 0 0
lemmas.emplace_back(negation_len ? form.substr(negation_len) + "^" + form.substr(0, negation_len) : form, tag); 0 0 0
lemmas.emplace_back(negation_len ? form.substr(negation_len) + "^" + form.substr(0, negation_len) : form, tag); 0 0 0
lemmas.emplace_back(negation_len ? form.substr(negation_len) + "^" + form.substr(0, negation_len) : form, tag); 0 0 0
3322 0 }
3323  
3324 0 inline void english_morpho_guesser::add(const string& tag, const string& tag2, const string& form, unsigned negation_len, vector<tagged_lemma>& lemmas) const {
3325 0 add(tag, form, negation_len, lemmas);
3326 0 add(tag2, form, negation_len, lemmas);
3327 0 }
3328  
3329 // Common definitions (written backwards)
3330 #define REM(str, len) (str.substr(0, str.size() - len))
3331 #define REM_ADD(str, len, add) (str.substr(0, str.size() - len).append(add))
3332  
3333 static const char _NNS_actions[] = {
3334 0, 1, 0, 1, 1, 1, 2, 1,
3335 3, 1, 4, 1, 5, 1, 6, 1,
3336 7, 1, 8, 1, 9, 1, 10, 1,
3337 11, 1, 12, 1, 13
3338 };
3339  
3340 static const char _NNS_key_offsets[] = {
3341 0, 0, 2, 3, 4, 5, 7, 17,
3342 17, 29, 30, 35, 35, 36, 37, 37,
3343 37, 44, 45, 53, 63, 72
3344 };
3345  
3346 static const char _NNS_trans_keys[] = {
3347 110, 115, 101, 109, 101, 99, 115, 98,
3348 100, 102, 104, 106, 110, 112, 116, 118,
3349 122, 104, 122, 98, 100, 102, 103, 106,
3350 110, 112, 116, 118, 120, 111, 97, 101,
3351 105, 111, 117, 105, 119, 104, 105, 111,
3352 115, 118, 120, 122, 115, 97, 101, 105,
3353 110, 111, 114, 115, 117, 98, 100, 102,
3354 104, 106, 110, 112, 116, 118, 122, 97,
3355 101, 105, 111, 117, 121, 122, 98, 120,
3356 0
3357 };
3358  
3359 static const char _NNS_single_lengths[] = {
3360 0, 2, 1, 1, 1, 2, 0, 0,
3361 2, 1, 5, 0, 1, 1, 0, 0,
3362 7, 1, 8, 0, 7, 0
3363 };
3364  
3365 static const char _NNS_range_lengths[] = {
3366 0, 0, 0, 0, 0, 0, 5, 0,
3367 5, 0, 0, 0, 0, 0, 0, 0,
3368 0, 0, 0, 5, 1, 0
3369 };
3370  
3371 static const char _NNS_index_offsets[] = {
3372 0, 0, 3, 5, 7, 9, 12, 18,
3373 19, 27, 29, 35, 36, 38, 40, 41,
3374 42, 50, 52, 61, 67, 76
3375 };
3376  
3377 static const char _NNS_indicies[] = {
3378 0, 2, 1, 3, 1, 4, 1, 6,
3379 5, 7, 7, 1, 8, 8, 8, 8,
3380 8, 1, 9, 11, 10, 10, 10, 10,
3381 10, 10, 1, 12, 1, 13, 13, 13,
3382 13, 13, 1, 14, 15, 1, 16, 1,
3383 17, 1, 18, 19, 20, 21, 22, 7,
3384 23, 1, 24, 1, 25, 25, 25, 26,
3385 25, 27, 28, 29, 1, 30, 30, 30,
3386 30, 30, 1, 31, 31, 31, 31, 31,
3387 31, 33, 32, 1, 17, 0
3388 };
3389  
3390 static const char _NNS_trans_targs[] = {
3391 2, 0, 4, 3, 15, 15, 16, 15,
3392 7, 15, 15, 17, 15, 11, 15, 13,
3393 15, 15, 5, 6, 8, 18, 12, 20,
3394 15, 15, 9, 10, 15, 19, 15, 15,
3395 14, 21
3396 };
3397  
3398 static const char _NNS_trans_actions[] = {
3399 0, 0, 0, 0, 1, 27, 27, 21,
3400 0, 23, 25, 25, 19, 0, 17, 0,
3401 5, 11, 0, 0, 0, 21, 0, 21,
3402 3, 9, 0, 0, 15, 9, 7, 13,
3403 0, 15
3404 };
3405  
3406 static const int NNS_start = 1;
3407  
3408 0 void english_morpho_guesser::add_NNS(const string& form, unsigned negation_len, vector<tagged_lemma>& lemmas) const {
3409 0 const char* p = form.c_str() + negation_len; int cs;
3410 0 char best = 'z'; unsigned remove = 0; const char* append = nullptr;
3411
3412 {
3413 0 cs = NNS_start;
3414 }
3415  
3416 {
3417 int _klen;
3418 unsigned int _trans;
3419 const char *_acts;
3420 unsigned int _nacts;
3421 const char *_keys;
3422  
3423 0 ▶ if ( p == ( (form.c_str() + form.size())) )
Branch: 1 branch
BranchTrueFalseTotal
if ( p == ( (form.c_str() + form.size())) ) 0 0 0
3424 0 goto _test_eof;
3425 0 ▶ if ( cs == 0 )
Branch: 1 branch
BranchTrueFalseTotal
if ( cs == 0 ) 0 0 0
3426 0 goto _out;
3427 0 _resume:
3428 0 _keys = _NNS_trans_keys + _NNS_key_offsets[cs];
3429 0 _trans = _NNS_index_offsets[cs];
3430  
3431 0 _klen = _NNS_single_lengths[cs];
3432 0 ▶ if ( _klen > 0 ) {
Branch: 1 branch
BranchTrueFalseTotal
if ( _klen > 0 ) { 0 0 0
3433 0 const char *_lower = _keys;
3434 const char *_mid;
3435 0 const char *_upper = _keys + _klen - 1;
3436 while (1) {
3437 0 ▶ if ( _upper < _lower )
Branch: 1 branch
BranchTrueFalseTotal
if ( _upper < _lower ) 0 0 0
3438 0 break;
3439  
3440 0 _mid = _lower + ((_upper-_lower) >> 1);
3441 0 ▶ if ( ( form[form.size() - 1 - (p - form.c_str() - negation_len)]) < *_mid )
Branch: 1 branch
BranchTrueFalseTotal
if ( ( form[form.size() - 1 - (p - form.c_str() - negation_len)]) < *_mid ) 0 0 0
3442 0 _upper = _mid - 1;
3443 0 ▶ else if ( ( form[form.size() - 1 - (p - form.c_str() - negation_len)]) > *_mid )
Branch: 1 branch
BranchTrueFalseTotal
else if ( ( form[form.size() - 1 - (p - form.c_str() - negation_len)]) > *_mid ) 0 0 0
3444 0 _lower = _mid + 1;
3445 else {
3446 0 _trans += (unsigned int)(_mid - _keys);
3447 0 goto _match;
3448 }
3449 }
3450 0 _keys += _klen;
3451 0 _trans += _klen;
3452 }
3453  
3454 0 _klen = _NNS_range_lengths[cs];
3455 0 ▶ if ( _klen > 0 ) {
Branch: 1 branch
BranchTrueFalseTotal
if ( _klen > 0 ) { 0 0 0
3456 0 const char *_lower = _keys;
3457 const char *_mid;
3458 0 const char *_upper = _keys + (_klen<<1) - 2;
3459 while (1) {
3460 0 ▶ if ( _upper < _lower )
Branch: 1 branch
BranchTrueFalseTotal
if ( _upper < _lower ) 0 0 0
3461 0 break;
3462  
3463 0 _mid = _lower + (((_upper-_lower) >> 1) & ~1);
3464 0 ▶ if ( ( form[form.size() - 1 - (p - form.c_str() - negation_len)]) < _mid[0] )
Branch: 1 branch
BranchTrueFalseTotal
if ( ( form[form.size() - 1 - (p - form.c_str() - negation_len)]) < _mid[0] ) 0 0 0
3465 0 _upper = _mid - 2;
3466 0 ▶ else if ( ( form[form.size() - 1 - (p - form.c_str() - negation_len)]) > _mid[1] )
Branch: 1 branch
BranchTrueFalseTotal
else if ( ( form[form.size() - 1 - (p - form.c_str() - negation_len)]) > _mid[1] ) 0 0 0
3467 0 _lower = _mid + 2;
3468 else {
3469 0 _trans += (unsigned int)((_mid - _keys)>>1);
3470 0 goto _match;
3471 }
3472 }
3473 0 _trans += _klen;
3474 }
3475  
3476 0 _match:
3477 0 _trans = _NNS_indicies[_trans];
3478 0 cs = _NNS_trans_targs[_trans];
3479  
3480 0 ▶ if ( _NNS_trans_actions[_trans] == 0 )
Branch: 1 branch
BranchTrueFalseTotal
if ( _NNS_trans_actions[_trans] == 0 ) 0 0 0
3481 0 goto _again;
3482  
3483 0 _acts = _NNS_actions + _NNS_trans_actions[_trans];
3484 0 _nacts = (unsigned int) *_acts++;
3485 0 ▶ while ( _nacts-- > 0 )
Branch: 1 branch
BranchTrueFalseTotal
while ( _nacts-- > 0 ) 0 0 0
3486 {
3487 0 switch ( *_acts++ )
3488 {
3489 0 case 0:
3490 0 ▶ { if (best > 'a') best = 'a', remove = 2, append = "an"; }
Branch: 1 branch
BranchTrueFalseTotal
{ if (best > 'a') best = 'a', remove = 2, append = "an"; } 0 0 0
3491 0 break;
3492 0 case 1:
3493 0 ▶ { if (best > 'b') best = 'b', remove = 1, append = nullptr; }
Branch: 1 branch
BranchTrueFalseTotal
{ if (best > 'b') best = 'b', remove = 1, append = nullptr; } 0 0 0
3494 0 break;
3495 0 case 2:
3496 0 ▶ { if (best > 'c') best = 'c', remove = 3, append = "fe"; }
Branch: 1 branch
BranchTrueFalseTotal
{ if (best > 'c') best = 'c', remove = 3, append = "fe"; } 0 0 0
3497 0 break;
3498 0 case 3:
3499 0 ▶ { if (best > 'd') best = 'd', remove = 2, append = nullptr; }
Branch: 1 branch
BranchTrueFalseTotal
{ if (best > 'd') best = 'd', remove = 2, append = nullptr; } 0 0 0
3500 0 break;
3501 0 case 4:
3502 0 ▶ { if (best > 'e') best = 'e', remove = 1, append = nullptr; }
Branch: 1 branch
BranchTrueFalseTotal
{ if (best > 'e') best = 'e', remove = 1, append = nullptr; } 0 0 0
3503 0 break;
3504 0 case 5:
3505 0 ▶ { if (best > 'f') best = 'f', remove = 2, append = nullptr; }
Branch: 1 branch
BranchTrueFalseTotal
{ if (best > 'f') best = 'f', remove = 2, append = nullptr; } 0 0 0
3506 0 break;
3507 0 case 6:
3508 0 ▶ { if (best > 'g') best = 'g', remove = 1, append = nullptr; }
Branch: 1 branch
BranchTrueFalseTotal
{ if (best > 'g') best = 'g', remove = 1, append = nullptr; } 0 0 0
3509 0 break;
3510 0 case 7:
3511 0 ▶ { if (best > 'h') best = 'h', remove = 2, append = nullptr; }
Branch: 1 branch
BranchTrueFalseTotal
{ if (best > 'h') best = 'h', remove = 2, append = nullptr; } 0 0 0
3512 0 break;
3513 0 case 8:
3514 0 ▶ { if (best > 'i') best = 'i', remove = 1, append = nullptr; }
Branch: 1 branch
BranchTrueFalseTotal
{ if (best > 'i') best = 'i', remove = 1, append = nullptr; } 0 0 0
3515 0 break;
3516 0 case 9:
3517 0 ▶ { if (best > 'j') best = 'j', remove = 1, append = nullptr; }
Branch: 1 branch
BranchTrueFalseTotal
{ if (best > 'j') best = 'j', remove = 1, append = nullptr; } 0 0 0
3518 0 break;
3519 0 case 10:
3520 0 ▶ { if (best > 'k') best = 'k', remove = 2, append = nullptr; }
Branch: 1 branch
BranchTrueFalseTotal
{ if (best > 'k') best = 'k', remove = 2, append = nullptr; } 0 0 0
3521 0 break;
3522 0 case 11:
3523 0 ▶ { if (best > 'l') best = 'l', remove = 3, append = "y"; }
Branch: 1 branch
BranchTrueFalseTotal
{ if (best > 'l') best = 'l', remove = 3, append = "y"; } 0 0 0
3524 0 break;
3525 0 case 12:
3526 0 ▶ { if (best > 'm') best = 'm', remove = 2, append = nullptr; }
Branch: 1 branch
BranchTrueFalseTotal
{ if (best > 'm') best = 'm', remove = 2, append = nullptr; } 0 0 0
3527 0 break;
3528 0 case 13:
3529 0 ▶ { if (best > 'n') best = 'n', remove = 1, append = nullptr; }
Branch: 1 branch
BranchTrueFalseTotal
{ if (best > 'n') best = 'n', remove = 1, append = nullptr; } 0 0 0
3530 0 break;
3531 }
3532 }
3533  
3534 0 _again:
3535 0 ▶ if ( cs == 0 )
Branch: 1 branch
BranchTrueFalseTotal
if ( cs == 0 ) 0 0 0
3536 0 goto _out;
3537 0 ▶ if ( ++p != ( (form.c_str() + form.size())) )
Branch: 1 branch
BranchTrueFalseTotal
if ( ++p != ( (form.c_str() + form.size())) ) 0 0 0
3538 0 goto _resume;
3539 0 _test_eof: {}
3540 0 _out: {}
3541 }
3542  
3543 0 ▶ add(NNS, form.substr(0, form.size() - remove).append(append ? append : ""), negation_len, lemmas);
Branch: 4 branches
BranchTrueFalseTotal
add(NNS, form.substr(0, form.size() - remove).append(append ? append : ""), negation_len, lemmas); 0 0 0
add(NNS, form.substr(0, form.size() - remove).append(append ? append : ""), negation_len, lemmas); 0 0 0
add(NNS, form.substr(0, form.size() - remove).append(append ? append : ""), negation_len, lemmas); 0 0 0
add(NNS, form.substr(0, form.size() - remove).append(append ? append : ""), negation_len, lemmas); 0 0 0
3544 0 }
3545  
3546 static const char _NNPS_actions[] = {
3547 0, 1, 1, 1, 2, 1, 4, 1,
3548 5, 1, 6, 1, 7, 1, 8, 1,
3549 9, 1, 10, 1, 11, 1, 12, 1,
3550 14, 1, 15, 1, 16, 2, 0, 1,
3551 2, 3, 4, 2, 13, 14
3552 };
3553  
3554 static const unsigned char _NNPS_key_offsets[] = {
3555 0, 0, 4, 6, 8, 10, 12, 16,
3556 36, 36, 60, 62, 72, 72, 74, 76,
3557 78, 78, 98, 98, 100, 102, 104, 104,
3558 118, 120, 136, 156, 174, 174
3559 };
3560  
3561 static const char _NNPS_trans_keys[] = {
3562 78, 83, 110, 115, 69, 101, 77, 109,
3563 77, 109, 69, 101, 67, 83, 99, 115,
3564 66, 68, 70, 72, 74, 78, 80, 84,
3565 86, 90, 98, 100, 102, 104, 106, 110,
3566 112, 116, 118, 122, 72, 90, 104, 122,
3567 66, 68, 70, 71, 74, 78, 80, 84,
3568 86, 88, 98, 100, 102, 103, 106, 110,
3569 112, 116, 118, 120, 79, 111, 65, 69,
3570 73, 79, 85, 97, 101, 105, 111, 117,
3571 73, 105, 87, 119, 87, 119, 66, 68,
3572 70, 72, 74, 78, 80, 84, 86, 90,
3573 98, 100, 102, 104, 106, 110, 112, 116,
3574 118, 122, 73, 105, 69, 101, 69, 101,
3575 72, 73, 79, 83, 86, 88, 90, 104,
3576 105, 111, 115, 118, 120, 122, 83, 115,
3577 65, 69, 73, 78, 79, 82, 83, 85,
3578 97, 101, 105, 110, 111, 114, 115, 117,
3579 66, 68, 70, 72, 74, 78, 80, 84,
3580 86, 90, 98, 100, 102, 104, 106, 110,
3581 112, 116, 118, 122, 65, 69, 73, 79,
3582 85, 89, 90, 97, 101, 105, 111, 117,
3583 121, 122, 66, 88, 98, 120, 72, 73,
3584 79, 83, 86, 88, 90, 104, 105, 111,
3585 115, 118, 120, 122, 0
3586 };
3587  
3588 static const char _NNPS_single_lengths[] = {
3589 0, 4, 2, 2, 2, 2, 4, 0,
3590 0, 4, 2, 10, 0, 2, 2, 2,
3591 0, 0, 0, 2, 2, 2, 0, 14,
3592 2, 16, 0, 14, 0, 14
3593 };
3594  
3595 static const char _NNPS_range_lengths[] = {
3596 0, 0, 0, 0, 0, 0, 0, 10,
3597 0, 10, 0, 0, 0, 0, 0, 0,
3598 0, 10, 0, 0, 0, 0, 0, 0,
3599 0, 0, 10, 2, 0, 0
3600 };
3601  
3602 static const unsigned char _NNPS_index_offsets[] = {
3603 0, 0, 5, 8, 11, 14, 17, 22,
3604 33, 34, 49, 52, 63, 64, 67, 70,
3605 73, 74, 85, 86, 89, 92, 95, 96,
3606 111, 114, 131, 142, 159, 160
3607 };
3608  
3609 static const char _NNPS_indicies[] = {
3610 0, 2, 3, 4, 1, 5, 6, 1,
3611 7, 8, 1, 8, 8, 1, 10, 11,
3612 9, 12, 12, 12, 12, 1, 13, 13,
3613 13, 13, 13, 13, 13, 13, 13, 13,
3614 1, 14, 16, 15, 16, 15, 15, 15,
3615 15, 15, 15, 15, 15, 15, 15, 15,
3616 1, 17, 17, 1, 18, 18, 18, 18,
3617 18, 18, 18, 18, 18, 18, 1, 19,
3618 20, 21, 1, 22, 23, 1, 23, 23,
3619 1, 24, 25, 25, 25, 25, 25, 25,
3620 25, 25, 25, 25, 1, 26, 21, 21,
3621 1, 6, 6, 1, 11, 11, 9, 1,
3622 27, 28, 29, 30, 31, 12, 32, 27,
3623 33, 29, 30, 34, 12, 32, 1, 35,
3624 35, 1, 36, 36, 36, 37, 36, 38,
3625 39, 40, 36, 36, 36, 37, 36, 38,
3626 39, 40, 1, 41, 41, 41, 41, 41,
3627 41, 41, 41, 41, 41, 1, 42, 42,
3628 42, 42, 42, 42, 44, 42, 42, 42,
3629 42, 42, 42, 44, 43, 43, 1, 24,
3630 27, 33, 29, 30, 34, 12, 32, 27,
3631 33, 29, 30, 34, 12, 32, 1, 0
3632 };
3633  
3634 static const char _NNPS_trans_targs[] = {
3635 2, 0, 5, 20, 21, 3, 4, 22,
3636 22, 22, 23, 29, 22, 8, 22, 22,
3637 24, 22, 12, 22, 14, 15, 22, 22,
3638 22, 18, 22, 6, 7, 9, 25, 13,
3639 27, 17, 19, 22, 22, 10, 11, 22,
3640 26, 22, 22, 16, 28
3641 };
3642  
3643 static const char _NNPS_trans_actions[] = {
3644 0, 0, 0, 0, 0, 0, 0, 29,
3645 1, 27, 27, 27, 21, 0, 35, 25,
3646 25, 19, 0, 17, 0, 0, 32, 5,
3647 11, 0, 23, 0, 0, 0, 21, 0,
3648 21, 0, 0, 3, 9, 0, 0, 15,
3649 9, 7, 13, 0, 15
3650 };
3651  
3652 static const int NNPS_start = 1;
3653  
3654 0 void english_morpho_guesser::add_NNPS(const string& form, vector<tagged_lemma>& lemmas) const {
3655 0 const char* p = form.c_str(); int cs;
3656 0 char best = 'z'; unsigned remove = 0; const char* append = nullptr;
3657
3658 {
3659 0 cs = NNPS_start;
3660 }
3661  
3662 {
3663 int _klen;
3664 unsigned int _trans;
3665 const char *_acts;
3666 unsigned int _nacts;
3667 const char *_keys;
3668  
3669 0 ▶ if ( p == ( (form.c_str() + form.size())) )
Branch: 1 branch
BranchTrueFalseTotal
if ( p == ( (form.c_str() + form.size())) ) 0 0 0
3670 0 goto _test_eof;
3671 0 ▶ if ( cs == 0 )
Branch: 1 branch
BranchTrueFalseTotal
if ( cs == 0 ) 0 0 0
3672 0 goto _out;
3673 0 _resume:
3674 0 _keys = _NNPS_trans_keys + _NNPS_key_offsets[cs];
3675 0 _trans = _NNPS_index_offsets[cs];
3676  
3677 0 _klen = _NNPS_single_lengths[cs];
3678 0 ▶ if ( _klen > 0 ) {
Branch: 1 branch
BranchTrueFalseTotal
if ( _klen > 0 ) { 0 0 0
3679 0 const char *_lower = _keys;
3680 const char *_mid;
3681 0 const char *_upper = _keys + _klen - 1;
3682 while (1) {
3683 0 ▶ if ( _upper < _lower )
Branch: 1 branch
BranchTrueFalseTotal
if ( _upper < _lower ) 0 0 0
3684 0 break;
3685  
3686 0 _mid = _lower + ((_upper-_lower) >> 1);
3687 0 ▶ if ( ( form[form.size() - 1 - (p - form.c_str())]) < *_mid )
Branch: 1 branch
BranchTrueFalseTotal
if ( ( form[form.size() - 1 - (p - form.c_str())]) < *_mid ) 0 0 0
3688 0 _upper = _mid - 1;
3689 0 ▶ else if ( ( form[form.size() - 1 - (p - form.c_str())]) > *_mid )
Branch: 1 branch
BranchTrueFalseTotal
else if ( ( form[form.size() - 1 - (p - form.c_str())]) > *_mid ) 0 0 0
3690 0 _lower = _mid + 1;
3691 else {
3692 0 _trans += (unsigned int)(_mid - _keys);
3693 0 goto _match;
3694 }
3695 }
3696 0 _keys += _klen;
3697 0 _trans += _klen;
3698 }
3699  
3700 0 _klen = _NNPS_range_lengths[cs];
3701 0 ▶ if ( _klen > 0 ) {
Branch: 1 branch
BranchTrueFalseTotal
if ( _klen > 0 ) { 0 0 0
3702 0 const char *_lower = _keys;
3703 const char *_mid;
3704 0 const char *_upper = _keys + (_klen<<1) - 2;
3705 while (1) {
3706 0 ▶ if ( _upper < _lower )
Branch: 1 branch
BranchTrueFalseTotal
if ( _upper < _lower ) 0 0 0
3707 0 break;
3708  
3709 0 _mid = _lower + (((_upper-_lower) >> 1) & ~1);
3710 0 ▶ if ( ( form[form.size() - 1 - (p - form.c_str())]) < _mid[0] )
Branch: 1 branch
BranchTrueFalseTotal
if ( ( form[form.size() - 1 - (p - form.c_str())]) < _mid[0] ) 0 0 0
3711 0 _upper = _mid - 2;
3712 0 ▶ else if ( ( form[form.size() - 1 - (p - form.c_str())]) > _mid[1] )
Branch: 1 branch
BranchTrueFalseTotal
else if ( ( form[form.size() - 1 - (p - form.c_str())]) > _mid[1] ) 0 0 0
3713 0 _lower = _mid + 2;
3714 else {
3715 0 _trans += (unsigned int)((_mid - _keys)>>1);
3716 0 goto _match;
3717 }
3718 }
3719 0 _trans += _klen;
3720 }
3721  
3722 0 _match:
3723 0 _trans = _NNPS_indicies[_trans];
3724 0 cs = _NNPS_trans_targs[_trans];
3725  
3726 0 ▶ if ( _NNPS_trans_actions[_trans] == 0 )
Branch: 1 branch
BranchTrueFalseTotal
if ( _NNPS_trans_actions[_trans] == 0 ) 0 0 0
3727 0 goto _again;
3728  
3729 0 _acts = _NNPS_actions + _NNPS_trans_actions[_trans];
3730 0 _nacts = (unsigned int) *_acts++;
3731 0 ▶ while ( _nacts-- > 0 )
Branch: 1 branch
BranchTrueFalseTotal
while ( _nacts-- > 0 ) 0 0 0
3732 {
3733 0 switch ( *_acts++ )
3734 {
3735 0 case 0:
3736 0 ▶ { if (best > 'a') best = 'a', remove = 2, append = "AN"; }
Branch: 1 branch
BranchTrueFalseTotal
{ if (best > 'a') best = 'a', remove = 2, append = "AN"; } 0 0 0
3737 0 break;
3738 0 case 1:
3739 0 ▶ { if (best > 'b') best = 'b', remove = 2, append = "an"; }
Branch: 1 branch
BranchTrueFalseTotal
{ if (best > 'b') best = 'b', remove = 2, append = "an"; } 0 0 0
3740 0 break;
3741 0 case 2:
3742 0 ▶ { if (best > 'c') best = 'c', remove = 1, append = nullptr; }
Branch: 1 branch
BranchTrueFalseTotal
{ if (best > 'c') best = 'c', remove = 1, append = nullptr; } 0 0 0
3743 0 break;
3744 0 case 3:
3745 0 ▶ { if (best > 'd') best = 'd', remove = 3, append = "FE"; }
Branch: 1 branch
BranchTrueFalseTotal
{ if (best > 'd') best = 'd', remove = 3, append = "FE"; } 0 0 0
3746 0 break;
3747 0 case 4:
3748 0 ▶ { if (best > 'e') best = 'e', remove = 3, append = "fe"; }
Branch: 1 branch
BranchTrueFalseTotal
{ if (best > 'e') best = 'e', remove = 3, append = "fe"; } 0 0 0
3749 0 break;
3750 0 case 5:
3751 0 ▶ { if (best > 'f') best = 'f', remove = 2, append = nullptr; }
Branch: 1 branch
BranchTrueFalseTotal
{ if (best > 'f') best = 'f', remove = 2, append = nullptr; } 0 0 0
3752 0 break;
3753 0 case 6:
3754 0 ▶ { if (best > 'g') best = 'g', remove = 1, append = nullptr; }
Branch: 1 branch
BranchTrueFalseTotal
{ if (best > 'g') best = 'g', remove = 1, append = nullptr; } 0 0 0
3755 0 break;
3756 0 case 7:
3757 0 ▶ { if (best > 'h') best = 'h', remove = 2, append = nullptr; }
Branch: 1 branch
BranchTrueFalseTotal
{ if (best > 'h') best = 'h', remove = 2, append = nullptr; } 0 0 0
3758 0 break;
3759 0 case 8:
3760 0 ▶ { if (best > 'i') best = 'i', remove = 1, append = nullptr; }
Branch: 1 branch
BranchTrueFalseTotal
{ if (best > 'i') best = 'i', remove = 1, append = nullptr; } 0 0 0
3761 0 break;
3762 0 case 9:
3763 0 ▶ { if (best > 'j') best = 'j', remove = 2, append = nullptr; }
Branch: 1 branch
BranchTrueFalseTotal
{ if (best > 'j') best = 'j', remove = 2, append = nullptr; } 0 0 0
3764 0 break;
3765 0 case 10:
3766 0 ▶ { if (best > 'k') best = 'k', remove = 1, append = nullptr; }
Branch: 1 branch
BranchTrueFalseTotal
{ if (best > 'k') best = 'k', remove = 1, append = nullptr; } 0 0 0
3767 0 break;
3768 0 case 11:
3769 0 ▶ { if (best > 'l') best = 'l', remove = 1, append = nullptr; }
Branch: 1 branch
BranchTrueFalseTotal
{ if (best > 'l') best = 'l', remove = 1, append = nullptr; } 0 0 0
3770 0 break;
3771 0 case 12:
3772 0 ▶ { if (best > 'm') best = 'm', remove = 2, append = nullptr; }
Branch: 1 branch
BranchTrueFalseTotal
{ if (best > 'm') best = 'm', remove = 2, append = nullptr; } 0 0 0
3773 0 break;
3774 0 case 13:
3775 0 ▶ { if (best > 'n') best = 'n', remove = 3, append = "Y"; }
Branch: 1 branch
BranchTrueFalseTotal
{ if (best > 'n') best = 'n', remove = 3, append = "Y"; } 0 0 0
3776 0 break;
3777 0 case 14:
3778 0 ▶ { if (best > 'o') best = 'o', remove = 3, append = "y"; }
Branch: 1 branch
BranchTrueFalseTotal
{ if (best > 'o') best = 'o', remove = 3, append = "y"; } 0 0 0
3779 0 break;
3780 0 case 15:
3781 0 ▶ { if (best > 'p') best = 'p', remove = 2, append = nullptr; }
Branch: 1 branch
BranchTrueFalseTotal
{ if (best > 'p') best = 'p', remove = 2, append = nullptr; } 0 0 0
3782 0 break;
3783 0 case 16:
3784 0 ▶ { if (best > 'q') best = 'q', remove = 1, append = nullptr; }
Branch: 1 branch
BranchTrueFalseTotal
{ if (best > 'q') best = 'q', remove = 1, append = nullptr; } 0 0 0
3785 0 break;
3786 }
3787 }
3788  
3789 0 _again:
3790 0 ▶ if ( cs == 0 )
Branch: 1 branch
BranchTrueFalseTotal
if ( cs == 0 ) 0 0 0
3791 0 goto _out;
3792 0 ▶ if ( ++p != ( (form.c_str() + form.size())) )
Branch: 1 branch
BranchTrueFalseTotal
if ( ++p != ( (form.c_str() + form.size())) ) 0 0 0
3793 0 goto _resume;
3794 0 _test_eof: {}
3795 0 _out: {}
3796 }
3797  
3798 0 ▶ add(NNPS, form.substr(0, form.size() - remove).append(append ? append : ""), lemmas);
Branch: 4 branches
BranchTrueFalseTotal
add(NNPS, form.substr(0, form.size() - remove).append(append ? append : ""), lemmas); 0 0 0
add(NNPS, form.substr(0, form.size() - remove).append(append ? append : ""), lemmas); 0 0 0
add(NNPS, form.substr(0, form.size() - remove).append(append ? append : ""), lemmas); 0 0 0
add(NNPS, form.substr(0, form.size() - remove).append(append ? append : ""), lemmas); 0 0 0
3799 0 }
3800  
3801 static const char _VBG_actions[] = {
3802 0, 1, 1, 1, 2, 1, 4, 1,
3803 5, 1, 6, 1, 7, 1, 9, 1,
3804 10, 1, 11, 1, 12, 1, 13, 1,
3805 14, 1, 15, 1, 16, 1, 17, 2,
3806 0, 12, 2, 3, 4, 2, 5, 9,
3807 2, 5, 10, 2, 8, 9, 2, 9,
3808 10, 2, 11, 12, 3, 0, 2, 12,
3809 3, 2, 11, 12
3810 };
3811  
3812 static const short _VBG_key_offsets[] = {
3813 0, 0, 1, 2, 3, 9, 14, 24,
3814 29, 34, 44, 46, 47, 48, 49, 50,
3815 51, 52, 59, 66, 68, 70, 71, 72,
3816 73, 74, 75, 76, 81, 89, 90, 91,
3817 92, 93, 94, 96, 97, 98, 99, 100,
3818 101, 102, 127, 127, 136, 137, 142, 153,
3819 162, 171, 181, 186, 191, 197, 207, 207,
3820 216, 228, 229, 240, 240, 249, 258, 267,
3821 276, 285, 290, 302, 313, 318, 324, 334,
3822 344, 355, 362, 373, 382, 391, 391, 402,
3823 413, 415, 416, 417, 417, 418, 426, 437,
3824 442, 448, 458, 468, 479, 486, 497, 504,
3825 510, 519, 528, 537, 543
3826 };
3827  
3828 static const char _VBG_trans_keys[] = {
3829 103, 110, 105, 97, 101, 105, 111, 117,
3830 121, 97, 101, 105, 111, 117, 98, 100,
3831 102, 104, 106, 110, 112, 116, 118, 122,
3832 97, 101, 105, 111, 117, 97, 101, 105,
3833 111, 117, 98, 100, 102, 104, 106, 110,
3834 112, 116, 118, 122, 98, 114, 105, 114,
3835 112, 105, 109, 101, 97, 101, 105, 111,
3836 117, 98, 122, 97, 101, 105, 111, 117,
3837 98, 122, 97, 122, 98, 114, 105, 114,
3838 112, 105, 109, 101, 97, 101, 105, 111,
3839 117, 97, 101, 105, 110, 111, 115, 117,
3840 120, 105, 112, 105, 109, 101, 98, 114,
3841 105, 114, 112, 105, 109, 101, 98, 99,
3842 100, 102, 103, 104, 106, 107, 108, 109,
3843 110, 111, 112, 113, 114, 115, 116, 117,
3844 118, 119, 120, 121, 122, 97, 105, 97,
3845 98, 101, 105, 111, 117, 122, 99, 120,
3846 113, 97, 101, 105, 111, 117, 98, 99,
3847 100, 105, 111, 117, 122, 97, 101, 102,
3848 120, 97, 100, 101, 105, 111, 117, 122,
3849 98, 120, 97, 101, 102, 105, 111, 117,
3850 122, 98, 120, 97, 101, 103, 105, 110,
3851 111, 117, 122, 98, 120, 97, 101, 105,
3852 111, 117, 101, 110, 111, 115, 120, 101,
3853 110, 111, 112, 115, 120, 97, 101, 104,
3854 105, 111, 116, 117, 122, 98, 120, 97,
3855 101, 105, 106, 111, 117, 122, 98, 120,
3856 98, 99, 100, 105, 107, 111, 117, 122,
3857 97, 101, 102, 120, 105, 97, 101, 105,
3858 108, 111, 114, 117, 119, 122, 98, 120,
3859 97, 101, 105, 109, 111, 117, 122, 98,
3860 120, 97, 101, 105, 110, 111, 117, 122,
3861 98, 120, 97, 101, 105, 111, 112, 117,
3862 122, 98, 120, 97, 101, 105, 111, 113,
3863 117, 122, 98, 120, 97, 101, 105, 111,
3864 114, 117, 122, 98, 120, 97, 101, 105,
3865 111, 117, 98, 99, 100, 105, 108, 111,
3866 116, 117, 97, 101, 102, 122, 101, 110,
3867 111, 115, 120, 98, 104, 106, 116, 118,
3868 122, 101, 110, 111, 115, 120, 101, 110,
3869 111, 112, 115, 120, 101, 105, 110, 111,
3870 115, 120, 98, 116, 118, 122, 101, 105,
3871 110, 111, 115, 120, 98, 116, 118, 122,
3872 101, 110, 111, 115, 120, 98, 104, 106,
3873 116, 118, 122, 98, 101, 110, 111, 114,
3874 115, 120, 101, 110, 111, 115, 120, 98,
3875 104, 106, 116, 118, 122, 97, 101, 105,
3876 111, 115, 117, 122, 98, 120, 97, 101,
3877 105, 111, 116, 117, 122, 98, 120, 122,
3878 98, 100, 102, 104, 106, 110, 112, 116,
3879 118, 120, 122, 98, 100, 102, 104, 106,
3880 110, 112, 116, 118, 120, 98, 114, 112,
3881 114, 113, 97, 101, 105, 108, 111, 117,
3882 98, 122, 101, 110, 111, 115, 120, 98,
3883 104, 106, 116, 118, 122, 101, 110, 111,
3884 115, 120, 101, 110, 111, 112, 115, 120,
3885 101, 105, 110, 111, 115, 120, 98, 116,
3886 118, 122, 101, 105, 110, 111, 115, 120,
3887 98, 116, 118, 122, 101, 110, 111, 115,
3888 120, 98, 104, 106, 116, 118, 122, 98,
3889 101, 110, 111, 114, 115, 120, 101, 110,
3890 111, 115, 120, 98, 104, 106, 116, 118,
3891 122, 97, 101, 105, 111, 117, 98, 122,
3892 97, 101, 105, 111, 117, 121, 97, 101,
3893 105, 111, 117, 118, 122, 98, 120, 97,
3894 101, 105, 111, 117, 119, 122, 98, 120,
3895 97, 101, 105, 111, 117, 120, 122, 98,
3896 119, 97, 101, 105, 111, 117, 121, 97,
3897 101, 105, 111, 117, 121, 122, 98, 120,
3898 0
3899 };
3900  
3901 static const char _VBG_single_lengths[] = {
3902 0, 1, 1, 1, 6, 5, 0, 5,
3903 5, 0, 2, 1, 1, 1, 1, 1,
3904 1, 5, 5, 0, 2, 1, 1, 1,
3905 1, 1, 1, 5, 8, 1, 1, 1,
3906 1, 1, 2, 1, 1, 1, 1, 1,
3907 1, 23, 0, 7, 1, 5, 7, 7,
3908 7, 8, 5, 5, 6, 8, 0, 7,
3909 8, 1, 9, 0, 7, 7, 7, 7,
3910 7, 5, 8, 5, 5, 6, 6, 6,
3911 5, 7, 5, 7, 7, 0, 1, 1,
3912 2, 1, 1, 0, 1, 6, 5, 5,
3913 6, 6, 6, 5, 7, 5, 5, 6,
3914 7, 7, 7, 6, 7
3915 };
3916  
3917 static const char _VBG_range_lengths[] = {
3918 0, 0, 0, 0, 0, 0, 5, 0,
3919 0, 5, 0, 0, 0, 0, 0, 0,
3920 0, 1, 1, 1, 0, 0, 0, 0,
3921 0, 0, 0, 0, 0, 0, 0, 0,
3922 0, 0, 0, 0, 0, 0, 0, 0,
3923 0, 1, 0, 1, 0, 0, 2, 1,
3924 1, 1, 0, 0, 0, 1, 0, 1,
3925 2, 0, 1, 0, 1, 1, 1, 1,
3926 1, 0, 2, 3, 0, 0, 2, 2,
3927 3, 0, 3, 1, 1, 0, 5, 5,
3928 0, 0, 0, 0, 0, 1, 3, 0,
3929 0, 2, 2, 3, 0, 3, 1, 0,
3930 1, 1, 1, 0, 1
3931 };
3932  
3933 static const short _VBG_index_offsets[] = {
3934 0, 0, 2, 4, 6, 13, 19, 25,
3935 31, 37, 43, 46, 48, 50, 52, 54,
3936 56, 58, 65, 72, 74, 77, 79, 81,
3937 83, 85, 87, 89, 95, 104, 106, 108,
3938 110, 112, 114, 117, 119, 121, 123, 125,
3939 127, 129, 154, 155, 164, 166, 172, 182,
3940 191, 200, 210, 216, 222, 229, 239, 240,
3941 249, 260, 262, 273, 274, 283, 292, 301,
3942 310, 319, 325, 336, 345, 351, 358, 367,
3943 376, 385, 393, 402, 411, 420, 421, 428,
3944 435, 438, 440, 442, 443, 445, 453, 462,
3945 468, 475, 484, 493, 502, 510, 519, 526,
3946 533, 542, 551, 560, 567
3947 };
3948  
3949 static const unsigned char _VBG_indicies[] = {
3950 0, 1, 2, 1, 3, 1, 4, 4,
3951 4, 4, 4, 4, 1, 5, 5, 5,
3952 5, 6, 1, 7, 7, 7, 7, 7,
3953 1, 8, 8, 8, 8, 9, 1, 5,
3954 5, 5, 5, 10, 1, 11, 11, 11,
3955 11, 11, 1, 11, 12, 1, 11, 1,
3956 13, 1, 11, 1, 14, 1, 11, 1,
3957 11, 1, 5, 5, 5, 5, 6, 15,
3958 1, 5, 5, 5, 5, 6, 16, 1,
3959 4, 1, 17, 18, 1, 17, 1, 19,
3960 1, 17, 1, 20, 1, 17, 1, 17,
3961 1, 21, 22, 21, 23, 24, 1, 25,
3962 26, 25, 27, 28, 29, 25, 30, 1,
3963 31, 1, 31, 1, 32, 1, 31, 1,
3964 31, 1, 33, 34, 1, 33, 1, 35,
3965 1, 33, 1, 36, 1, 33, 1, 33,
3966 1, 38, 39, 40, 41, 42, 43, 44,
3967 45, 46, 47, 48, 49, 50, 51, 52,
3968 53, 54, 55, 56, 57, 58, 59, 60,
3969 37, 1, 1, 61, 62, 61, 61, 61,
3970 61, 63, 63, 1, 64, 1, 65, 65,
3971 65, 65, 65, 1, 67, 68, 67, 66,
3972 66, 66, 67, 66, 67, 1, 69, 62,
3973 69, 69, 69, 69, 63, 63, 1, 61,
3974 61, 62, 61, 61, 61, 63, 63, 1,
3975 66, 66, 68, 66, 70, 66, 66, 67,
3976 67, 1, 71, 71, 71, 71, 71, 1,
3977 72, 73, 74, 75, 76, 1, 72, 73,
3978 74, 11, 75, 76, 1, 61, 61, 62,
3979 61, 61, 77, 61, 63, 63, 1, 78,
3980 61, 61, 61, 62, 61, 61, 63, 63,
3981 1, 63, 79, 63, 61, 62, 61, 61,
3982 63, 61, 63, 1, 7, 1, 61, 61,
3983 61, 68, 61, 80, 61, 80, 67, 67,
3984 1, 5, 61, 61, 61, 62, 61, 61,
3985 63, 63, 1, 81, 81, 82, 62, 81,
3986 81, 63, 63, 1, 81, 81, 81, 81,
3987 62, 81, 63, 63, 1, 61, 61, 61,
3988 61, 62, 61, 63, 63, 1, 61, 83,
3989 61, 84, 62, 61, 63, 63, 1, 5,
3990 5, 5, 5, 6, 1, 85, 86, 85,
3991 5, 86, 5, 86, 6, 5, 85, 1,
3992 87, 88, 89, 90, 91, 85, 85, 85,
3993 1, 87, 92, 89, 93, 94, 1, 87,
3994 92, 89, 17, 93, 94, 1, 87, 17,
3995 88, 89, 90, 91, 85, 85, 1, 87,
3996 20, 88, 89, 90, 91, 85, 85, 1,
3997 95, 88, 89, 90, 91, 85, 85, 85,
3998 1, 17, 87, 92, 89, 18, 93, 94,
3999 1, 87, 97, 89, 98, 99, 96, 96,
4000 96, 1, 66, 66, 66, 66, 100, 66,
4001 67, 67, 1, 101, 102, 103, 61, 62,
4002 61, 63, 63, 1, 104, 106, 106, 106,
4003 106, 106, 106, 105, 107, 107, 107, 107,
4004 107, 107, 1, 31, 108, 1, 31, 1,
4005 109, 1, 105, 110, 104, 5, 5, 5,
4006 112, 5, 6, 111, 1, 113, 114, 115,
4007 116, 117, 111, 111, 111, 1, 113, 118,
4008 115, 119, 120, 1, 113, 118, 115, 33,
4009 119, 120, 1, 113, 33, 114, 115, 116,
4010 117, 111, 111, 1, 113, 36, 114, 115,
4011 116, 117, 111, 111, 1, 121, 114, 115,
4012 116, 117, 111, 111, 111, 1, 33, 113,
4013 118, 115, 34, 119, 120, 1, 113, 123,
4014 115, 124, 125, 122, 122, 122, 1, 5,
4015 5, 5, 5, 6, 111, 1, 4, 4,
4016 4, 4, 4, 4, 1, 66, 66, 66,
4017 66, 66, 68, 67, 67, 1, 81, 81,
4018 81, 81, 81, 62, 63, 63, 1, 81,
4019 81, 81, 81, 81, 62, 63, 63, 1,
4020 126, 126, 126, 126, 126, 4, 1, 127,
4021 127, 127, 127, 127, 129, 130, 128, 1,
4022 0
4023 };
4024  
4025 static const char _VBG_trans_targs[] = {
4026 2, 0, 3, 41, 42, 42, 44, 42,
4027 42, 44, 44, 51, 52, 13, 15, 42,
4028 42, 68, 69, 23, 25, 77, 78, 83,
4029 84, 42, 80, 29, 82, 31, 33, 42,
4030 32, 87, 88, 37, 39, 4, 43, 46,
4031 47, 48, 49, 53, 55, 56, 58, 60,
4032 61, 19, 62, 63, 64, 75, 76, 95,
4033 96, 97, 98, 99, 100, 5, 45, 42,
4034 42, 6, 7, 42, 45, 8, 50, 9,
4035 10, 11, 12, 14, 16, 54, 42, 57,
4036 59, 17, 18, 65, 66, 67, 74, 20,
4037 70, 22, 71, 72, 21, 24, 26, 73,
4038 67, 70, 71, 72, 45, 27, 85, 94,
4039 42, 42, 79, 28, 81, 30, 42, 86,
4040 93, 34, 89, 36, 90, 91, 35, 38,
4041 40, 92, 86, 89, 90, 91, 65, 65,
4042 42, 42, 45
4043 };
4044  
4045 static const char _VBG_trans_actions[] = {
4046 0, 0, 0, 29, 23, 15, 15, 3,
4047 46, 46, 40, 0, 0, 0, 0, 5,
4048 34, 0, 0, 0, 0, 15, 15, 15,
4049 15, 11, 11, 0, 11, 0, 0, 9,
4050 0, 0, 0, 0, 0, 0, 0, 0,
4051 0, 0, 0, 0, 0, 0, 0, 0,
4052 0, 0, 0, 0, 0, 0, 0, 21,
4053 0, 0, 0, 23, 0, 0, 19, 19,
4054 7, 0, 0, 49, 49, 0, 49, 0,
4055 0, 0, 0, 0, 0, 19, 17, 19,
4056 49, 0, 0, 27, 27, 0, 0, 0,
4057 0, 0, 0, 0, 0, 0, 0, 0,
4058 25, 25, 25, 25, 56, 0, 9, 9,
4059 13, 43, 43, 0, 9, 0, 37, 0,
4060 0, 0, 0, 0, 0, 0, 0, 0,
4061 0, 0, 7, 7, 7, 7, 23, 1,
4062 31, 1, 52
4063 };
4064  
4065 static const char _VBG_eof_actions[] = {
4066 0, 0, 0, 0, 0, 0, 0, 0,
4067 0, 0, 0, 0, 0, 0, 0, 0,
4068 0, 0, 0, 0, 0, 0, 0, 0,
4069 0, 0, 0, 0, 0, 0, 0, 0,
4070 0, 0, 0, 0, 0, 0, 0, 0,
4071 0, 0, 0, 3, 0, 0, 3, 3,
4072 3, 3, 0, 3, 3, 3, 0, 3,
4073 3, 0, 3, 0, 3, 3, 3, 3,
4074 3, 0, 0, 25, 25, 25, 25, 25,
4075 25, 25, 25, 3, 3, 0, 0, 0,
4076 0, 0, 0, 0, 0, 0, 7, 7,
4077 7, 7, 7, 7, 7, 7, 0, 0,
4078 3, 3, 3, 0, 3
4079 };
4080  
4081 static const int VBG_start = 1;
4082  
4083 0 void english_morpho_guesser::add_VBG(const string& form, vector<tagged_lemma>& lemmas) const {
4084 0 const char* p = form.c_str(); int cs;
4085 0 char best = 'z'; unsigned remove = 0; const char* append = nullptr;
4086
4087 {
4088 0 cs = VBG_start;
4089 }
4090  
4091 {
4092 int _klen;
4093 unsigned int _trans;
4094 const char *_acts;
4095 unsigned int _nacts;
4096 const char *_keys;
4097  
4098 0 ▶ if ( p == ( (form.c_str() + form.size())) )
Branch: 1 branch
BranchTrueFalseTotal
if ( p == ( (form.c_str() + form.size())) ) 0 0 0
4099 0 goto _test_eof;
4100 0 ▶ if ( cs == 0 )
Branch: 1 branch
BranchTrueFalseTotal
if ( cs == 0 ) 0 0 0
4101 0 goto _out;
4102 0 _resume:
4103 0 _keys = _VBG_trans_keys + _VBG_key_offsets[cs];
4104 0 _trans = _VBG_index_offsets[cs];
4105  
4106 0 _klen = _VBG_single_lengths[cs];
4107 0 ▶ if ( _klen > 0 ) {
Branch: 1 branch
BranchTrueFalseTotal
if ( _klen > 0 ) { 0 0 0
4108 0 const char *_lower = _keys;
4109 const char *_mid;
4110 0 const char *_upper = _keys + _klen - 1;
4111 while (1) {
4112 0 ▶ if ( _upper < _lower )
Branch: 1 branch
BranchTrueFalseTotal
if ( _upper < _lower ) 0 0 0
4113 0 break;
4114  
4115 0 _mid = _lower + ((_upper-_lower) >> 1);
4116 0 ▶ if ( ( form[form.size() - 1 - (p - form.c_str())]) < *_mid )
Branch: 1 branch
BranchTrueFalseTotal
if ( ( form[form.size() - 1 - (p - form.c_str())]) < *_mid ) 0 0 0
4117 0 _upper = _mid - 1;
4118 0 ▶ else if ( ( form[form.size() - 1 - (p - form.c_str())]) > *_mid )
Branch: 1 branch
BranchTrueFalseTotal
else if ( ( form[form.size() - 1 - (p - form.c_str())]) > *_mid ) 0 0 0
4119 0 _lower = _mid + 1;
4120 else {
4121 0 _trans += (unsigned int)(_mid - _keys);
4122 0 goto _match;
4123 }
4124 }
4125 0 _keys += _klen;
4126 0 _trans += _klen;
4127 }
4128  
4129 0 _klen = _VBG_range_lengths[cs];
4130 0 ▶ if ( _klen > 0 ) {
Branch: 1 branch
BranchTrueFalseTotal
if ( _klen > 0 ) { 0 0 0
4131 0 const char *_lower = _keys;
4132 const char *_mid;
4133 0 const char *_upper = _keys + (_klen<<1) - 2;
4134 while (1) {
4135 0 ▶ if ( _upper < _lower )
Branch: 1 branch
BranchTrueFalseTotal
if ( _upper < _lower ) 0 0 0
4136 0 break;
4137  
4138 0 _mid = _lower + (((_upper-_lower) >> 1) & ~1);
4139 0 ▶ if ( ( form[form.size() - 1 - (p - form.c_str())]) < _mid[0] )
Branch: 1 branch
BranchTrueFalseTotal
if ( ( form[form.size() - 1 - (p - form.c_str())]) < _mid[0] ) 0 0 0
4140 0 _upper = _mid - 2;
4141 0 ▶ else if ( ( form[form.size() - 1 - (p - form.c_str())]) > _mid[1] )
Branch: 1 branch
BranchTrueFalseTotal
else if ( ( form[form.size() - 1 - (p - form.c_str())]) > _mid[1] ) 0 0 0
4142 0 _lower = _mid + 2;
4143 else {
4144 0 _trans += (unsigned int)((_mid - _keys)>>1);
4145 0 goto _match;
4146 }
4147 }
4148 0 _trans += _klen;
4149 }
4150  
4151 0 _match:
4152 0 _trans = _VBG_indicies[_trans];
4153 0 cs = _VBG_trans_targs[_trans];
4154  
4155 0 ▶ if ( _VBG_trans_actions[_trans] == 0 )
Branch: 1 branch
BranchTrueFalseTotal
if ( _VBG_trans_actions[_trans] == 0 ) 0 0 0
4156 0 goto _again;
4157  
4158 0 _acts = _VBG_actions + _VBG_trans_actions[_trans];
4159 0 _nacts = (unsigned int) *_acts++;
4160 0 ▶ while ( _nacts-- > 0 )
Branch: 1 branch
BranchTrueFalseTotal
while ( _nacts-- > 0 ) 0 0 0
4161 {
4162 0 switch ( *_acts++ )
4163 {
4164 0 case 0:
4165 0 ▶ { if (best > 'a') best = 'a', remove = 3, append = nullptr; }
Branch: 1 branch
BranchTrueFalseTotal
{ if (best > 'a') best = 'a', remove = 3, append = nullptr; } 0 0 0
4166 0 break;
4167 0 case 1:
4168 0 ▶ { if (best > 'b') best = 'b', remove = 3, append = "e"; }
Branch: 1 branch
BranchTrueFalseTotal
{ if (best > 'b') best = 'b', remove = 3, append = "e"; } 0 0 0
4169 0 break;
4170 0 case 2:
4171 0 ▶ { if (best > 'c') best = 'c', remove = 3, append = nullptr; }
Branch: 1 branch
BranchTrueFalseTotal
{ if (best > 'c') best = 'c', remove = 3, append = nullptr; } 0 0 0
4172 0 break;
4173 0 case 3:
4174 0 ▶ { if (best > 'd') best = 'd', remove = 3, append = "e"; }
Branch: 1 branch
BranchTrueFalseTotal
{ if (best > 'd') best = 'd', remove = 3, append = "e"; } 0 0 0
4175 0 break;
4176 0 case 4:
4177 0 ▶ { if (best > 'e') best = 'e', remove = 3, append = nullptr; }
Branch: 1 branch
BranchTrueFalseTotal
{ if (best > 'e') best = 'e', remove = 3, append = nullptr; } 0 0 0
4178 0 break;
4179 0 case 5:
4180 0 ▶ { if (best > 'f') best = 'f', remove = 3, append = "e"; }
Branch: 1 branch
BranchTrueFalseTotal
{ if (best > 'f') best = 'f', remove = 3, append = "e"; } 0 0 0
4181 0 break;
4182 0 case 6:
4183 0 ▶ { if (best > 'g') best = 'g', remove = 3, append = nullptr; }
Branch: 1 branch
BranchTrueFalseTotal
{ if (best > 'g') best = 'g', remove = 3, append = nullptr; } 0 0 0
4184 0 break;
4185 0 case 7:
4186 0 ▶ { if (best > 'h') best = 'h', remove = 3, append = "e"; }
Branch: 1 branch
BranchTrueFalseTotal
{ if (best > 'h') best = 'h', remove = 3, append = "e"; } 0 0 0
4187 0 break;
4188 0 case 8:
4189 0 ▶ { if (best > 'i') best = 'i', remove = 3, append = nullptr; }
Branch: 1 branch
BranchTrueFalseTotal
{ if (best > 'i') best = 'i', remove = 3, append = nullptr; } 0 0 0
4190 0 break;
4191 0 case 9:
4192 0 ▶ { if (best > 'j') best = 'j', remove = 3, append = "e"; }
Branch: 1 branch
BranchTrueFalseTotal
{ if (best > 'j') best = 'j', remove = 3, append = "e"; } 0 0 0
4193 0 break;
4194 0 case 10:
4195 0 ▶ { if (best > 'k') best = 'k', remove = 3, append = nullptr; }
Branch: 1 branch
BranchTrueFalseTotal
{ if (best > 'k') best = 'k', remove = 3, append = nullptr; } 0 0 0
4196 0 break;
4197 0 case 11:
4198 0 ▶ { if (best > 'l') best = 'l', remove = 3, append = "e"; }
Branch: 1 branch
BranchTrueFalseTotal
{ if (best > 'l') best = 'l', remove = 3, append = "e"; } 0 0 0
4199 0 break;
4200 0 case 12:
4201 0 ▶ { if (best > 'm') best = 'm', remove = 3, append = nullptr; }
Branch: 1 branch
BranchTrueFalseTotal
{ if (best > 'm') best = 'm', remove = 3, append = nullptr; } 0 0 0
4202 0 break;
4203 0 case 13:
4204 0 ▶ { if (best > 'n') best = 'n', remove = 3, append = "e"; }
Branch: 1 branch
BranchTrueFalseTotal
{ if (best > 'n') best = 'n', remove = 3, append = "e"; } 0 0 0
4205 0 break;
4206 0 case 14:
4207 0 ▶ { if (best > 'o') best = 'o', remove = 3, append = nullptr; }
Branch: 1 branch
BranchTrueFalseTotal
{ if (best > 'o') best = 'o', remove = 3, append = nullptr; } 0 0 0
4208 0 break;
4209 0 case 15:
4210 0 ▶ { if (best > 'p') best = 'p', remove = 3, append = "e"; }
Branch: 1 branch
BranchTrueFalseTotal
{ if (best > 'p') best = 'p', remove = 3, append = "e"; } 0 0 0
4211 0 break;
4212 0 case 16:
4213 0 ▶ { if (best > 'q') best = 'q', remove = 3, append = nullptr; }
Branch: 1 branch
BranchTrueFalseTotal
{ if (best > 'q') best = 'q', remove = 3, append = nullptr; } 0 0 0
4214 0 break;
4215 0 case 17:
4216 0 ▶ { if (best > 'r') best = 'r', remove = 3, append = "e"; }
Branch: 1 branch
BranchTrueFalseTotal
{ if (best > 'r') best = 'r', remove = 3, append = "e"; } 0 0 0
4217 0 break;
4218 }
4219 }
4220  
4221 0 _again:
4222 0 ▶ if ( cs == 0 )
Branch: 1 branch
BranchTrueFalseTotal
if ( cs == 0 ) 0 0 0
4223 0 goto _out;
4224 0 ▶ if ( ++p != ( (form.c_str() + form.size())) )
Branch: 1 branch
BranchTrueFalseTotal
if ( ++p != ( (form.c_str() + form.size())) ) 0 0 0
4225 0 goto _resume;
4226 0 _test_eof: {}
4227 0 ▶ if ( p == ( (form.c_str() + form.size())) )
Branch: 1 branch
BranchTrueFalseTotal
if ( p == ( (form.c_str() + form.size())) ) 0 0 0
4228 {
4229 0 const char *__acts = _VBG_actions + _VBG_eof_actions[cs];
4230 0 unsigned int __nacts = (unsigned int) *__acts++;
4231 0 ▶ while ( __nacts-- > 0 ) {
Branch: 1 branch
BranchTrueFalseTotal
while ( __nacts-- > 0 ) { 0 0 0
4232 0 switch ( *__acts++ ) {
4233 0 case 2:
4234 0 ▶ { if (best > 'c') best = 'c', remove = 3, append = nullptr; }
Branch: 1 branch
BranchTrueFalseTotal
{ if (best > 'c') best = 'c', remove = 3, append = nullptr; } 0 0 0
4235 0 break;
4236 0 case 5:
4237 0 ▶ { if (best > 'f') best = 'f', remove = 3, append = "e"; }
Branch: 1 branch
BranchTrueFalseTotal
{ if (best > 'f') best = 'f', remove = 3, append = "e"; } 0 0 0
4238 0 break;
4239 0 case 15:
4240 0 ▶ { if (best > 'p') best = 'p', remove = 3, append = "e"; }
Branch: 1 branch
BranchTrueFalseTotal
{ if (best > 'p') best = 'p', remove = 3, append = "e"; } 0 0 0
4241 0 break;
4242 }
4243 }
4244 }
4245  
4246 0 _out: {}
4247 }
4248  
4249 0 ▶ add(VBG, form.substr(0, form.size() - remove).append(append ? append : ""), lemmas);
Branch: 4 branches
BranchTrueFalseTotal
add(VBG, form.substr(0, form.size() - remove).append(append ? append : ""), lemmas); 0 0 0
add(VBG, form.substr(0, form.size() - remove).append(append ? append : ""), lemmas); 0 0 0
add(VBG, form.substr(0, form.size() - remove).append(append ? append : ""), lemmas); 0 0 0
add(VBG, form.substr(0, form.size() - remove).append(append ? append : ""), lemmas); 0 0 0
4250 0 }
4251  
4252 static const char _VBD_VBN_actions[] = {
4253 0, 1, 0, 1, 2, 1, 3, 1,
4254 4, 1, 5, 1, 6, 1, 7, 1,
4255 8, 1, 9, 1, 10, 1, 11, 1,
4256 13, 1, 14, 1, 15, 1, 16, 1,
4257 17, 2, 1, 16, 2, 4, 5, 2,
4258 8, 16, 2, 9, 13, 2, 9, 14,
4259 2, 12, 13, 2, 13, 14, 2, 15,
4260 16, 3, 1, 3, 16, 3, 3, 15,
4261 16
4262 };
4263  
4264 static const short _VBD_VBN_key_offsets[] = {
4265 0, 0, 2, 3, 9, 14, 24, 29,
4266 34, 44, 46, 47, 48, 49, 50, 51,
4267 52, 60, 67, 74, 76, 77, 78, 79,
4268 80, 81, 82, 87, 95, 96, 97, 98,
4269 99, 100, 102, 103, 104, 105, 106, 107,
4270 108, 114, 115, 140, 140, 149, 150, 155,
4271 166, 175, 184, 194, 199, 204, 210, 220,
4272 220, 229, 241, 242, 253, 253, 262, 271,
4273 280, 289, 298, 303, 316, 327, 332, 338,
4274 348, 358, 369, 376, 387, 396, 405, 405,
4275 416, 427, 429, 430, 431, 431, 432, 440,
4276 451, 456, 462, 472, 482, 493, 500, 511,
4277 518, 524, 533, 542, 551
4278 };
4279  
4280 static const char _VBD_VBN_trans_keys[] = {
4281 100, 110, 101, 97, 101, 105, 111, 117,
4282 121, 97, 101, 105, 111, 117, 98, 100,
4283 102, 104, 106, 110, 112, 116, 118, 122,
4284 97, 101, 105, 111, 117, 97, 101, 105,
4285 111, 117, 98, 100, 102, 104, 106, 110,
4286 112, 116, 118, 122, 98, 114, 105, 114,
4287 112, 105, 109, 101, 97, 101, 105, 111,
4288 117, 121, 98, 122, 97, 101, 105, 111,
4289 117, 98, 122, 97, 101, 105, 111, 117,
4290 98, 122, 98, 114, 105, 114, 112, 105,
4291 109, 101, 97, 101, 105, 111, 117, 97,
4292 101, 105, 110, 111, 115, 117, 120, 105,
4293 112, 105, 109, 101, 98, 114, 105, 114,
4294 112, 105, 109, 101, 97, 101, 105, 111,
4295 117, 121, 101, 98, 99, 100, 102, 103,
4296 104, 105, 106, 107, 108, 109, 110, 112,
4297 113, 114, 115, 116, 117, 118, 119, 120,
4298 121, 122, 97, 111, 97, 98, 101, 105,
4299 111, 117, 122, 99, 120, 113, 97, 101,
4300 105, 111, 117, 98, 99, 100, 105, 111,
4301 117, 122, 97, 101, 102, 120, 97, 100,
4302 101, 105, 111, 117, 122, 98, 120, 97,
4303 101, 102, 105, 111, 117, 122, 98, 120,
4304 97, 101, 103, 105, 110, 111, 117, 122,
4305 98, 120, 97, 101, 105, 111, 117, 101,
4306 110, 111, 115, 120, 101, 110, 111, 112,
4307 115, 120, 97, 101, 104, 105, 111, 116,
4308 117, 122, 98, 120, 97, 101, 105, 106,
4309 111, 117, 122, 98, 120, 98, 99, 100,
4310 105, 107, 111, 117, 122, 97, 101, 102,
4311 120, 105, 97, 101, 105, 108, 111, 114,
4312 117, 119, 122, 98, 120, 97, 101, 105,
4313 109, 111, 117, 122, 98, 120, 97, 101,
4314 105, 110, 111, 117, 122, 98, 120, 97,
4315 101, 105, 111, 112, 117, 122, 98, 120,
4316 97, 101, 105, 111, 113, 117, 122, 98,
4317 120, 97, 101, 105, 111, 114, 117, 122,
4318 98, 120, 97, 101, 105, 111, 117, 98,
4319 99, 100, 105, 108, 110, 111, 116, 117,
4320 97, 101, 102, 122, 101, 110, 111, 115,
4321 120, 98, 104, 106, 116, 118, 122, 101,
4322 110, 111, 115, 120, 101, 110, 111, 112,
4323 115, 120, 101, 105, 110, 111, 115, 120,
4324 98, 116, 118, 122, 101, 105, 110, 111,
4325 115, 120, 98, 116, 118, 122, 101, 110,
4326 111, 115, 120, 98, 104, 106, 116, 118,
4327 122, 98, 101, 110, 111, 114, 115, 120,
4328 101, 110, 111, 115, 120, 98, 104, 106,
4329 116, 118, 122, 97, 101, 105, 111, 115,
4330 117, 122, 98, 120, 97, 101, 105, 111,
4331 116, 117, 122, 98, 120, 122, 98, 100,
4332 102, 104, 106, 110, 112, 116, 118, 120,
4333 122, 98, 100, 102, 104, 106, 110, 112,
4334 116, 118, 120, 98, 114, 112, 114, 113,
4335 97, 101, 105, 108, 111, 117, 98, 122,
4336 101, 110, 111, 115, 120, 98, 104, 106,
4337 116, 118, 122, 101, 110, 111, 115, 120,
4338 101, 110, 111, 112, 115, 120, 101, 105,
4339 110, 111, 115, 120, 98, 116, 118, 122,
4340 101, 105, 110, 111, 115, 120, 98, 116,
4341 118, 122, 101, 110, 111, 115, 120, 98,
4342 104, 106, 116, 118, 122, 98, 101, 110,
4343 111, 114, 115, 120, 101, 110, 111, 115,
4344 120, 98, 104, 106, 116, 118, 122, 97,
4345 101, 105, 111, 117, 98, 122, 97, 101,
4346 105, 111, 117, 121, 97, 101, 105, 111,
4347 117, 118, 122, 98, 120, 97, 101, 105,
4348 111, 117, 119, 122, 98, 120, 97, 101,
4349 105, 111, 117, 120, 122, 98, 119, 97,
4350 101, 105, 111, 117, 121, 122, 98, 120,
4351 0
4352 };
4353  
4354 static const char _VBD_VBN_single_lengths[] = {
4355 0, 2, 1, 6, 5, 0, 5, 5,
4356 0, 2, 1, 1, 1, 1, 1, 1,
4357 6, 5, 5, 2, 1, 1, 1, 1,
4358 1, 1, 5, 8, 1, 1, 1, 1,
4359 1, 2, 1, 1, 1, 1, 1, 1,
4360 6, 1, 23, 0, 7, 1, 5, 7,
4361 7, 7, 8, 5, 5, 6, 8, 0,
4362 7, 8, 1, 9, 0, 7, 7, 7,
4363 7, 7, 5, 9, 5, 5, 6, 6,
4364 6, 5, 7, 5, 7, 7, 0, 1,
4365 1, 2, 1, 1, 0, 1, 6, 5,
4366 5, 6, 6, 6, 5, 7, 5, 5,
4367 6, 7, 7, 7, 7
4368 };
4369  
4370 static const char _VBD_VBN_range_lengths[] = {
4371 0, 0, 0, 0, 0, 5, 0, 0,
4372 5, 0, 0, 0, 0, 0, 0, 0,
4373 1, 1, 1, 0, 0, 0, 0, 0,
4374 0, 0, 0, 0, 0, 0, 0, 0,
4375 0, 0, 0, 0, 0, 0, 0, 0,
4376 0, 0, 1, 0, 1, 0, 0, 2,
4377 1, 1, 1, 0, 0, 0, 1, 0,
4378 1, 2, 0, 1, 0, 1, 1, 1,
4379 1, 1, 0, 2, 3, 0, 0, 2,
4380 2, 3, 0, 3, 1, 1, 0, 5,
4381 5, 0, 0, 0, 0, 0, 1, 3,
4382 0, 0, 2, 2, 3, 0, 3, 1,
4383 0, 1, 1, 1, 1
4384 };
4385  
4386 static const short _VBD_VBN_index_offsets[] = {
4387 0, 0, 3, 5, 12, 18, 24, 30,
4388 36, 42, 45, 47, 49, 51, 53, 55,
4389 57, 65, 72, 79, 82, 84, 86, 88,
4390 90, 92, 94, 100, 109, 111, 113, 115,
4391 117, 119, 122, 124, 126, 128, 130, 132,
4392 134, 141, 143, 168, 169, 178, 180, 186,
4393 196, 205, 214, 224, 230, 236, 243, 253,
4394 254, 263, 274, 276, 287, 288, 297, 306,
4395 315, 324, 333, 339, 351, 360, 366, 373,
4396 382, 391, 400, 408, 417, 426, 435, 436,
4397 443, 450, 453, 455, 457, 458, 460, 468,
4398 477, 483, 490, 499, 508, 517, 525, 534,
4399 541, 548, 557, 566, 575
4400 };
4401  
4402 static const unsigned char _VBD_VBN_indicies[] = {
4403 0, 2, 1, 3, 1, 4, 4, 4,
4404 4, 4, 4, 1, 5, 5, 5, 5,
4405 6, 1, 7, 7, 7, 7, 7, 1,
4406 8, 8, 8, 8, 9, 1, 5, 5,
4407 5, 5, 10, 1, 11, 11, 11, 11,
4408 11, 1, 11, 12, 1, 11, 1, 13,
4409 1, 11, 1, 14, 1, 11, 1, 11,
4410 1, 4, 4, 4, 4, 4, 16, 15,
4411 1, 5, 5, 5, 5, 6, 17, 1,
4412 5, 5, 5, 5, 6, 18, 1, 19,
4413 20, 1, 19, 1, 21, 1, 19, 1,
4414 22, 1, 19, 1, 19, 1, 23, 24,
4415 23, 25, 26, 1, 27, 28, 27, 29,
4416 30, 31, 27, 32, 1, 33, 1, 33,
4417 1, 34, 1, 33, 1, 33, 1, 35,
4418 36, 1, 35, 1, 37, 1, 35, 1,
4419 38, 1, 35, 1, 35, 1, 39, 39,
4420 39, 39, 39, 4, 1, 40, 1, 42,
4421 43, 44, 45, 46, 47, 48, 49, 50,
4422 51, 52, 53, 54, 55, 56, 57, 58,
4423 59, 60, 61, 62, 63, 64, 41, 1,
4424 1, 65, 66, 65, 65, 65, 65, 4,
4425 4, 1, 67, 1, 68, 68, 68, 68,
4426 68, 1, 70, 71, 70, 69, 69, 69,
4427 70, 69, 70, 1, 72, 66, 72, 72,
4428 72, 72, 4, 4, 1, 65, 65, 66,
4429 65, 65, 65, 4, 4, 1, 69, 69,
4430 71, 69, 73, 69, 69, 70, 70, 1,
4431 74, 74, 74, 74, 74, 1, 75, 76,
4432 77, 78, 79, 1, 75, 76, 77, 11,
4433 78, 79, 1, 65, 65, 66, 65, 65,
4434 80, 65, 4, 4, 1, 81, 65, 65,
4435 65, 66, 65, 65, 4, 4, 1, 4,
4436 82, 4, 65, 66, 65, 65, 4, 65,
4437 4, 1, 7, 1, 65, 65, 65, 71,
4438 65, 83, 65, 83, 70, 70, 1, 5,
4439 65, 65, 65, 66, 65, 65, 4, 4,
4440 1, 84, 84, 85, 66, 84, 84, 4,
4441 4, 1, 84, 84, 84, 84, 66, 84,
4442 4, 4, 1, 65, 65, 65, 65, 66,
4443 65, 4, 4, 1, 65, 86, 65, 87,
4444 66, 65, 4, 4, 1, 5, 5, 5,
4445 5, 6, 1, 88, 89, 88, 5, 89,
4446 89, 5, 89, 6, 5, 88, 1, 90,
4447 91, 92, 93, 94, 88, 88, 88, 1,
4448 90, 95, 92, 96, 97, 1, 90, 95,
4449 92, 19, 96, 97, 1, 90, 19, 91,
4450 92, 93, 94, 88, 88, 1, 90, 22,
4451 91, 92, 93, 94, 88, 88, 1, 98,
4452 91, 92, 93, 94, 88, 88, 88, 1,
4453 19, 90, 95, 92, 20, 96, 97, 1,
4454 90, 100, 92, 101, 102, 99, 99, 99,
4455 1, 69, 69, 69, 69, 103, 69, 70,
4456 70, 1, 104, 105, 106, 65, 66, 65,
4457 4, 4, 1, 107, 109, 109, 109, 109,
4458 109, 109, 108, 110, 110, 110, 110, 110,
4459 110, 1, 33, 111, 1, 33, 1, 112,
4460 1, 108, 113, 107, 5, 5, 5, 115,
4461 5, 6, 114, 1, 116, 117, 118, 119,
4462 120, 114, 114, 114, 1, 116, 121, 118,
4463 122, 123, 1, 116, 121, 118, 35, 122,
4464 123, 1, 116, 35, 117, 118, 119, 120,
4465 114, 114, 1, 116, 38, 117, 118, 119,
4466 120, 114, 114, 1, 124, 117, 118, 119,
4467 120, 114, 114, 114, 1, 35, 116, 121,
4468 118, 36, 122, 123, 1, 116, 126, 118,
4469 127, 128, 125, 125, 125, 1, 5, 5,
4470 5, 5, 6, 114, 1, 4, 4, 4,
4471 4, 4, 4, 1, 69, 69, 69, 69,
4472 69, 71, 70, 70, 1, 84, 84, 84,
4473 84, 84, 66, 4, 4, 1, 84, 84,
4474 84, 84, 84, 66, 4, 4, 1, 129,
4475 129, 129, 129, 129, 131, 132, 130, 1,
4476 0
4477 };
4478  
4479 static const char _VBD_VBN_trans_targs[] = {
4480 2, 0, 41, 42, 43, 43, 45, 43,
4481 43, 45, 45, 52, 53, 12, 14, 43,
4482 43, 43, 43, 69, 70, 22, 24, 78,
4483 79, 84, 85, 43, 81, 28, 83, 30,
4484 32, 43, 31, 88, 89, 36, 38, 66,
4485 43, 3, 44, 47, 48, 49, 50, 54,
4486 16, 56, 57, 59, 61, 62, 63, 64,
4487 65, 76, 77, 96, 97, 98, 99, 40,
4488 100, 4, 46, 43, 5, 6, 43, 46,
4489 7, 51, 8, 9, 10, 11, 13, 15,
4490 55, 43, 58, 60, 17, 18, 66, 67,
4491 68, 75, 19, 71, 21, 72, 73, 20,
4492 23, 25, 74, 68, 71, 72, 73, 46,
4493 26, 86, 95, 43, 43, 80, 27, 82,
4494 29, 43, 87, 94, 33, 90, 35, 91,
4495 92, 34, 37, 39, 93, 87, 90, 91,
4496 92, 66, 43, 43, 46
4497 };
4498  
4499 static const char _VBD_VBN_trans_actions[] = {
4500 0, 0, 0, 31, 29, 25, 25, 5,
4501 51, 51, 45, 0, 0, 0, 0, 15,
4502 39, 9, 36, 0, 0, 0, 0, 25,
4503 25, 25, 25, 21, 21, 0, 21, 0,
4504 0, 19, 0, 0, 0, 0, 0, 29,
4505 1, 0, 0, 0, 0, 0, 0, 0,
4506 0, 0, 0, 0, 0, 0, 0, 0,
4507 0, 0, 0, 27, 0, 0, 0, 0,
4508 0, 0, 29, 17, 0, 0, 54, 54,
4509 0, 54, 0, 0, 0, 0, 0, 0,
4510 29, 27, 29, 54, 0, 0, 13, 13,
4511 0, 0, 0, 0, 0, 0, 0, 0,
4512 0, 0, 0, 7, 7, 7, 7, 61,
4513 0, 19, 19, 23, 48, 48, 0, 19,
4514 0, 42, 0, 0, 0, 0, 0, 0,
4515 0, 0, 0, 0, 0, 17, 17, 17,
4516 17, 3, 33, 3, 57
4517 };
4518  
4519 static const char _VBD_VBN_eof_actions[] = {
4520 0, 0, 0, 0, 0, 0, 0, 0,
4521 0, 0, 0, 0, 0, 0, 0, 0,
4522 0, 0, 0, 0, 0, 0, 0, 0,
4523 0, 0, 0, 0, 0, 0, 0, 0,
4524 0, 0, 0, 0, 0, 0, 0, 0,
4525 0, 0, 0, 0, 5, 0, 0, 5,
4526 5, 5, 5, 0, 5, 5, 5, 0,
4527 5, 5, 0, 5, 0, 5, 5, 5,
4528 5, 5, 0, 0, 11, 11, 11, 11,
4529 11, 11, 11, 11, 5, 5, 0, 0,
4530 0, 0, 0, 0, 0, 0, 0, 17,
4531 17, 17, 17, 17, 17, 17, 17, 0,
4532 0, 5, 5, 5, 5
4533 };
4534  
4535 static const int VBD_VBN_start = 1;
4536  
4537 0 void english_morpho_guesser::add_VBD_VBN(const string& form, vector<tagged_lemma>& lemmas) const {
4538 0 const char* p = form.c_str(); int cs;
4539 0 char best = 'z'; unsigned remove = 0; const char* append = nullptr;
4540
4541 {
4542 0 cs = VBD_VBN_start;
4543 }
4544  
4545 {
4546 int _klen;
4547 unsigned int _trans;
4548 const char *_acts;
4549 unsigned int _nacts;
4550 const char *_keys;
4551  
4552 0 ▶ if ( p == ( (form.c_str() + form.size())) )
Branch: 1 branch
BranchTrueFalseTotal
if ( p == ( (form.c_str() + form.size())) ) 0 0 0
4553 0 goto _test_eof;
4554 0 ▶ if ( cs == 0 )
Branch: 1 branch
BranchTrueFalseTotal
if ( cs == 0 ) 0 0 0
4555 0 goto _out;
4556 0 _resume:
4557 0 _keys = _VBD_VBN_trans_keys + _VBD_VBN_key_offsets[cs];
4558 0 _trans = _VBD_VBN_index_offsets[cs];
4559  
4560 0 _klen = _VBD_VBN_single_lengths[cs];
4561 0 ▶ if ( _klen > 0 ) {
Branch: 1 branch
BranchTrueFalseTotal
if ( _klen > 0 ) { 0 0 0
4562 0 const char *_lower = _keys;
4563 const char *_mid;
4564 0 const char *_upper = _keys + _klen - 1;
4565 while (1) {
4566 0 ▶ if ( _upper < _lower )
Branch: 1 branch
BranchTrueFalseTotal
if ( _upper < _lower ) 0 0 0
4567 0 break;
4568  
4569 0 _mid = _lower + ((_upper-_lower) >> 1);
4570 0 ▶ if ( ( form[form.size() - 1 - (p - form.c_str())]) < *_mid )
Branch: 1 branch
BranchTrueFalseTotal
if ( ( form[form.size() - 1 - (p - form.c_str())]) < *_mid ) 0 0 0
4571 0 _upper = _mid - 1;
4572 0 ▶ else if ( ( form[form.size() - 1 - (p - form.c_str())]) > *_mid )
Branch: 1 branch
BranchTrueFalseTotal
else if ( ( form[form.size() - 1 - (p - form.c_str())]) > *_mid ) 0 0 0
4573 0 _lower = _mid + 1;
4574 else {
4575 0 _trans += (unsigned int)(_mid - _keys);
4576 0 goto _match;
4577 }
4578 }
4579 0 _keys += _klen;
4580 0 _trans += _klen;
4581 }
4582  
4583 0 _klen = _VBD_VBN_range_lengths[cs];
4584 0 ▶ if ( _klen > 0 ) {
Branch: 1 branch
BranchTrueFalseTotal
if ( _klen > 0 ) { 0 0 0
4585 0 const char *_lower = _keys;
4586 const char *_mid;
4587 0 const char *_upper = _keys + (_klen<<1) - 2;
4588 while (1) {
4589 0 ▶ if ( _upper < _lower )
Branch: 1 branch
BranchTrueFalseTotal
if ( _upper < _lower ) 0 0 0
4590 0 break;
4591  
4592 0 _mid = _lower + (((_upper-_lower) >> 1) & ~1);
4593 0 ▶ if ( ( form[form.size() - 1 - (p - form.c_str())]) < _mid[0] )
Branch: 1 branch
BranchTrueFalseTotal
if ( ( form[form.size() - 1 - (p - form.c_str())]) < _mid[0] ) 0 0 0
4594 0 _upper = _mid - 2;
4595 0 ▶ else if ( ( form[form.size() - 1 - (p - form.c_str())]) > _mid[1] )
Branch: 1 branch
BranchTrueFalseTotal
else if ( ( form[form.size() - 1 - (p - form.c_str())]) > _mid[1] ) 0 0 0
4596 0 _lower = _mid + 2;
4597 else {
4598 0 _trans += (unsigned int)((_mid - _keys)>>1);
4599 0 goto _match;
4600 }
4601 }
4602 0 _trans += _klen;
4603 }
4604  
4605 0 _match:
4606 0 _trans = _VBD_VBN_indicies[_trans];
4607 0 cs = _VBD_VBN_trans_targs[_trans];
4608  
4609 0 ▶ if ( _VBD_VBN_trans_actions[_trans] == 0 )
Branch: 1 branch
BranchTrueFalseTotal
if ( _VBD_VBN_trans_actions[_trans] == 0 ) 0 0 0
4610 0 goto _again;
4611  
4612 0 _acts = _VBD_VBN_actions + _VBD_VBN_trans_actions[_trans];
4613 0 _nacts = (unsigned int) *_acts++;
4614 0 ▶ while ( _nacts-- > 0 )
Branch: 1 branch
BranchTrueFalseTotal
while ( _nacts-- > 0 ) 0 0 0
4615 {
4616 0 switch ( *_acts++ )
4617 {
4618 0 case 0:
4619 0 ▶ { if (best > 'a') best = 'a', remove = 1, append = nullptr; }
Branch: 1 branch
BranchTrueFalseTotal
{ if (best > 'a') best = 'a', remove = 1, append = nullptr; } 0 0 0
4620 0 break;
4621 0 case 1:
4622 0 ▶ { if (best > 'b') best = 'b', remove = 2, append = nullptr; }
Branch: 1 branch
BranchTrueFalseTotal
{ if (best > 'b') best = 'b', remove = 2, append = nullptr; } 0 0 0
4623 0 break;
4624 0 case 2:
4625 0 ▶ { if (best > 'c') best = 'c', remove = 1, append = nullptr; }
Branch: 1 branch
BranchTrueFalseTotal
{ if (best > 'c') best = 'c', remove = 1, append = nullptr; } 0 0 0
4626 0 break;
4627 0 case 3:
4628 0 ▶ { if (best > 'd') best = 'd', remove = 2, append = nullptr; }
Branch: 1 branch
BranchTrueFalseTotal
{ if (best > 'd') best = 'd', remove = 2, append = nullptr; } 0 0 0
4629 0 break;
4630 0 case 4:
4631 0 ▶ { if (best > 'e') best = 'e', remove = 1, append = nullptr; }
Branch: 1 branch
BranchTrueFalseTotal
{ if (best > 'e') best = 'e', remove = 1, append = nullptr; } 0 0 0
4632 0 break;
4633 0 case 5:
4634 0 ▶ { if (best > 'f') best = 'f', remove = 2, append = nullptr; }
Branch: 1 branch
BranchTrueFalseTotal
{ if (best > 'f') best = 'f', remove = 2, append = nullptr; } 0 0 0
4635 0 break;
4636 0 case 7:
4637 0 ▶ { if (best > 'h') best = 'h', remove = 2, append = nullptr; }
Branch: 1 branch
BranchTrueFalseTotal
{ if (best > 'h') best = 'h', remove = 2, append = nullptr; } 0 0 0
4638 0 break;
4639 0 case 8:
4640 0 ▶ { if (best > 'i') best = 'i', remove = 3, append = "y"; }
Branch: 1 branch
BranchTrueFalseTotal
{ if (best > 'i') best = 'i', remove = 3, append = "y"; } 0 0 0
4641 0 break;
4642 0 case 9:
4643 0 ▶ { if (best > 'j') best = 'j', remove = 1, append = nullptr; }
Branch: 1 branch
BranchTrueFalseTotal
{ if (best > 'j') best = 'j', remove = 1, append = nullptr; } 0 0 0
4644 0 break;
4645 0 case 10:
4646 0 ▶ { if (best > 'k') best = 'k', remove = 2, append = nullptr; }
Branch: 1 branch
BranchTrueFalseTotal
{ if (best > 'k') best = 'k', remove = 2, append = nullptr; } 0 0 0
4647 0 break;
4648 0 case 11:
4649 0 ▶ { if (best > 'l') best = 'l', remove = 1, append = nullptr; }
Branch: 1 branch
BranchTrueFalseTotal
{ if (best > 'l') best = 'l', remove = 1, append = nullptr; } 0 0 0
4650 0 break;
4651 0 case 12:
4652 0 ▶ { if (best > 'm') best = 'm', remove = 2, append = nullptr; }
Branch: 1 branch
BranchTrueFalseTotal
{ if (best > 'm') best = 'm', remove = 2, append = nullptr; } 0 0 0
4653 0 break;
4654 0 case 13:
4655 0 ▶ { if (best > 'n') best = 'n', remove = 1, append = nullptr; }
Branch: 1 branch
BranchTrueFalseTotal
{ if (best > 'n') best = 'n', remove = 1, append = nullptr; } 0 0 0
4656 0 break;
4657 0 case 14:
4658 0 ▶ { if (best > 'o') best = 'o', remove = 2, append = nullptr; }
Branch: 1 branch
BranchTrueFalseTotal
{ if (best > 'o') best = 'o', remove = 2, append = nullptr; } 0 0 0
4659 0 break;
4660 0 case 15:
4661 0 ▶ { if (best > 'p') best = 'p', remove = 1, append = nullptr; }
Branch: 1 branch
BranchTrueFalseTotal
{ if (best > 'p') best = 'p', remove = 1, append = nullptr; } 0 0 0
4662 0 break;
4663 0 case 16:
4664 0 ▶ { if (best > 'q') best = 'q', remove = 2, append = nullptr; }
Branch: 1 branch
BranchTrueFalseTotal
{ if (best > 'q') best = 'q', remove = 2, append = nullptr; } 0 0 0
4665 0 break;
4666 0 case 17:
4667 0 ▶ { if (best > 'r') best = 'r', remove = 1, append = nullptr; }
Branch: 1 branch
BranchTrueFalseTotal
{ if (best > 'r') best = 'r', remove = 1, append = nullptr; } 0 0 0
4668 0 break;
4669 }
4670 }
4671  
4672 0 _again:
4673 0 ▶ if ( cs == 0 )
Branch: 1 branch
BranchTrueFalseTotal
if ( cs == 0 ) 0 0 0
4674 0 goto _out;
4675 0 ▶ if ( ++p != ( (form.c_str() + form.size())) )
Branch: 1 branch
BranchTrueFalseTotal
if ( ++p != ( (form.c_str() + form.size())) ) 0 0 0
4676 0 goto _resume;
4677 0 _test_eof: {}
4678 0 ▶ if ( p == ( (form.c_str() + form.size())) )
Branch: 1 branch
BranchTrueFalseTotal
if ( p == ( (form.c_str() + form.size())) ) 0 0 0
4679 {
4680 0 const char *__acts = _VBD_VBN_actions + _VBD_VBN_eof_actions[cs];
4681 0 unsigned int __nacts = (unsigned int) *__acts++;
4682 0 ▶ while ( __nacts-- > 0 ) {
Branch: 1 branch
BranchTrueFalseTotal
while ( __nacts-- > 0 ) { 0 0 0
4683 0 switch ( *__acts++ ) {
4684 0 case 3:
4685 0 ▶ { if (best > 'd') best = 'd', remove = 2, append = nullptr; }
Branch: 1 branch
BranchTrueFalseTotal
{ if (best > 'd') best = 'd', remove = 2, append = nullptr; } 0 0 0
4686 0 break;
4687 0 case 6:
4688 0 ▶ { if (best > 'g') best = 'g', remove = 1, append = nullptr; }
Branch: 1 branch
BranchTrueFalseTotal
{ if (best > 'g') best = 'g', remove = 1, append = nullptr; } 0 0 0
4689 0 break;
4690 0 case 9:
4691 0 ▶ { if (best > 'j') best = 'j', remove = 1, append = nullptr; }
Branch: 1 branch
BranchTrueFalseTotal
{ if (best > 'j') best = 'j', remove = 1, append = nullptr; } 0 0 0
4692 0 break;
4693 }
4694 }
4695 }
4696  
4697 0 _out: {}
4698 }
4699  
4700 0 ▶ add(VBD, VBN, form.substr(0, form.size() - remove).append(append ? append : ""), lemmas);
Branch: 4 branches
BranchTrueFalseTotal
add(VBD, VBN, form.substr(0, form.size() - remove).append(append ? append : ""), lemmas); 0 0 0
add(VBD, VBN, form.substr(0, form.size() - remove).append(append ? append : ""), lemmas); 0 0 0
add(VBD, VBN, form.substr(0, form.size() - remove).append(append ? append : ""), lemmas); 0 0 0
add(VBD, VBN, form.substr(0, form.size() - remove).append(append ? append : ""), lemmas); 0 0 0
4701 0 }
4702  
4703 static const char _VBZ_actions[] = {
4704 0, 1, 0, 1, 1, 1, 2, 1,
4705 3, 1, 4, 1, 5, 1, 6, 1,
4706 7, 1, 8
4707 };
4708  
4709 static const char _VBZ_key_offsets[] = {
4710 0, 0, 1, 2, 4, 14, 14, 25,
4711 26, 31, 31, 31, 31, 37, 45, 54
4712 };
4713  
4714 static const char _VBZ_trans_keys[] = {
4715 115, 101, 99, 115, 98, 100, 102, 104,
4716 106, 110, 112, 116, 118, 122, 122, 98,
4717 100, 102, 104, 106, 110, 112, 116, 118,
4718 120, 111, 97, 101, 105, 111, 117, 104,
4719 105, 111, 115, 120, 122, 97, 101, 105,
4720 110, 111, 114, 115, 117, 97, 101, 105,
4721 111, 117, 121, 122, 98, 120, 0
4722 };
4723  
4724 static const char _VBZ_single_lengths[] = {
4725 0, 1, 1, 2, 0, 0, 1, 1,
4726 5, 0, 0, 0, 6, 8, 7, 0
4727 };
4728  
4729 static const char _VBZ_range_lengths[] = {
4730 0, 0, 0, 0, 5, 0, 5, 0,
4731 0, 0, 0, 0, 0, 0, 1, 0
4732 };
4733  
4734 static const char _VBZ_index_offsets[] = {
4735 0, 0, 2, 4, 7, 13, 14, 21,
4736 23, 29, 30, 31, 32, 39, 48, 57
4737 };
4738  
4739 static const char _VBZ_indicies[] = {
4740 0, 1, 3, 2, 4, 4, 1, 5,
4741 5, 5, 5, 5, 1, 6, 7, 7,
4742 7, 7, 7, 7, 1, 8, 1, 9,
4743 9, 9, 9, 9, 1, 8, 10, 1,
4744 11, 12, 13, 14, 4, 15, 1, 16,
4745 16, 16, 17, 16, 18, 19, 16, 1,
4746 20, 20, 20, 20, 20, 20, 22, 21,
4747 1, 10, 0
4748 };
4749  
4750 static const char _VBZ_trans_targs[] = {
4751 2, 0, 11, 12, 11, 5, 11, 11,
4752 11, 9, 11, 3, 4, 6, 13, 14,
4753 11, 7, 8, 11, 11, 10, 15
4754 };
4755  
4756 static const char _VBZ_trans_actions[] = {
4757 0, 0, 17, 17, 11, 0, 13, 15,
4758 9, 0, 3, 0, 0, 0, 11, 11,
4759 1, 0, 0, 7, 5, 0, 7
4760 };
4761  
4762 static const int VBZ_start = 1;
4763  
4764 0 void english_morpho_guesser::add_VBZ(const string& form, vector<tagged_lemma>& lemmas) const {
4765 0 const char* p = form.c_str(); int cs;
4766 0 char best = 'z'; unsigned remove = 0; const char* append = nullptr;
4767
4768 {
4769 0 cs = VBZ_start;
4770 }
4771  
4772 {
4773 int _klen;
4774 unsigned int _trans;
4775 const char *_acts;
4776 unsigned int _nacts;
4777 const char *_keys;
4778  
4779 0 ▶ if ( p == ( (form.c_str() + form.size())) )
Branch: 1 branch
BranchTrueFalseTotal
if ( p == ( (form.c_str() + form.size())) ) 0 0 0
4780 0 goto _test_eof;
4781 0 ▶ if ( cs == 0 )
Branch: 1 branch
BranchTrueFalseTotal
if ( cs == 0 ) 0 0 0
4782 0 goto _out;
4783 0 _resume:
4784 0 _keys = _VBZ_trans_keys + _VBZ_key_offsets[cs];
4785 0 _trans = _VBZ_index_offsets[cs];
4786  
4787 0 _klen = _VBZ_single_lengths[cs];
4788 0 ▶ if ( _klen > 0 ) {
Branch: 1 branch
BranchTrueFalseTotal
if ( _klen > 0 ) { 0 0 0
4789 0 const char *_lower = _keys;
4790 const char *_mid;
4791 0 const char *_upper = _keys + _klen - 1;
4792 while (1) {
4793 0 ▶ if ( _upper < _lower )
Branch: 1 branch
BranchTrueFalseTotal
if ( _upper < _lower ) 0 0 0
4794 0 break;
4795  
4796 0 _mid = _lower + ((_upper-_lower) >> 1);
4797 0 ▶ if ( ( form[form.size() - 1 - (p - form.c_str())]) < *_mid )
Branch: 1 branch
BranchTrueFalseTotal
if ( ( form[form.size() - 1 - (p - form.c_str())]) < *_mid ) 0 0 0
4798 0 _upper = _mid - 1;
4799 0 ▶ else if ( ( form[form.size() - 1 - (p - form.c_str())]) > *_mid )
Branch: 1 branch
BranchTrueFalseTotal
else if ( ( form[form.size() - 1 - (p - form.c_str())]) > *_mid ) 0 0 0
4800 0 _lower = _mid + 1;
4801 else {
4802 0 _trans += (unsigned int)(_mid - _keys);
4803 0 goto _match;
4804 }
4805 }
4806 0 _keys += _klen;
4807 0 _trans += _klen;
4808 }
4809  
4810 0 _klen = _VBZ_range_lengths[cs];
4811 0 ▶ if ( _klen > 0 ) {
Branch: 1 branch
BranchTrueFalseTotal
if ( _klen > 0 ) { 0 0 0
4812 0 const char *_lower = _keys;
4813 const char *_mid;
4814 0 const char *_upper = _keys + (_klen<<1) - 2;
4815 while (1) {
4816 0 ▶ if ( _upper < _lower )
Branch: 1 branch
BranchTrueFalseTotal
if ( _upper < _lower ) 0 0 0
4817 0 break;
4818  
4819 0 _mid = _lower + (((_upper-_lower) >> 1) & ~1);
4820 0 ▶ if ( ( form[form.size() - 1 - (p - form.c_str())]) < _mid[0] )
Branch: 1 branch
BranchTrueFalseTotal
if ( ( form[form.size() - 1 - (p - form.c_str())]) < _mid[0] ) 0 0 0
4821 0 _upper = _mid - 2;
4822 0 ▶ else if ( ( form[form.size() - 1 - (p - form.c_str())]) > _mid[1] )
Branch: 1 branch
BranchTrueFalseTotal
else if ( ( form[form.size() - 1 - (p - form.c_str())]) > _mid[1] ) 0 0 0
4823 0 _lower = _mid + 2;
4824 else {
4825 0 _trans += (unsigned int)((_mid - _keys)>>1);
4826 0 goto _match;
4827 }
4828 }
4829 0 _trans += _klen;
4830 }
4831  
4832 0 _match:
4833 0 _trans = _VBZ_indicies[_trans];
4834 0 cs = _VBZ_trans_targs[_trans];
4835  
4836 0 ▶ if ( _VBZ_trans_actions[_trans] == 0 )
Branch: 1 branch
BranchTrueFalseTotal
if ( _VBZ_trans_actions[_trans] == 0 ) 0 0 0
4837 0 goto _again;
4838  
4839 0 _acts = _VBZ_actions + _VBZ_trans_actions[_trans];
4840 0 _nacts = (unsigned int) *_acts++;
4841 0 ▶ while ( _nacts-- > 0 )
Branch: 1 branch
BranchTrueFalseTotal
while ( _nacts-- > 0 ) 0 0 0
4842 {
4843 0 switch ( *_acts++ )
4844 {
4845 0 case 0:
4846 0 ▶ { if (best > 'a') best = 'a', remove = 1, append = nullptr; }
Branch: 1 branch
BranchTrueFalseTotal
{ if (best > 'a') best = 'a', remove = 1, append = nullptr; } 0 0 0
4847 0 break;
4848 0 case 1:
4849 0 ▶ { if (best > 'b') best = 'b', remove = 2, append = nullptr; }
Branch: 1 branch
BranchTrueFalseTotal
{ if (best > 'b') best = 'b', remove = 2, append = nullptr; } 0 0 0
4850 0 break;
4851 0 case 2:
4852 0 ▶ { if (best > 'c') best = 'c', remove = 1, append = nullptr; }
Branch: 1 branch
BranchTrueFalseTotal
{ if (best > 'c') best = 'c', remove = 1, append = nullptr; } 0 0 0
4853 0 break;
4854 0 case 3:
4855 0 ▶ { if (best > 'd') best = 'd', remove = 2, append = nullptr; }
Branch: 1 branch
BranchTrueFalseTotal
{ if (best > 'd') best = 'd', remove = 2, append = nullptr; } 0 0 0
4856 0 break;
4857 0 case 4:
4858 0 ▶ { if (best > 'e') best = 'e', remove = 1, append = nullptr; }
Branch: 1 branch
BranchTrueFalseTotal
{ if (best > 'e') best = 'e', remove = 1, append = nullptr; } 0 0 0
4859 0 break;
4860 0 case 5:
4861 0 ▶ { if (best > 'f') best = 'f', remove = 2, append = nullptr; }
Branch: 1 branch
BranchTrueFalseTotal
{ if (best > 'f') best = 'f', remove = 2, append = nullptr; } 0 0 0
4862 0 break;
4863 0 case 6:
4864 0 ▶ { if (best > 'g') best = 'g', remove = 3, append = "y"; }
Branch: 1 branch
BranchTrueFalseTotal
{ if (best > 'g') best = 'g', remove = 3, append = "y"; } 0 0 0
4865 0 break;
4866 0 case 7:
4867 0 ▶ { if (best > 'h') best = 'h', remove = 2, append = nullptr; }
Branch: 1 branch
BranchTrueFalseTotal
{ if (best > 'h') best = 'h', remove = 2, append = nullptr; } 0 0 0
4868 0 break;
4869 0 case 8:
4870 0 ▶ { if (best > 'i') best = 'i', remove = 1, append = nullptr; }
Branch: 1 branch
BranchTrueFalseTotal
{ if (best > 'i') best = 'i', remove = 1, append = nullptr; } 0 0 0
4871 0 break;
4872 }
4873 }
4874  
4875 0 _again:
4876 0 ▶ if ( cs == 0 )
Branch: 1 branch
BranchTrueFalseTotal
if ( cs == 0 ) 0 0 0
4877 0 goto _out;
4878 0 ▶ if ( ++p != ( (form.c_str() + form.size())) )
Branch: 1 branch
BranchTrueFalseTotal
if ( ++p != ( (form.c_str() + form.size())) ) 0 0 0
4879 0 goto _resume;
4880 0 _test_eof: {}
4881 0 _out: {}
4882 }
4883  
4884 0 ▶ add(VBZ, form.substr(0, form.size() - remove).append(append ? append : ""), lemmas);
Branch: 4 branches
BranchTrueFalseTotal
add(VBZ, form.substr(0, form.size() - remove).append(append ? append : ""), lemmas); 0 0 0
add(VBZ, form.substr(0, form.size() - remove).append(append ? append : ""), lemmas); 0 0 0
add(VBZ, form.substr(0, form.size() - remove).append(append ? append : ""), lemmas); 0 0 0
add(VBZ, form.substr(0, form.size() - remove).append(append ? append : ""), lemmas); 0 0 0
4885 0 }
4886  
4887 static const char _JJR_RBR_actions[] = {
4888 0, 1, 0, 1, 1, 1, 3, 1,
4889 4, 1, 5, 2, 1, 4, 2, 2,
4890 5, 2, 4, 5
4891 };
4892  
4893 static const unsigned char _JJR_RBR_key_offsets[] = {
4894 0, 0, 1, 2, 26, 26, 32, 37,
4895 50, 56, 62, 73, 79, 85, 91, 102,
4896 103, 109, 115, 117, 123, 129, 135, 146,
4897 152, 163, 169, 175, 181
4898 };
4899  
4900 static const char _JJR_RBR_trans_keys[] = {
4901 114, 101, 98, 99, 100, 101, 102, 103,
4902 104, 105, 106, 107, 108, 109, 110, 112,
4903 113, 114, 115, 116, 117, 118, 119, 120,
4904 121, 122, 97, 98, 101, 105, 111, 117,
4905 97, 101, 105, 111, 117, 98, 99, 100,
4906 105, 111, 117, 122, 97, 101, 102, 109,
4907 112, 120, 97, 100, 101, 105, 111, 117,
4908 97, 101, 102, 105, 111, 117, 97, 101,
4909 103, 105, 111, 117, 122, 98, 109, 112,
4910 120, 97, 101, 104, 105, 111, 117, 97,
4911 101, 105, 106, 111, 117, 97, 101, 105,
4912 107, 111, 117, 97, 101, 105, 108, 111,
4913 117, 122, 98, 109, 112, 120, 101, 97,
4914 101, 105, 109, 111, 117, 97, 101, 105,
4915 110, 111, 117, 97, 122, 97, 101, 105,
4916 111, 112, 117, 97, 101, 105, 111, 113,
4917 117, 97, 101, 105, 111, 114, 117, 97,
4918 101, 105, 111, 115, 117, 122, 98, 109,
4919 112, 120, 97, 101, 105, 111, 116, 117,
4920 97, 101, 105, 111, 117, 118, 122, 98,
4921 109, 112, 120, 97, 101, 105, 111, 117,
4922 119, 97, 101, 105, 111, 117, 120, 97,
4923 101, 105, 111, 117, 121, 97, 101, 105,
4924 111, 117, 122, 0
4925 };
4926  
4927 static const char _JJR_RBR_single_lengths[] = {
4928 0, 1, 1, 24, 0, 6, 5, 7,
4929 6, 6, 7, 6, 6, 6, 7, 1,
4930 6, 6, 0, 6, 6, 6, 7, 6,
4931 7, 6, 6, 6, 6
4932 };
4933  
4934 static const char _JJR_RBR_range_lengths[] = {
4935 0, 0, 0, 0, 0, 0, 0, 3,
4936 0, 0, 2, 0, 0, 0, 2, 0,
4937 0, 0, 1, 0, 0, 0, 2, 0,
4938 2, 0, 0, 0, 0
4939 };
4940  
4941 static const unsigned char _JJR_RBR_index_offsets[] = {
4942 0, 0, 2, 4, 29, 30, 37, 43,
4943 54, 61, 68, 78, 85, 92, 99, 109,
4944 111, 118, 125, 127, 134, 141, 148, 158,
4945 165, 175, 182, 189, 196
4946 };
4947  
4948 static const char _JJR_RBR_indicies[] = {
4949 0, 1, 2, 1, 4, 5, 6, 7,
4950 8, 9, 10, 11, 12, 13, 14, 15,
4951 16, 17, 18, 19, 20, 21, 7, 22,
4952 23, 24, 25, 26, 3, 1, 27, 28,
4953 27, 27, 27, 27, 1, 29, 29, 29,
4954 29, 29, 1, 30, 31, 30, 27, 27,
4955 27, 30, 27, 30, 30, 1, 27, 28,
4956 27, 27, 27, 27, 1, 27, 27, 28,
4957 27, 27, 27, 1, 27, 27, 31, 27,
4958 27, 27, 30, 30, 30, 1, 27, 27,
4959 28, 27, 27, 27, 1, 27, 27, 27,
4960 28, 27, 27, 1, 27, 27, 27, 28,
4961 27, 27, 1, 27, 27, 27, 32, 27,
4962 27, 30, 30, 30, 1, 1, 33, 27,
4963 27, 27, 28, 27, 27, 1, 34, 34,
4964 34, 28, 34, 34, 1, 29, 1, 34,
4965 34, 34, 34, 28, 34, 1, 27, 27,
4966 27, 27, 28, 27, 1, 27, 27, 27,
4967 27, 28, 27, 1, 27, 27, 27, 27,
4968 31, 27, 30, 30, 30, 1, 27, 27,
4969 27, 27, 28, 27, 1, 27, 27, 27,
4970 27, 27, 31, 30, 30, 30, 1, 34,
4971 34, 34, 34, 34, 28, 1, 34, 34,
4972 34, 34, 34, 28, 1, 27, 27, 27,
4973 27, 27, 28, 1, 27, 27, 27, 27,
4974 27, 28, 1, 0
4975 };
4976  
4977 static const char _JJR_RBR_trans_targs[] = {
4978 2, 0, 3, 4, 5, 7, 8, 4,
4979 9, 10, 11, 4, 12, 13, 14, 16,
4980 17, 19, 20, 21, 22, 23, 24, 25,
4981 26, 27, 28, 6, 4, 4, 4, 4,
4982 15, 4, 18
4983 };
4984  
4985 static const char _JJR_RBR_trans_actions[] = {
4986 0, 0, 0, 9, 9, 9, 9, 17,
4987 9, 9, 9, 14, 9, 9, 9, 9,
4988 9, 9, 9, 9, 9, 9, 9, 9,
4989 9, 9, 9, 7, 3, 5, 7, 11,
4990 11, 1, 7
4991 };
4992  
4993 static const int JJR_RBR_start = 1;
4994  
4995 0 void english_morpho_guesser::add_JJR_RBR(const string& form, unsigned negation_len, vector<tagged_lemma>& lemmas) const {
4996 0 const char* p = form.c_str() + negation_len; int cs;
4997 0 char best = 'z'; unsigned remove = 0; const char* append = nullptr;
4998
4999 {
5000 0 cs = JJR_RBR_start;
5001 }
5002  
5003 {
5004 int _klen;
5005 unsigned int _trans;
5006 const char *_acts;
5007 unsigned int _nacts;
5008 const char *_keys;
5009  
5010 0 ▶ if ( p == ( (form.c_str() + form.size())) )
Branch: 1 branch
BranchTrueFalseTotal
if ( p == ( (form.c_str() + form.size())) ) 0 0 0
5011 0 goto _test_eof;
5012 0 ▶ if ( cs == 0 )
Branch: 1 branch
BranchTrueFalseTotal
if ( cs == 0 ) 0 0 0
5013 0 goto _out;
5014 0 _resume:
5015 0 _keys = _JJR_RBR_trans_keys + _JJR_RBR_key_offsets[cs];
5016 0 _trans = _JJR_RBR_index_offsets[cs];
5017  
5018 0 _klen = _JJR_RBR_single_lengths[cs];
5019 0 ▶ if ( _klen > 0 ) {
Branch: 1 branch
BranchTrueFalseTotal
if ( _klen > 0 ) { 0 0 0
5020 0 const char *_lower = _keys;
5021 const char *_mid;
5022 0 const char *_upper = _keys + _klen - 1;
5023 while (1) {
5024 0 ▶ if ( _upper < _lower )
Branch: 1 branch
BranchTrueFalseTotal
if ( _upper < _lower ) 0 0 0
5025 0 break;
5026  
5027 0 _mid = _lower + ((_upper-_lower) >> 1);
5028 0 ▶ if ( ( form[form.size() - 1 - (p - form.c_str() - negation_len)]) < *_mid )
Branch: 1 branch
BranchTrueFalseTotal
if ( ( form[form.size() - 1 - (p - form.c_str() - negation_len)]) < *_mid ) 0 0 0
5029 0 _upper = _mid - 1;
5030 0 ▶ else if ( ( form[form.size() - 1 - (p - form.c_str() - negation_len)]) > *_mid )
Branch: 1 branch
BranchTrueFalseTotal
else if ( ( form[form.size() - 1 - (p - form.c_str() - negation_len)]) > *_mid ) 0 0 0
5031 0 _lower = _mid + 1;
5032 else {
5033 0 _trans += (unsigned int)(_mid - _keys);
5034 0 goto _match;
5035 }
5036 }
5037 0 _keys += _klen;
5038 0 _trans += _klen;
5039 }
5040  
5041 0 _klen = _JJR_RBR_range_lengths[cs];
5042 0 ▶ if ( _klen > 0 ) {
Branch: 1 branch
BranchTrueFalseTotal
if ( _klen > 0 ) { 0 0 0
5043 0 const char *_lower = _keys;
5044 const char *_mid;
5045 0 const char *_upper = _keys + (_klen<<1) - 2;
5046 while (1) {
5047 0 ▶ if ( _upper < _lower )
Branch: 1 branch
BranchTrueFalseTotal
if ( _upper < _lower ) 0 0 0
5048 0 break;
5049  
5050 0 _mid = _lower + (((_upper-_lower) >> 1) & ~1);
5051 0 ▶ if ( ( form[form.size() - 1 - (p - form.c_str() - negation_len)]) < _mid[0] )
Branch: 1 branch
BranchTrueFalseTotal
if ( ( form[form.size() - 1 - (p - form.c_str() - negation_len)]) < _mid[0] ) 0 0 0
5052 0 _upper = _mid - 2;
5053 0 ▶ else if ( ( form[form.size() - 1 - (p - form.c_str() - negation_len)]) > _mid[1] )
Branch: 1 branch
BranchTrueFalseTotal
else if ( ( form[form.size() - 1 - (p - form.c_str() - negation_len)]) > _mid[1] ) 0 0 0
5054 0 _lower = _mid + 2;
5055 else {
5056 0 _trans += (unsigned int)((_mid - _keys)>>1);
5057 0 goto _match;
5058 }
5059 }
5060 0 _trans += _klen;
5061 }
5062  
5063 0 _match:
5064 0 _trans = _JJR_RBR_indicies[_trans];
5065 0 cs = _JJR_RBR_trans_targs[_trans];
5066  
5067 0 ▶ if ( _JJR_RBR_trans_actions[_trans] == 0 )
Branch: 1 branch
BranchTrueFalseTotal
if ( _JJR_RBR_trans_actions[_trans] == 0 ) 0 0 0
5068 0 goto _again;
5069  
5070 0 _acts = _JJR_RBR_actions + _JJR_RBR_trans_actions[_trans];
5071 0 _nacts = (unsigned int) *_acts++;
5072 0 ▶ while ( _nacts-- > 0 )
Branch: 1 branch
BranchTrueFalseTotal
while ( _nacts-- > 0 ) 0 0 0
5073 {
5074 0 switch ( *_acts++ )
5075 {
5076 0 case 0:
5077 0 ▶ { if (best > 'a') best = 'a', remove = 2, append = nullptr; }
Branch: 1 branch
BranchTrueFalseTotal
{ if (best > 'a') best = 'a', remove = 2, append = nullptr; } 0 0 0
5078 0 break;
5079 0 case 1:
5080 0 ▶ { if (best > 'b') best = 'b', remove = 3, append = nullptr; }
Branch: 1 branch
BranchTrueFalseTotal
{ if (best > 'b') best = 'b', remove = 3, append = nullptr; } 0 0 0
5081 0 break;
5082 0 case 2:
5083 0 ▶ { if (best > 'c') best = 'c', remove = 3, append = "y"; }
Branch: 1 branch
BranchTrueFalseTotal
{ if (best > 'c') best = 'c', remove = 3, append = "y"; } 0 0 0
5084 0 break;
5085 0 case 3:
5086 0 ▶ { if (best > 'd') best = 'd', remove = 2, append = nullptr; }
Branch: 1 branch
BranchTrueFalseTotal
{ if (best > 'd') best = 'd', remove = 2, append = nullptr; } 0 0 0
5087 0 break;
5088 0 case 4:
5089 0 ▶ { if (best > 'e') best = 'e', remove = 1, append = nullptr; }
Branch: 1 branch
BranchTrueFalseTotal
{ if (best > 'e') best = 'e', remove = 1, append = nullptr; } 0 0 0
5090 0 break;
5091 0 case 5:
5092 0 ▶ { if (best > 'f') best = 'f', remove = 2, append = nullptr; }
Branch: 1 branch
BranchTrueFalseTotal
{ if (best > 'f') best = 'f', remove = 2, append = nullptr; } 0 0 0
5093 0 break;
5094 }
5095 }
5096  
5097 0 _again:
5098 0 ▶ if ( cs == 0 )
Branch: 1 branch
BranchTrueFalseTotal
if ( cs == 0 ) 0 0 0
5099 0 goto _out;
5100 0 ▶ if ( ++p != ( (form.c_str() + form.size())) )
Branch: 1 branch
BranchTrueFalseTotal
if ( ++p != ( (form.c_str() + form.size())) ) 0 0 0
5101 0 goto _resume;
5102 0 _test_eof: {}
5103 0 _out: {}
5104 }
5105  
5106 0 ▶ add(JJR, RBR, form.substr(0, form.size() - remove).append(append ? append : ""), negation_len, lemmas);
Branch: 4 branches
BranchTrueFalseTotal
add(JJR, RBR, form.substr(0, form.size() - remove).append(append ? append : ""), negation_len, lemmas); 0 0 0
add(JJR, RBR, form.substr(0, form.size() - remove).append(append ? append : ""), negation_len, lemmas); 0 0 0
add(JJR, RBR, form.substr(0, form.size() - remove).append(append ? append : ""), negation_len, lemmas); 0 0 0
add(JJR, RBR, form.substr(0, form.size() - remove).append(append ? append : ""), negation_len, lemmas); 0 0 0
5107 0 }
5108  
5109 static const char _JJS_RBS_actions[] = {
5110 0, 1, 1, 1, 2, 1, 4, 1,
5111 5, 2, 0, 5, 2, 1, 4, 2,
5112 3, 5
5113 };
5114  
5115 static const unsigned char _JJS_RBS_key_offsets[] = {
5116 0, 0, 1, 2, 3, 25, 25, 25,
5117 31, 44, 50, 56, 67, 73, 79, 85,
5118 96, 102, 108, 114, 120, 126, 137, 143,
5119 154, 160, 166, 172, 178, 178, 183, 183,
5120 183, 184
5121 };
5122  
5123 static const char _JJS_RBS_trans_keys[] = {
5124 116, 115, 101, 98, 99, 100, 102, 103,
5125 104, 105, 106, 107, 108, 109, 110, 112,
5126 113, 114, 115, 116, 118, 119, 120, 121,
5127 122, 97, 98, 101, 105, 111, 117, 98,
5128 99, 100, 105, 111, 117, 122, 97, 101,
5129 102, 109, 112, 120, 97, 100, 101, 105,
5130 111, 117, 97, 101, 102, 105, 111, 117,
5131 97, 101, 103, 105, 111, 117, 122, 98,
5132 109, 112, 120, 97, 101, 104, 105, 111,
5133 117, 97, 101, 105, 106, 111, 117, 97,
5134 101, 105, 107, 111, 117, 97, 101, 105,
5135 108, 111, 117, 122, 98, 109, 112, 120,
5136 97, 101, 105, 109, 111, 117, 97, 101,
5137 105, 110, 111, 117, 97, 101, 105, 111,
5138 112, 117, 97, 101, 105, 111, 113, 117,
5139 97, 101, 105, 111, 114, 117, 97, 101,
5140 105, 111, 115, 117, 122, 98, 109, 112,
5141 120, 97, 101, 105, 111, 116, 117, 97,
5142 101, 105, 111, 117, 118, 122, 98, 109,
5143 112, 120, 97, 101, 105, 111, 117, 119,
5144 97, 101, 105, 111, 117, 120, 97, 101,
5145 105, 111, 117, 121, 97, 101, 105, 111,
5146 117, 122, 97, 101, 105, 111, 117, 101,
5147 97, 122, 0
5148 };
5149  
5150 static const char _JJS_RBS_single_lengths[] = {
5151 0, 1, 1, 1, 22, 0, 0, 6,
5152 7, 6, 6, 7, 6, 6, 6, 7,
5153 6, 6, 6, 6, 6, 7, 6, 7,
5154 6, 6, 6, 6, 0, 5, 0, 0,
5155 1, 0
5156 };
5157  
5158 static const char _JJS_RBS_range_lengths[] = {
5159 0, 0, 0, 0, 0, 0, 0, 0,
5160 3, 0, 0, 2, 0, 0, 0, 2,
5161 0, 0, 0, 0, 0, 2, 0, 2,
5162 0, 0, 0, 0, 0, 0, 0, 0,
5163 0, 1
5164 };
5165  
5166 static const unsigned char _JJS_RBS_index_offsets[] = {
5167 0, 0, 2, 4, 6, 29, 30, 31,
5168 38, 49, 56, 63, 73, 80, 87, 94,
5169 104, 111, 118, 125, 132, 139, 149, 156,
5170 166, 173, 180, 187, 194, 195, 201, 202,
5171 203, 205
5172 };
5173  
5174 static const char _JJS_RBS_indicies[] = {
5175 0, 1, 2, 1, 3, 1, 5, 6,
5176 7, 8, 9, 10, 11, 12, 13, 14,
5177 15, 16, 17, 18, 19, 20, 21, 22,
5178 23, 24, 25, 26, 4, 27, 28, 29,
5179 30, 29, 29, 29, 29, 27, 31, 32,
5180 31, 29, 29, 29, 31, 29, 31, 31,
5181 27, 29, 30, 29, 29, 29, 29, 27,
5182 29, 29, 30, 29, 29, 29, 27, 29,
5183 29, 32, 29, 29, 29, 31, 31, 31,
5184 27, 29, 29, 30, 29, 29, 29, 27,
5185 29, 29, 29, 30, 29, 29, 27, 29,
5186 29, 29, 30, 29, 29, 27, 29, 29,
5187 29, 33, 29, 29, 31, 31, 31, 27,
5188 29, 29, 29, 30, 29, 29, 27, 34,
5189 34, 34, 30, 34, 34, 27, 34, 34,
5190 34, 34, 30, 34, 27, 29, 29, 29,
5191 29, 30, 29, 27, 29, 29, 29, 29,
5192 30, 29, 27, 29, 29, 29, 29, 32,
5193 29, 31, 31, 31, 27, 29, 29, 29,
5194 29, 30, 29, 27, 29, 29, 29, 29,
5195 29, 32, 31, 31, 31, 27, 34, 34,
5196 34, 34, 34, 30, 27, 34, 34, 34,
5197 34, 34, 30, 27, 29, 29, 29, 29,
5198 29, 30, 27, 29, 29, 29, 29, 29,
5199 30, 27, 1, 35, 35, 35, 35, 35,
5200 28, 28, 27, 28, 36, 35, 28, 0
5201 };
5202  
5203 static const char _JJS_RBS_trans_targs[] = {
5204 2, 0, 3, 4, 5, 7, 8, 9,
5205 10, 11, 12, 31, 13, 14, 15, 16,
5206 17, 18, 19, 20, 21, 22, 23, 24,
5207 25, 26, 27, 6, 28, 29, 30, 30,
5208 30, 32, 33, 28, 28
5209 };
5210  
5211 static const char _JJS_RBS_trans_actions[] = {
5212 0, 0, 0, 0, 0, 0, 0, 0,
5213 0, 0, 0, 3, 0, 0, 0, 0,
5214 0, 0, 0, 0, 0, 0, 0, 0,
5215 0, 0, 0, 0, 7, 5, 1, 5,
5216 12, 12, 5, 15, 9
5217 };
5218  
5219 static const int JJS_RBS_start = 1;
5220  
5221 0 void english_morpho_guesser::add_JJS_RBS(const string& form, unsigned negation_len, vector<tagged_lemma>& lemmas) const {
5222 0 const char* p = form.c_str() + negation_len; int cs;
5223 0 char best = 'z'; unsigned remove = 0; const char* append = nullptr;
5224
5225 {
5226 0 cs = JJS_RBS_start;
5227 }
5228  
5229 {
5230 int _klen;
5231 unsigned int _trans;
5232 const char *_acts;
5233 unsigned int _nacts;
5234 const char *_keys;
5235  
5236 0 ▶ if ( p == ( (form.c_str() + form.size())) )
Branch: 1 branch
BranchTrueFalseTotal
if ( p == ( (form.c_str() + form.size())) ) 0 0 0
5237 0 goto _test_eof;
5238 0 ▶ if ( cs == 0 )
Branch: 1 branch
BranchTrueFalseTotal
if ( cs == 0 ) 0 0 0
5239 0 goto _out;
5240 0 _resume:
5241 0 _keys = _JJS_RBS_trans_keys + _JJS_RBS_key_offsets[cs];
5242 0 _trans = _JJS_RBS_index_offsets[cs];
5243  
5244 0 _klen = _JJS_RBS_single_lengths[cs];
5245 0 ▶ if ( _klen > 0 ) {
Branch: 1 branch
BranchTrueFalseTotal
if ( _klen > 0 ) { 0 0 0
5246 0 const char *_lower = _keys;
5247 const char *_mid;
5248 0 const char *_upper = _keys + _klen - 1;
5249 while (1) {
5250 0 ▶ if ( _upper < _lower )
Branch: 1 branch
BranchTrueFalseTotal
if ( _upper < _lower ) 0 0 0
5251 0 break;
5252  
5253 0 _mid = _lower + ((_upper-_lower) >> 1);
5254 0 ▶ if ( ( form[form.size() - 1 - (p - form.c_str() - negation_len)]) < *_mid )
Branch: 1 branch
BranchTrueFalseTotal
if ( ( form[form.size() - 1 - (p - form.c_str() - negation_len)]) < *_mid ) 0 0 0
5255 0 _upper = _mid - 1;
5256 0 ▶ else if ( ( form[form.size() - 1 - (p - form.c_str() - negation_len)]) > *_mid )
Branch: 1 branch
BranchTrueFalseTotal
else if ( ( form[form.size() - 1 - (p - form.c_str() - negation_len)]) > *_mid ) 0 0 0
5257 0 _lower = _mid + 1;
5258 else {
5259 0 _trans += (unsigned int)(_mid - _keys);
5260 0 goto _match;
5261 }
5262 }
5263 0 _keys += _klen;
5264 0 _trans += _klen;
5265 }
5266  
5267 0 _klen = _JJS_RBS_range_lengths[cs];
5268 0 ▶ if ( _klen > 0 ) {
Branch: 1 branch
BranchTrueFalseTotal
if ( _klen > 0 ) { 0 0 0
5269 0 const char *_lower = _keys;
5270 const char *_mid;
5271 0 const char *_upper = _keys + (_klen<<1) - 2;
5272 while (1) {
5273 0 ▶ if ( _upper < _lower )
Branch: 1 branch
BranchTrueFalseTotal
if ( _upper < _lower ) 0 0 0
5274 0 break;
5275  
5276 0 _mid = _lower + (((_upper-_lower) >> 1) & ~1);
5277 0 ▶ if ( ( form[form.size() - 1 - (p - form.c_str() - negation_len)]) < _mid[0] )
Branch: 1 branch
BranchTrueFalseTotal
if ( ( form[form.size() - 1 - (p - form.c_str() - negation_len)]) < _mid[0] ) 0 0 0
5278 0 _upper = _mid - 2;
5279 0 ▶ else if ( ( form[form.size() - 1 - (p - form.c_str() - negation_len)]) > _mid[1] )
Branch: 1 branch
BranchTrueFalseTotal
else if ( ( form[form.size() - 1 - (p - form.c_str() - negation_len)]) > _mid[1] ) 0 0 0
5280 0 _lower = _mid + 2;
5281 else {
5282 0 _trans += (unsigned int)((_mid - _keys)>>1);
5283 0 goto _match;
5284 }
5285 }
5286 0 _trans += _klen;
5287 }
5288  
5289 0 _match:
5290 0 _trans = _JJS_RBS_indicies[_trans];
5291 0 cs = _JJS_RBS_trans_targs[_trans];
5292  
5293 0 ▶ if ( _JJS_RBS_trans_actions[_trans] == 0 )
Branch: 1 branch
BranchTrueFalseTotal
if ( _JJS_RBS_trans_actions[_trans] == 0 ) 0 0 0
5294 0 goto _again;
5295  
5296 0 _acts = _JJS_RBS_actions + _JJS_RBS_trans_actions[_trans];
5297 0 _nacts = (unsigned int) *_acts++;
5298 0 ▶ while ( _nacts-- > 0 )
Branch: 1 branch
BranchTrueFalseTotal
while ( _nacts-- > 0 ) 0 0 0
5299 {
5300 0 switch ( *_acts++ )
5301 {
5302 0 case 0:
5303 0 ▶ { if (best > 'a') best = 'a', remove = 3, append = nullptr; }
Branch: 1 branch
BranchTrueFalseTotal
{ if (best > 'a') best = 'a', remove = 3, append = nullptr; } 0 0 0
5304 0 break;
5305 0 case 1:
5306 0 ▶ { if (best > 'b') best = 'b', remove = 4, append = nullptr; }
Branch: 1 branch
BranchTrueFalseTotal
{ if (best > 'b') best = 'b', remove = 4, append = nullptr; } 0 0 0
5307 0 break;
5308 0 case 2:
5309 0 ▶ { if (best > 'c') best = 'c', remove = 4, append = "y"; }
Branch: 1 branch
BranchTrueFalseTotal
{ if (best > 'c') best = 'c', remove = 4, append = "y"; } 0 0 0
5310 0 break;
5311 0 case 3:
5312 0 ▶ { if (best > 'd') best = 'd', remove = 3, append = nullptr; }
Branch: 1 branch
BranchTrueFalseTotal
{ if (best > 'd') best = 'd', remove = 3, append = nullptr; } 0 0 0
5313 0 break;
5314 0 case 4:
5315 0 ▶ { if (best > 'e') best = 'e', remove = 2, append = nullptr; }
Branch: 1 branch
BranchTrueFalseTotal
{ if (best > 'e') best = 'e', remove = 2, append = nullptr; } 0 0 0
5316 0 break;
5317 0 case 5:
5318 0 ▶ { if (best > 'f') best = 'f', remove = 3, append = nullptr; }
Branch: 1 branch
BranchTrueFalseTotal
{ if (best > 'f') best = 'f', remove = 3, append = nullptr; } 0 0 0
5319 0 break;
5320 }
5321 }
5322  
5323 0 _again:
5324 0 ▶ if ( cs == 0 )
Branch: 1 branch
BranchTrueFalseTotal
if ( cs == 0 ) 0 0 0
5325 0 goto _out;
5326 0 ▶ if ( ++p != ( (form.c_str() + form.size())) )
Branch: 1 branch
BranchTrueFalseTotal
if ( ++p != ( (form.c_str() + form.size())) ) 0 0 0
5327 0 goto _resume;
5328 0 _test_eof: {}
5329 0 _out: {}
5330 }
5331  
5332 0 ▶ add(JJS, RBS, form.substr(0, form.size() - remove).append(append ? append : ""), negation_len, lemmas);
Branch: 4 branches
BranchTrueFalseTotal
add(JJS, RBS, form.substr(0, form.size() - remove).append(append ? append : ""), negation_len, lemmas); 0 0 0
add(JJS, RBS, form.substr(0, form.size() - remove).append(append ? append : ""), negation_len, lemmas); 0 0 0
add(JJS, RBS, form.substr(0, form.size() - remove).append(append ? append : ""), negation_len, lemmas); 0 0 0
add(JJS, RBS, form.substr(0, form.size() - remove).append(append ? append : ""), negation_len, lemmas); 0 0 0
5333 0 }
5334  
5335 /////////
5336 // File: morpho/external_morpho.h
5337 /////////
5338  
5339 // This file is part of MorphoDiTa <http://github.com/ufal/morphodita/>.
5340 //
5341 // Copyright 2015 Institute of Formal and Applied Linguistics, Faculty of
5342 // Mathematics and Physics, Charles University in Prague, Czech Republic.
5343 //
5344 // This Source Code Form is subject to the terms of the Mozilla Public
5345 // License, v. 2.0. If a copy of the MPL was not distributed with this
5346 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
5347  
5348 class external_morpho : public morpho {
5349 public:
5350 0 external_morpho(unsigned version) : version(version) {}
5351  
5352 virtual int analyze(string_piece form, morpho::guesser_mode guesser, vector<tagged_lemma>& lemmas) const override;
5353 virtual int generate(string_piece lemma, const char* tag_wildcard, guesser_mode guesser, vector<tagged_lemma_forms>& forms) const override;
5354 virtual int raw_lemma_len(string_piece lemma) const override;
5355 virtual int lemma_id_len(string_piece lemma) const override;
5356 virtual int raw_form_len(string_piece form) const override;
5357 virtual tokenizer* new_tokenizer() const override;
5358  
5359 bool load(istream& is);
5360  
5361 private:
5362 unsigned version;
5363  
5364 string unknown_tag;
5365 };
5366  
5367 /////////
5368 // File: tokenizer/generic_tokenizer.h
5369 /////////
5370  
5371 // This file is part of MorphoDiTa <http://github.com/ufal/morphodita/>.
5372 //
5373 // Copyright 2015 Institute of Formal and Applied Linguistics, Faculty of
5374 // Mathematics and Physics, Charles University in Prague, Czech Republic.
5375 //
5376 // This Source Code Form is subject to the terms of the Mozilla Public
5377 // License, v. 2.0. If a copy of the MPL was not distributed with this
5378 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
5379  
5380 class generic_tokenizer : public ragel_tokenizer {
5381 public:
5382 enum { LATEST = 2 };
5383 generic_tokenizer(unsigned version);
5384  
5385 virtual bool next_sentence(vector<token_range>& tokens) override;
5386 };
5387  
5388 /////////
5389 // File: morpho/external_morpho.cpp
5390 /////////
5391  
5392 // This file is part of MorphoDiTa <http://github.com/ufal/morphodita/>.
5393 //
5394 // Copyright 2015 Institute of Formal and Applied Linguistics, Faculty of
5395 // Mathematics and Physics, Charles University in Prague, Czech Republic.
5396 //
5397 // This Source Code Form is subject to the terms of the Mozilla Public
5398 // License, v. 2.0. If a copy of the MPL was not distributed with this
5399 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
5400  
5401 0 bool external_morpho::load(istream& is) {
5402 0 binary_decoder data;
5403 0 ▶ if (!compressor::load(is, data)) return false;
Branch: 2 branches
BranchTrueFalseTotal
if (!compressor::load(is, data)) return false; 0 0 0
if (!compressor::load(is, data)) return false; 0 0 0
5404  
5405 try {
5406 // Load unknown_tag
5407 0 ▶ unsigned length = data.next_1B();
Branch: 1 branch
BranchTrueFalseTotal
unsigned length = data.next_1B(); 0 0 0
5408 0 ▶ unknown_tag.assign(data.next<char>(length), length);
Branch: 3 branches
BranchTrueFalseTotal
unknown_tag.assign(data.next<char>(length), length); 0 0 0
unknown_tag.assign(data.next<char>(length), length); 0 0 0
unknown_tag.assign(data.next<char>(length), length); 0 0 0
5409 } catch (binary_decoder_error&) {
5410 return false;
5411 }
5412  
5413 0 return data.is_end();
5414 0 }
5415  
5416 0 int external_morpho::analyze(string_piece form, guesser_mode /*guesser*/, vector<tagged_lemma>& lemmas) const {
5417 0 lemmas.clear();
5418  
5419 0 ▶ if (form.len) {
Branch: 1 branch
BranchTrueFalseTotal
if (form.len) { 0 0 0
5420 // Start by skipping the first form
5421 0 string_piece lemmatags = form;
5422 0 ▶ while (lemmatags.len && *lemmatags.str != ' ') lemmatags.len--, lemmatags.str++;
Branch: 2 branches
BranchTrueFalseTotal
while (lemmatags.len && *lemmatags.str != ' ') lemmatags.len--, lemmatags.str++; 0 0 0
while (lemmatags.len && *lemmatags.str != ' ') lemmatags.len--, lemmatags.str++; 0 0 0
5423 0 ▶ if (lemmatags.len) lemmatags.len--, lemmatags.str++;
Branch: 1 branch
BranchTrueFalseTotal
if (lemmatags.len) lemmatags.len--, lemmatags.str++; 0 0 0
5424  
5425 // Split lemmatags using ' ' into lemma-tag pairs.
5426 0 ▶ while (lemmatags.len) {
Branch: 1 branch
BranchTrueFalseTotal
while (lemmatags.len) { 0 0 0
5427 0 auto lemma_start = lemmatags.str;
5428 0 ▶ while (lemmatags.len && *lemmatags.str != ' ') lemmatags.len--, lemmatags.str++;
Branch: 2 branches
BranchTrueFalseTotal
while (lemmatags.len && *lemmatags.str != ' ') lemmatags.len--, lemmatags.str++; 0 0 0
while (lemmatags.len && *lemmatags.str != ' ') lemmatags.len--, lemmatags.str++; 0 0 0
5429 0 ▶ if (!lemmatags.len) break;
Branch: 1 branch
BranchTrueFalseTotal
if (!lemmatags.len) break; 0 0 0
5430 0 auto lemma_len = lemmatags.str - lemma_start;
5431 0 lemmatags.len--, lemmatags.str++;
5432  
5433 0 auto tag_start = lemmatags.str;
5434 0 ▶ while (lemmatags.len && *lemmatags.str != ' ') lemmatags.len--, lemmatags.str++;
Branch: 2 branches
BranchTrueFalseTotal
while (lemmatags.len && *lemmatags.str != ' ') lemmatags.len--, lemmatags.str++; 0 0 0
while (lemmatags.len && *lemmatags.str != ' ') lemmatags.len--, lemmatags.str++; 0 0 0
5435 0 auto tag_len = lemmatags.str - tag_start;
5436 0 ▶ if (lemmatags.len) lemmatags.len--, lemmatags.str++;
Branch: 1 branch
BranchTrueFalseTotal
if (lemmatags.len) lemmatags.len--, lemmatags.str++; 0 0 0
5437  
5438 0 ▶ lemmas.emplace_back(string(lemma_start, lemma_len), string(tag_start, tag_len));
Branch: 3 branches
BranchTrueFalseTotal
lemmas.emplace_back(string(lemma_start, lemma_len), string(tag_start, tag_len)); 0 0 0
lemmas.emplace_back(string(lemma_start, lemma_len), string(tag_start, tag_len)); 0 0 0
lemmas.emplace_back(string(lemma_start, lemma_len), string(tag_start, tag_len)); 0 0 0
5439 }
5440  
5441 0 ▶ if (!lemmas.empty()) return NO_GUESSER;
Branch: 1 branch
BranchTrueFalseTotal
if (!lemmas.empty()) return NO_GUESSER; 0 0 0
5442 }
5443  
5444 0 ▶ lemmas.emplace_back(string(form.str, form.len), unknown_tag);
Branch: 2 branches
BranchTrueFalseTotal
lemmas.emplace_back(string(form.str, form.len), unknown_tag); 0 0 0
lemmas.emplace_back(string(form.str, form.len), unknown_tag); 0 0 0
5445 0 return -1;
5446 }
5447  
5448 0 int external_morpho::generate(string_piece lemma, const char* tag_wildcard, morpho::guesser_mode /*guesser*/, vector<tagged_lemma_forms>& forms) const {
5449 0 forms.clear();
5450  
5451 0 ▶ tag_filter filter(tag_wildcard);
Branch: 1 branch
BranchTrueFalseTotal
tag_filter filter(tag_wildcard); 0 0 0
5452  
5453 0 ▶ if (lemma.len) {
Branch: 1 branch
BranchTrueFalseTotal
if (lemma.len) { 0 0 0
5454 // Start by locating the lemma
5455 0 string_piece formtags = lemma;
5456 0 ▶ while (formtags.len && *formtags.str != ' ') formtags.len--, formtags.str++;
Branch: 2 branches
BranchTrueFalseTotal
while (formtags.len && *formtags.str != ' ') formtags.len--, formtags.str++; 0 0 0
while (formtags.len && *formtags.str != ' ') formtags.len--, formtags.str++; 0 0 0
5457 0 string_piece real_lemma(lemma.str, lemma.len - formtags.len);
5458 0 ▶ if (formtags.len) formtags.len--, formtags.str++;
Branch: 1 branch
BranchTrueFalseTotal
if (formtags.len) formtags.len--, formtags.str++; 0 0 0
5459  
5460 // Split formtags using ' ' into form-tag pairs.
5461 0 bool any_result = false;
5462 0 ▶ while (formtags.len) {
Branch: 1 branch
BranchTrueFalseTotal
while (formtags.len) { 0 0 0
5463 0 auto form_start = formtags.str;
5464 0 ▶ while (formtags.len && *formtags.str != ' ') formtags.len--, formtags.str++;
Branch: 2 branches
BranchTrueFalseTotal
while (formtags.len && *formtags.str != ' ') formtags.len--, formtags.str++; 0 0 0
while (formtags.len && *formtags.str != ' ') formtags.len--, formtags.str++; 0 0 0
5465 0 ▶ if (!formtags.len) break;
Branch: 1 branch
BranchTrueFalseTotal
if (!formtags.len) break; 0 0 0
5466 0 auto form_len = formtags.str - form_start;
5467 0 formtags.len--, formtags.str++;
5468  
5469 0 auto tag_start = formtags.str;
5470 0 ▶ while (formtags.len && *formtags.str != ' ') formtags.len--, formtags.str++;
Branch: 2 branches
BranchTrueFalseTotal
while (formtags.len && *formtags.str != ' ') formtags.len--, formtags.str++; 0 0 0
while (formtags.len && *formtags.str != ' ') formtags.len--, formtags.str++; 0 0 0
5471 0 auto tag_len = formtags.str - tag_start;
5472 0 ▶ if (formtags.len) formtags.len--, formtags.str++;
Branch: 1 branch
BranchTrueFalseTotal
if (formtags.len) formtags.len--, formtags.str++; 0 0 0
5473  
5474 0 any_result = true;
5475 0 ▶ string tag(tag_start, tag_len);
Branch: 1 branch
BranchTrueFalseTotal
string tag(tag_start, tag_len); 0 0 0
5476 0 ▶ if (filter.matches(tag.c_str())) {
Branch: 1 branch
BranchTrueFalseTotal
if (filter.matches(tag.c_str())) { 0 0 0
5477 0 ▶ if (forms.empty()) forms.emplace_back(string(real_lemma.str, real_lemma.len));
Branch: 3 branches
BranchTrueFalseTotal
if (forms.empty()) forms.emplace_back(string(real_lemma.str, real_lemma.len)); 0 0 0
if (forms.empty()) forms.emplace_back(string(real_lemma.str, real_lemma.len)); 0 0 0
if (forms.empty()) forms.emplace_back(string(real_lemma.str, real_lemma.len)); 0 0 0
5478 0 ▶ forms.back().forms.emplace_back(string(form_start, form_len), tag);
Branch: 2 branches
BranchTrueFalseTotal
forms.back().forms.emplace_back(string(form_start, form_len), tag); 0 0 0
forms.back().forms.emplace_back(string(form_start, form_len), tag); 0 0 0
5479 }
5480 0 }
5481  
5482 0 ▶ if (any_result) return NO_GUESSER;
Branch: 1 branch
BranchTrueFalseTotal
if (any_result) return NO_GUESSER; 0 0 0
5483 }
5484  
5485 0 return -1;
5486 0 }
5487  
5488 0 int external_morpho::raw_lemma_len(string_piece lemma) const {
5489 0 unsigned lemma_len = 0;
5490 0 ▶ while (lemma_len < lemma.len && lemma.str[lemma_len] != ' ') lemma_len++;
Branch: 2 branches
BranchTrueFalseTotal
while (lemma_len < lemma.len && lemma.str[lemma_len] != ' ') lemma_len++; 0 0 0
while (lemma_len < lemma.len && lemma.str[lemma_len] != ' ') lemma_len++; 0 0 0
5491 0 return lemma_len;
5492 }
5493  
5494 0 int external_morpho::lemma_id_len(string_piece lemma) const {
5495 0 unsigned lemma_len = 0;
5496 0 ▶ while (lemma_len < lemma.len && lemma.str[lemma_len] != ' ') lemma_len++;
Branch: 2 branches
BranchTrueFalseTotal
while (lemma_len < lemma.len && lemma.str[lemma_len] != ' ') lemma_len++; 0 0 0
while (lemma_len < lemma.len && lemma.str[lemma_len] != ' ') lemma_len++; 0 0 0
5497 0 return lemma_len;
5498 }
5499  
5500 0 int external_morpho::raw_form_len(string_piece form) const {
5501 0 unsigned form_len = 0;
5502 0 ▶ while (form_len < form.len && form.str[form_len] != ' ') form_len++;
Branch: 2 branches
BranchTrueFalseTotal
while (form_len < form.len && form.str[form_len] != ' ') form_len++; 0 0 0
while (form_len < form.len && form.str[form_len] != ' ') form_len++; 0 0 0
5503 0 return form_len;
5504 }
5505  
5506 0 tokenizer* external_morpho::new_tokenizer() const {
5507 0 ▶ return new generic_tokenizer(version);
Branch: 2 branches
BranchTrueFalseTotal
return new generic_tokenizer(version); 0 0 0
return new generic_tokenizer(version); 0 0 0
5508 }
5509  
5510 /////////
5511 // File: morpho/generic_lemma_addinfo.h
5512 /////////
5513  
5514 // This file is part of MorphoDiTa <http://github.com/ufal/morphodita/>.
5515 //
5516 // Copyright 2015 Institute of Formal and Applied Linguistics, Faculty of
5517 // Mathematics and Physics, Charles University in Prague, Czech Republic.
5518 //
5519 // This Source Code Form is subject to the terms of the Mozilla Public
5520 // License, v. 2.0. If a copy of the MPL was not distributed with this
5521 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
5522  
5523 // Declarations
5524 struct generic_lemma_addinfo {
5525 inline static int raw_lemma_len(string_piece lemma);
5526 inline static int lemma_id_len(string_piece lemma);
5527 inline static string format(const unsigned char* addinfo, int addinfo_len);
5528 inline static bool generatable(const unsigned char* addinfo, int addinfo_len);
5529  
5530 inline int parse(string_piece lemma, bool die_on_failure = false);
5531 inline bool match_lemma_id(const unsigned char* other_addinfo, int other_addinfo_len);
5532  
5533 vector<unsigned char> data;
5534 };
5535  
5536 // Definitions
5537 0 int generic_lemma_addinfo::raw_lemma_len(string_piece lemma) {
5538 0 return lemma.len;
5539 }
5540  
5541 0 int generic_lemma_addinfo::lemma_id_len(string_piece lemma) {
5542 0 return lemma.len;
5543 }
5544  
5545 4 string generic_lemma_addinfo::format(const unsigned char* /*addinfo*/, int /*addinfo_len*/) {
5546 4 return string();
5547 }
5548  
5549 4 bool generic_lemma_addinfo::generatable(const unsigned char* /*addinfo*/, int /*addinfo_len*/) {
5550 4 return true;
5551 }
5552  
5553 4 int generic_lemma_addinfo::parse(string_piece lemma, bool /*die_on_failure*/) {
5554 4 return lemma.len;
5555 }
5556  
5557 4 bool generic_lemma_addinfo::match_lemma_id(const unsigned char* /*other_addinfo*/, int /*other_addinfo_len*/) {
5558 4 return true;
5559 }
5560  
5561 /////////
5562 // File: morpho/generic_morpho.h
5563 /////////
5564  
5565 // This file is part of MorphoDiTa <http://github.com/ufal/morphodita/>.
5566 //
5567 // Copyright 2015 Institute of Formal and Applied Linguistics, Faculty of
5568 // Mathematics and Physics, Charles University in Prague, Czech Republic.
5569 //
5570 // This Source Code Form is subject to the terms of the Mozilla Public
5571 // License, v. 2.0. If a copy of the MPL was not distributed with this
5572 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
5573  
5574 class generic_morpho : public morpho {
5575 public:
5576 2 generic_morpho(unsigned version) : version(version) {}
5577  
5578 virtual int analyze(string_piece form, morpho::guesser_mode guesser, vector<tagged_lemma>& lemmas) const override;
5579 virtual int generate(string_piece lemma, const char* tag_wildcard, guesser_mode guesser, vector<tagged_lemma_forms>& forms) const override;
5580 virtual int raw_lemma_len(string_piece lemma) const override;
5581 virtual int lemma_id_len(string_piece lemma) const override;
5582 virtual int raw_form_len(string_piece form) const override;
5583 virtual tokenizer* new_tokenizer() const override;
5584  
5585 bool load(istream& is);
5586 private:
5587 inline void analyze_special(string_piece form, vector<tagged_lemma>& lemmas) const;
5588  
5589 unsigned version;
5590 morpho_dictionary<generic_lemma_addinfo> dictionary;
5591 unique_ptr<morpho_statistical_guesser> statistical_guesser;
5592  
5593 string unknown_tag, number_tag, punctuation_tag, symbol_tag;
5594 };
5595  
5596 /////////
5597 // File: morpho/generic_morpho.cpp
5598 /////////
5599  
5600 // This file is part of MorphoDiTa <http://github.com/ufal/morphodita/>.
5601 //
5602 // Copyright 2015 Institute of Formal and Applied Linguistics, Faculty of
5603 // Mathematics and Physics, Charles University in Prague, Czech Republic.
5604 //
5605 // This Source Code Form is subject to the terms of the Mozilla Public
5606 // License, v. 2.0. If a copy of the MPL was not distributed with this
5607 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
5608  
5609 2 bool generic_morpho::load(istream& is) {
5610 2 binary_decoder data;
5611 2 ▶ if (!compressor::load(is, data)) return false;
Branch: 2 branches
BranchTrueFalseTotal
if (!compressor::load(is, data)) return false; 2 0 2
if (!compressor::load(is, data)) return false; 0 2 2
5612  
5613 try {
5614 // Load tags
5615 2 ▶ unsigned length = data.next_1B();
Branch: 1 branch
BranchTrueFalseTotal
unsigned length = data.next_1B(); 2 0 2
5616 2 ▶ unknown_tag.assign(data.next<char>(length), length);
Branch: 2 branches
BranchTrueFalseTotal
unknown_tag.assign(data.next<char>(length), length); 2 0 2
unknown_tag.assign(data.next<char>(length), length); 2 0 2
5617 2 ▶ length = data.next_1B();
Branch: 1 branch
BranchTrueFalseTotal
length = data.next_1B(); 2 0 2
5618 2 ▶ number_tag.assign(data.next<char>(length), length);
Branch: 2 branches
BranchTrueFalseTotal
number_tag.assign(data.next<char>(length), length); 2 0 2
number_tag.assign(data.next<char>(length), length); 2 0 2
5619 2 ▶ length = data.next_1B();
Branch: 1 branch
BranchTrueFalseTotal
length = data.next_1B(); 2 0 2
5620 2 ▶ punctuation_tag.assign(data.next<char>(length), length);
Branch: 2 branches
BranchTrueFalseTotal
punctuation_tag.assign(data.next<char>(length), length); 2 0 2
punctuation_tag.assign(data.next<char>(length), length); 2 0 2
5621 2 ▶ length = data.next_1B();
Branch: 1 branch
BranchTrueFalseTotal
length = data.next_1B(); 2 0 2
5622 2 ▶ symbol_tag.assign(data.next<char>(length), length);
Branch: 2 branches
BranchTrueFalseTotal
symbol_tag.assign(data.next<char>(length), length); 2 0 2
symbol_tag.assign(data.next<char>(length), length); 2 0 2
5623  
5624 // Load dictionary
5625 2 ▶ dictionary.load(data);
Branch: 1 branch
BranchTrueFalseTotal
dictionary.load(data); 2 0 2
5626  
5627 // Optionally statistical guesser if present
5628 2 statistical_guesser.reset();
5629 2 ▶ if (data.next_1B()) {
Branch: 2 branches
BranchTrueFalseTotal
if (data.next_1B()) { 2 0 2
if (data.next_1B()) { 0 2 2
5630 0 ▶ statistical_guesser.reset(new morpho_statistical_guesser());
Branch: 1 branch
BranchTrueFalseTotal
statistical_guesser.reset(new morpho_statistical_guesser()); 0 0 0
5631 0 ▶ statistical_guesser->load(data);
Branch: 1 branch
BranchTrueFalseTotal
statistical_guesser->load(data); 0 0 0
5632 ▶ }
Branch: 1 branch
BranchTrueFalseTotal
} 0 0 0
5633 } catch (binary_decoder_error&) {
5634 return false;
5635 }
5636  
5637 2 return data.is_end();
5638 2 }
5639  
5640 13 int generic_morpho::analyze(string_piece form, guesser_mode guesser, vector<tagged_lemma>& lemmas) const {
5641 13 lemmas.clear();
5642  
5643 13 ▶ if (form.len) {
Branch: 1 branch
BranchTrueFalseTotal
if (form.len) { 13 0 13
5644 // Generate all casing variants if needed (they are different than given form).
5645 13 string form_uclc; // first uppercase, rest lowercase
5646 13 string form_lc; // all lowercase
5647 13 ▶ generate_casing_variants(form, form_uclc, form_lc);
Branch: 1 branch
BranchTrueFalseTotal
generate_casing_variants(form, form_uclc, form_lc); 13 0 13
5648  
5649 // Start by analysing using the dictionary and all casing variants.
5650 13 ▶ dictionary.analyze(form, lemmas);
Branch: 1 branch
BranchTrueFalseTotal
dictionary.analyze(form, lemmas); 13 0 13
5651 13 ▶ if (!form_uclc.empty()) dictionary.analyze(form_uclc, lemmas);
Branch: 2 branches
BranchTrueFalseTotal
if (!form_uclc.empty()) dictionary.analyze(form_uclc, lemmas); 0 13 13
if (!form_uclc.empty()) dictionary.analyze(form_uclc, lemmas); 0 0 0
5652 13 ▶ if (!form_lc.empty()) dictionary.analyze(form_lc, lemmas);
Branch: 2 branches
BranchTrueFalseTotal
if (!form_lc.empty()) dictionary.analyze(form_lc, lemmas); 2 11 13
if (!form_lc.empty()) dictionary.analyze(form_lc, lemmas); 2 0 2
5653 13 ▶ if (!lemmas.empty()) return NO_GUESSER;
Branch: 1 branch
BranchTrueFalseTotal
if (!lemmas.empty()) return NO_GUESSER; 6 7 13
5654  
5655 // Then call analyze_special to handle numbers, punctuation and symbols.
5656 7 ▶ analyze_special(form, lemmas);
Branch: 1 branch
BranchTrueFalseTotal
analyze_special(form, lemmas); 7 0 7
5657 7 ▶ if (!lemmas.empty()) return NO_GUESSER;
Branch: 1 branch
BranchTrueFalseTotal
if (!lemmas.empty()) return NO_GUESSER; 6 1 7
5658  
5659 // For the statistical guesser, use all casing variants.
5660 1 ▶ if (guesser == GUESSER && statistical_guesser) {
Branch: 3 branches
BranchTrueFalseTotal
if (guesser == GUESSER && statistical_guesser) { 0 1 1
if (guesser == GUESSER && statistical_guesser) { 0 0 0
if (guesser == GUESSER && statistical_guesser) { 0 1 1
5661 0 ▶ if (form_uclc.empty() && form_lc.empty())
Branch: 3 branches
BranchTrueFalseTotal
if (form_uclc.empty() && form_lc.empty()) 0 0 0
if (form_uclc.empty() && form_lc.empty()) 0 0 0
if (form_uclc.empty() && form_lc.empty()) 0 0 0
5662 0 ▶ statistical_guesser->analyze(form, lemmas, nullptr);
Branch: 1 branch
BranchTrueFalseTotal
statistical_guesser->analyze(form, lemmas, nullptr); 0 0 0
5663 else {
5664 0 ▶ morpho_statistical_guesser::used_rules used_rules; used_rules.reserve(3);
Branch: 1 branch
BranchTrueFalseTotal
morpho_statistical_guesser::used_rules used_rules; used_rules.reserve(3); 0 0 0
5665 0 ▶ statistical_guesser->analyze(form, lemmas, &used_rules);
Branch: 1 branch
BranchTrueFalseTotal
statistical_guesser->analyze(form, lemmas, &used_rules); 0 0 0
5666 0 ▶ if (!form_uclc.empty()) statistical_guesser->analyze(form_uclc, lemmas, &used_rules);
Branch: 2 branches
BranchTrueFalseTotal
if (!form_uclc.empty()) statistical_guesser->analyze(form_uclc, lemmas, &used_rules); 0 0 0
if (!form_uclc.empty()) statistical_guesser->analyze(form_uclc, lemmas, &used_rules); 0 0 0
5667 0 ▶ if (!form_lc.empty()) statistical_guesser->analyze(form_lc, lemmas, &used_rules);
Branch: 2 branches
BranchTrueFalseTotal
if (!form_lc.empty()) statistical_guesser->analyze(form_lc, lemmas, &used_rules); 0 0 0
if (!form_lc.empty()) statistical_guesser->analyze(form_lc, lemmas, &used_rules); 0 0 0
5668 0 }
5669 }
5670 1 ▶ if (!lemmas.empty()) return GUESSER;
Branch: 1 branch
BranchTrueFalseTotal
if (!lemmas.empty()) return GUESSER; 0 1 1
5671 25 ▶ }
Branch: 2 branches
BranchTrueFalseTotal
} 1 12 13
} 1 12 13
5672  
5673 2 ▶ lemmas.emplace_back(string(form.str, form.len), unknown_tag);
Branch: 2 branches
BranchTrueFalseTotal
lemmas.emplace_back(string(form.str, form.len), unknown_tag); 1 0 1
lemmas.emplace_back(string(form.str, form.len), unknown_tag); 1 0 1
5674 1 return -1;
5675 }
5676  
5677 4 int generic_morpho::generate(string_piece lemma, const char* tag_wildcard, morpho::guesser_mode /*guesser*/, vector<tagged_lemma_forms>& forms) const {
5678 4 forms.clear();
5679  
5680 4 ▶ tag_filter filter(tag_wildcard);
Branch: 1 branch
BranchTrueFalseTotal
tag_filter filter(tag_wildcard); 4 0 4
5681  
5682 4 ▶ if (lemma.len) {
Branch: 1 branch
BranchTrueFalseTotal
if (lemma.len) { 4 0 4
5683 4 ▶ if (dictionary.generate(lemma, filter, forms))
Branch: 2 branches
BranchTrueFalseTotal
if (dictionary.generate(lemma, filter, forms)) 4 0 4
if (dictionary.generate(lemma, filter, forms)) 4 0 4
5684 4 return NO_GUESSER;
5685 }
5686  
5687 0 return -1;
5688 4 }
5689  
5690 0 int generic_morpho::raw_lemma_len(string_piece lemma) const {
5691 0 return generic_lemma_addinfo::raw_lemma_len(lemma);
5692 }
5693  
5694 0 int generic_morpho::lemma_id_len(string_piece lemma) const {
5695 0 return generic_lemma_addinfo::lemma_id_len(lemma);
5696 }
5697  
5698 6 int generic_morpho::raw_form_len(string_piece form) const {
5699 6 return form.len;
5700 }
5701  
5702 2 tokenizer* generic_morpho::new_tokenizer() const {
5703 2 ▶ return new generic_tokenizer(version);
Branch: 2 branches
BranchTrueFalseTotal
return new generic_tokenizer(version); 2 0 2
return new generic_tokenizer(version); 0 0 0
5704 }
5705  
5706 7 void generic_morpho::analyze_special(string_piece form, vector<tagged_lemma>& lemmas) const {
5707 using namespace unilib;
5708  
5709 // Analyzer for numbers, punctuation and symbols.
5710 // Number is anything matching [+-]? is_Pn* ([.,] is_Pn*)? ([Ee] [+-]? is_Pn+)? for at least one is_Pn* nonempty.
5711 // Punctuation is any form beginning with either unicode punctuation or punctuation_exceptions character.
5712 // Beware that numbers takes precedence, so - is punctuation, -3 is number, -. is punctuation, -.3 is number.
5713 8 ▶ if (!form.len) return;
Branch: 1 branch
BranchTrueFalseTotal
if (!form.len) return; 0 7 7
5714  
5715 7 string_piece number = form;
5716 7 char32_t first = utf8::decode(number.str, number.len);
5717  
5718 // Try matching a number.
5719 7 char32_t codepoint = first;
5720 7 bool any_digit = false;
5721 7 ▶ if (codepoint == '+' || codepoint == '-') codepoint = utf8::decode(number.str, number.len);
Branch: 2 branches
BranchTrueFalseTotal
if (codepoint == '+' || codepoint == '-') codepoint = utf8::decode(number.str, number.len); 7 0 7
if (codepoint == '+' || codepoint == '-') codepoint = utf8::decode(number.str, number.len); 0 7 7
5722 8 ▶ while (unicode::category(codepoint) & unicode::N) any_digit = true, codepoint = utf8::decode(number.str, number.len);
Branch: 1 branch
BranchTrueFalseTotal
while (unicode::category(codepoint) & unicode::N) any_digit = true, codepoint = utf8::decode(number.str, number.len); 1 7 8
5723 7 ▶ if ((codepoint == '.' && number.len) || codepoint == ',') codepoint = utf8::decode(number.str, number.len);
Branch: 3 branches
BranchTrueFalseTotal
if ((codepoint == '.' && number.len) || codepoint == ',') codepoint = utf8::decode(number.str, number.len); 3 4 7
if ((codepoint == '.' && number.len) || codepoint == ',') codepoint = utf8::decode(number.str, number.len); 2 1 3
if ((codepoint == '.' && number.len) || codepoint == ',') codepoint = utf8::decode(number.str, number.len); 0 6 6
5724 8 ▶ while (unicode::category(codepoint) & unicode::N) any_digit = true, codepoint = utf8::decode(number.str, number.len);
Branch: 1 branch
BranchTrueFalseTotal
while (unicode::category(codepoint) & unicode::N) any_digit = true, codepoint = utf8::decode(number.str, number.len); 1 7 8
5725 7 ▶ if (any_digit && (codepoint == 'e' || codepoint == 'E')) {
Branch: 3 branches
BranchTrueFalseTotal
if (any_digit && (codepoint == 'e' || codepoint == 'E')) { 1 6 7
if (any_digit && (codepoint == 'e' || codepoint == 'E')) { 0 1 1
if (any_digit && (codepoint == 'e' || codepoint == 'E')) { 0 0 0
5726 1 codepoint = utf8::decode(number.str, number.len);
5727 1 ▶ if (codepoint == '+' || codepoint == '-') codepoint = utf8::decode(number.str, number.len);
Branch: 2 branches
BranchTrueFalseTotal
if (codepoint == '+' || codepoint == '-') codepoint = utf8::decode(number.str, number.len); 0 1 1
if (codepoint == '+' || codepoint == '-') codepoint = utf8::decode(number.str, number.len); 0 0 0
5728 1 any_digit = false;
5729 3 ▶ while (unicode::category(codepoint) & unicode::N) any_digit = true, codepoint = utf8::decode(number.str, number.len);
Branch: 1 branch
BranchTrueFalseTotal
while (unicode::category(codepoint) & unicode::N) any_digit = true, codepoint = utf8::decode(number.str, number.len); 2 1 3
5730 }
5731  
5732 7 ▶ if (any_digit && !number.len && (!codepoint || codepoint == '.')) {
Branch: 4 branches
BranchTrueFalseTotal
if (any_digit && !number.len && (!codepoint || codepoint == '.')) { 1 6 7
if (any_digit && !number.len && (!codepoint || codepoint == '.')) { 1 0 1
if (any_digit && !number.len && (!codepoint || codepoint == '.')) { 0 1 1
if (any_digit && !number.len && (!codepoint || codepoint == '.')) { 0 0 0
5733 2 ▶ lemmas.emplace_back(string(form.str, form.len), number_tag);
Branch: 2 branches
BranchTrueFalseTotal
lemmas.emplace_back(string(form.str, form.len), number_tag); 1 0 1
lemmas.emplace_back(string(form.str, form.len), number_tag); 1 0 1
5734 1 return;
5735 }
5736  
5737 // Try matching punctuation or symbol.
5738 6 bool punctuation = true, symbol = true;
5739 6 string_piece form_ori = form;
5740 18 ▶ while (form.len) {
Branch: 1 branch
BranchTrueFalseTotal
while (form.len) { 12 6 18
5741 12 codepoint = utf8::decode(form.str, form.len);
5742 12 ▶ punctuation = punctuation && unicode::category(codepoint) & unicode::P;
Branch: 2 branches
BranchTrueFalseTotal
punctuation = punctuation && unicode::category(codepoint) & unicode::P; 6 6 12
punctuation = punctuation && unicode::category(codepoint) & unicode::P; 4 2 6
5743 12 ▶ symbol = symbol && unicode::category(codepoint) & unicode::S;
Branch: 2 branches
BranchTrueFalseTotal
symbol = symbol && unicode::category(codepoint) & unicode::S; 6 6 12
symbol = symbol && unicode::category(codepoint) & unicode::S; 1 5 6
5744 }
5745 6 ▶ if (punctuation)
Branch: 1 branch
BranchTrueFalseTotal
if (punctuation) 4 2 6
5746 12 ▶ lemmas.emplace_back(string(form_ori.str, form_ori.len), punctuation_tag);
Branch: 2 branches
BranchTrueFalseTotal
lemmas.emplace_back(string(form_ori.str, form_ori.len), punctuation_tag); 4 0 4
lemmas.emplace_back(string(form_ori.str, form_ori.len), punctuation_tag); 4 0 4
5747 2 ▶ else if (symbol)
Branch: 1 branch
BranchTrueFalseTotal
else if (symbol) 1 1 2
5748 3 ▶ lemmas.emplace_back(string(form_ori.str, form_ori.len), symbol_tag);
Branch: 2 branches
BranchTrueFalseTotal
lemmas.emplace_back(string(form_ori.str, form_ori.len), symbol_tag); 1 0 1
lemmas.emplace_back(string(form_ori.str, form_ori.len), symbol_tag); 1 0 1
5749 }
5750  
5751 /////////
5752 // File: morpho/morpho_ids.h
5753 /////////
5754  
5755 // This file is part of MorphoDiTa <http://github.com/ufal/morphodita/>.
5756 //
5757 // Copyright 2015 Institute of Formal and Applied Linguistics, Faculty of
5758 // Mathematics and Physics, Charles University in Prague, Czech Republic.
5759 //
5760 // This Source Code Form is subject to the terms of the Mozilla Public
5761 // License, v. 2.0. If a copy of the MPL was not distributed with this
5762 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
5763  
5764 class morpho_ids {
5765 public:
5766 enum morpho_id {
5767 CZECH = 0,
5768 ENGLISH_V1 = 1,
5769 GENERIC = 2,
5770 EXTERNAL = 3,
5771 ENGLISH_V2 = 4,
5772 ENGLISH_V3 = 5, ENGLISH = ENGLISH_V3,
5773 SLOVAK_PDT = 6,
5774 DERIVATOR_DICTIONARY = 7,
5775 };
5776  
5777 static bool parse(const string& str, morpho_id& id) {
5778 if (str == "czech") return id = CZECH, true;
5779 if (str == "english") return id = ENGLISH, true;
5780 if (str == "external") return id = EXTERNAL, true;
5781 if (str == "generic") return id = GENERIC, true;
5782 if (str == "slovak_pdt") return id = SLOVAK_PDT, true;
5783 return false;
5784 }
5785 };
5786  
5787 typedef morpho_ids::morpho_id morpho_id;
5788  
5789 /////////
5790 // File: utils/new_unique_ptr.h
5791 /////////
5792  
5793 // This file is part of UFAL C++ Utils <http://github.com/ufal/cpp_utils/>.
5794 //
5795 // Copyright 2015 Institute of Formal and Applied Linguistics, Faculty of
5796 // Mathematics and Physics, Charles University in Prague, Czech Republic.
5797 //
5798 // This Source Code Form is subject to the terms of the Mozilla Public
5799 // License, v. 2.0. If a copy of the MPL was not distributed with this
5800 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
5801  
5802 namespace utils {
5803  
5804 template<typename T, typename... Args>
5805 0 unique_ptr<T> new_unique_ptr(Args&&... args) {
5806 0 ▶ return unique_ptr<T>(new T(std::forward<Args>(args)...));
Branch: 10 branches
BranchTrueFalseTotal
return unique_ptr<T>(new T(std::forward<Args>(args)...)); 0 0 0
return unique_ptr<T>(new T(std::forward<Args>(args)...)); 0 0 0
return unique_ptr<T>(new T(std::forward<Args>(args)...)); 1 0 1
return unique_ptr<T>(new T(std::forward<Args>(args)...)); 0 0 0
return unique_ptr<T>(new T(std::forward<Args>(args)...)); 0 0 0
return unique_ptr<T>(new T(std::forward<Args>(args)...)); 0 0 0
return unique_ptr<T>(new T(std::forward<Args>(args)...)); 0 0 0
return unique_ptr<T>(new T(std::forward<Args>(args)...)); 0 0 0
return unique_ptr<T>(new T(std::forward<Args>(args)...)); 0 0 0
return unique_ptr<T>(new T(std::forward<Args>(args)...)); 0 0 0
5807 }
5808  
5809 } // namespace utils
5810  
5811 /////////
5812 // File: utils/path_from_utf8.h
5813 /////////
5814  
5815 // This file is part of UFAL C++ Utils <http://github.com/ufal/cpp_utils/>.
5816 //
5817 // Copyright 2022 Institute of Formal and Applied Linguistics, Faculty of
5818 // Mathematics and Physics, Charles University in Prague, Czech Republic.
5819 //
5820 // This Source Code Form is subject to the terms of the Mozilla Public
5821 // License, v. 2.0. If a copy of the MPL was not distributed with this
5822 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
5823  
5824 namespace utils {
5825  
5826 //
5827 // Declarations
5828 //
5829  
5830 #ifdef _WIN32
5831 inline wstring path_from_utf8(const char* str);
5832 inline wstring path_from_utf8(const string& str);
5833 #else
5834 inline string path_from_utf8(const char* str);
5835 inline const string& path_from_utf8(const string& str);
5836 #endif
5837  
5838 //
5839 // Definitions
5840 //
5841  
5842 #ifdef _WIN32
5843  
5844 inline wstring path_from_utf8(const char* str) {
5845 // We could implement this using codecvt_utf8_utf16, but it is not available
5846 // in GCC 4.9, which we still use. We could also use MultiByteToWideChar,
5847 // but using it would require changing our build infrastructure -- hence
5848 // we implement the conversion manually.
5849 wstring wstr;
5850 while (*str) {
5851 char32_t chr;
5852 if (((unsigned char)*str) < 0x80) chr = (unsigned char)*str++;
5853 else if (((unsigned char)*str) < 0xC0) chr = '?', ++str;
5854 else if (((unsigned char)*str) < 0xE0) {
5855 chr = (((unsigned char)*str++) & 0x1F) << 6;
5856 if (((unsigned char)*str) < 0x80 || ((unsigned char)*str) >= 0xC0) chr = '?';
5857 else chr += ((unsigned char)*str++) & 0x3F;
5858 } else if (((unsigned char)*str) < 0xF0) {
5859 chr = (((unsigned char)*str++) & 0x0F) << 12;
5860 if (((unsigned char)*str) < 0x80 || ((unsigned char)*str) >= 0xC0) chr = '?';
5861 else {
5862 chr += (((unsigned char)*str++) & 0x3F) << 6;
5863 if (((unsigned char)*str) < 0x80 || ((unsigned char)*str) >= 0xC0) chr = '?';
5864 else chr += ((unsigned char)*str++) & 0x3F;
5865 }
5866 } else if (((unsigned char)*str) < 0xF8) {
5867 chr = (((unsigned char)*str++) & 0x07) << 18;
5868 if (((unsigned char)*str) < 0x80 || ((unsigned char)*str) >= 0xC0) chr = '?';
5869 else {
5870 chr += (((unsigned char)*str++) & 0x3F) << 12;
5871 if (((unsigned char)*str) < 0x80 || ((unsigned char)*str) >= 0xC0) chr = '?';
5872 else {
5873 chr += (((unsigned char)*str++) & 0x3F) << 6;
5874 if (((unsigned char)*str) < 0x80 || ((unsigned char)*str) >= 0xC0) chr = '?';
5875 else chr += ((unsigned char)*str++) & 0x3F;
5876 }
5877 }
5878 } else chr = '?', ++str;
5879  
5880 if (chr <= 0xFFFF) wstr.push_back(chr);
5881 else if (chr <= 0x10FFFF) {
5882 wstr.push_back(0xD800 + ((chr - 0x10000) >> 10));
5883 wstr.push_back(0xDC00 + ((chr - 0x10000) & 0x3FF));
5884 } else {
5885 wstr.push_back('?');
5886 }
5887 }
5888 return wstr;
5889 }
5890  
5891 inline wstring path_from_utf8(const string& str) {
5892 return path_from_utf8(str.c_str());
5893 }
5894  
5895 #else
5896  
5897 2 inline string path_from_utf8(const char* str) {
5898 4 ▶ return str;
Branch: 1 branch
BranchTrueFalseTotal
return str; 2 0 2
5899 }
5900  
5901 inline const string& path_from_utf8(const string& str) {
5902 return str;
5903 }
5904  
5905 #endif
5906  
5907 } // namespace utils
5908  
5909 /////////
5910 // File: morpho/morpho.cpp
5911 /////////
5912  
5913 // This file is part of MorphoDiTa <http://github.com/ufal/morphodita/>.
5914 //
5915 // Copyright 2015 Institute of Formal and Applied Linguistics, Faculty of
5916 // Mathematics and Physics, Charles University in Prague, Czech Republic.
5917 //
5918 // This Source Code Form is subject to the terms of the Mozilla Public
5919 // License, v. 2.0. If a copy of the MPL was not distributed with this
5920 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
5921  
5922 2 morpho* morpho::load(istream& is) {
5923 2 morpho_id id = morpho_id(is.get());
5924 2 switch (id) {
5925 0 case morpho_ids::CZECH:
5926 {
5927 0 ▶ auto res = new_unique_ptr<czech_morpho>(czech_morpho::morpho_language::CZECH, 1);
Branch: 1 branch
BranchTrueFalseTotal
auto res = new_unique_ptr<czech_morpho>(czech_morpho::morpho_language::CZECH, 1); 0 0 0
5928 0 ▶ if (res->load(is)) return res.release();
Branch: 2 branches
BranchTrueFalseTotal
if (res->load(is)) return res.release(); 0 0 0
if (res->load(is)) return res.release(); 0 0 0
5929 0 break;
5930 0 ▶ }
Branch: 1 branch
BranchTrueFalseTotal
} 0 0 0
5931 0 case morpho_ids::ENGLISH_V1:
5932 case morpho_ids::ENGLISH_V2:
5933 case morpho_ids::ENGLISH_V3:
5934 {
5935 0 ▶ auto res = new_unique_ptr<english_morpho>(id == morpho_ids::ENGLISH_V1 ? 1 :
Branch: 1 branch
BranchTrueFalseTotal
auto res = new_unique_ptr<english_morpho>(id == morpho_ids::ENGLISH_V1 ? 1 : 0 0 0
5936 0 ▶ id == morpho_ids::ENGLISH_V2 ? 2 :
Branch: 1 branch
BranchTrueFalseTotal
id == morpho_ids::ENGLISH_V2 ? 2 : 0 0 0
5937 0 ▶ 3);
Branch: 1 branch
BranchTrueFalseTotal
3); 0 0 0
5938 0 ▶ if (res->load(is)) return res.release();
Branch: 2 branches
BranchTrueFalseTotal
if (res->load(is)) return res.release(); 0 0 0
if (res->load(is)) return res.release(); 0 0 0
5939 0 break;
5940 0 ▶ }
Branch: 1 branch
BranchTrueFalseTotal
} 0 0 0
5941 0 case morpho_ids::EXTERNAL:
5942 {
5943 0 ▶ auto res = new_unique_ptr<external_morpho>(1);
Branch: 1 branch
BranchTrueFalseTotal
auto res = new_unique_ptr<external_morpho>(1); 0 0 0
5944 0 ▶ if (res->load(is)) return res.release();
Branch: 2 branches
BranchTrueFalseTotal
if (res->load(is)) return res.release(); 0 0 0
if (res->load(is)) return res.release(); 0 0 0
5945 0 break;
5946 0 ▶ }
Branch: 1 branch
BranchTrueFalseTotal
} 0 0 0
5947 2 case morpho_ids::GENERIC:
5948 {
5949 2 ▶ auto res = new_unique_ptr<generic_morpho>(1);
Branch: 1 branch
BranchTrueFalseTotal
auto res = new_unique_ptr<generic_morpho>(1); 2 0 2
5950 2 ▶ if (res->load(is)) return res.release();
Branch: 2 branches
BranchTrueFalseTotal
if (res->load(is)) return res.release(); 2 0 2
if (res->load(is)) return res.release(); 2 0 2
5951 0 break;
5952 2 ▶ }
Branch: 1 branch
BranchTrueFalseTotal
} 2 0 2
5953 0 case morpho_ids::SLOVAK_PDT:
5954 {
5955 0 ▶ auto res = new_unique_ptr<czech_morpho>(czech_morpho::morpho_language::SLOVAK, 3);
Branch: 1 branch
BranchTrueFalseTotal
auto res = new_unique_ptr<czech_morpho>(czech_morpho::morpho_language::SLOVAK, 3); 0 0 0
5956 0 ▶ if (res->load(is)) return res.release();
Branch: 2 branches
BranchTrueFalseTotal
if (res->load(is)) return res.release(); 0 0 0
if (res->load(is)) return res.release(); 0 0 0
5957 0 break;
5958 0 ▶ }
Branch: 1 branch
BranchTrueFalseTotal
} 0 0 0
5959 0 case morpho_ids::DERIVATOR_DICTIONARY:
5960 {
5961 0 ▶ auto derinet = new_unique_ptr<derivator_dictionary>();
Branch: 1 branch
BranchTrueFalseTotal
auto derinet = new_unique_ptr<derivator_dictionary>(); 0 0 0
5962 0 ▶ if (!derinet->load(is)) return nullptr;
Branch: 2 branches
BranchTrueFalseTotal
if (!derinet->load(is)) return nullptr; 0 0 0
if (!derinet->load(is)) return nullptr; 0 0 0
5963  
5964 0 ▶ unique_ptr<morpho> dictionary(load(is));
Branch: 1 branch
BranchTrueFalseTotal
unique_ptr<morpho> dictionary(load(is)); 0 0 0
5965 0 ▶ if (!dictionary) return nullptr;
Branch: 1 branch
BranchTrueFalseTotal
if (!dictionary) return nullptr; 0 0 0
5966 0 derinet->dictionary = dictionary.get();
5967 0 dictionary->derinet.reset(derinet.release());
5968 0 return dictionary.release();
5969 0 }
5970 }
5971  
5972 0 return nullptr;
5973 }
5974  
5975 1 morpho* morpho::load(const char* fname) {
5976 1 ▶ ifstream f(path_from_utf8(fname).c_str(), ifstream::binary);
Branch: 2 branches
BranchTrueFalseTotal
ifstream f(path_from_utf8(fname).c_str(), ifstream::binary); 1 0 1
ifstream f(path_from_utf8(fname).c_str(), ifstream::binary); 1 0 1
5977 1 ▶ if (!f) return nullptr;
Branch: 2 branches
BranchTrueFalseTotal
if (!f) return nullptr; 1 0 1
if (!f) return nullptr; 0 1 1
5978  
5979 1 ▶ return load(f);
Branch: 1 branch
BranchTrueFalseTotal
return load(f); 1 0 1
5980 1 }
5981  
5982 0 const derivator* morpho::get_derivator() const {
5983 0 return derinet.get();
5984 }
5985  
5986 /////////
5987 // File: morpho/morpho_statistical_guesser.cpp
5988 /////////
5989  
5990 // This file is part of MorphoDiTa <http://github.com/ufal/morphodita/>.
5991 //
5992 // Copyright 2015 Institute of Formal and Applied Linguistics, Faculty of
5993 // Mathematics and Physics, Charles University in Prague, Czech Republic.
5994 //
5995 // This Source Code Form is subject to the terms of the Mozilla Public
5996 // License, v. 2.0. If a copy of the MPL was not distributed with this
5997 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
5998  
5999 0 void morpho_statistical_guesser::load(binary_decoder& data) {
6000 // Load tags and default tag
6001 0 tags.resize(data.next_2B());
6002 0 ▶ for (auto&& tag : tags) {
Branch: 1 branch
BranchTrueFalseTotal
for (auto&& tag : tags) { 0 0 0
6003 0 ▶ tag.resize(data.next_1B());
Branch: 2 branches
BranchTrueFalseTotal
tag.resize(data.next_1B()); 0 0 0
tag.resize(data.next_1B()); 0 0 0
6004 0 ▶ for (unsigned i = 0; i < tag.size(); i++)
Branch: 1 branch
BranchTrueFalseTotal
for (unsigned i = 0; i < tag.size(); i++) 0 0 0
6005 0 ▶ tag[i] = data.next_1B();
Branch: 2 branches
BranchTrueFalseTotal
tag[i] = data.next_1B(); 0 0 0
tag[i] = data.next_1B(); 0 0 0
6006 }
6007 0 default_tag = data.next_2B();
6008  
6009 // Load rules
6010 0 rules.load(data);
6011 0 }
6012  
6013 // Helper method for analyze.
6014 0 static bool contains(morpho_statistical_guesser::used_rules* used, const string& rule) {
6015 0 ▶ if (!used) return false;
Branch: 1 branch
BranchTrueFalseTotal
if (!used) return false; 0 0 0
6016  
6017 0 ▶ for (auto&& used_rule : *used)
Branch: 1 branch
BranchTrueFalseTotal
for (auto&& used_rule : *used) 0 0 0
6018 0 ▶ if (used_rule == rule)
Branch: 1 branch
BranchTrueFalseTotal
if (used_rule == rule) 0 0 0
6019 0 return true;
6020  
6021 0 return false;
6022 }
6023  
6024 // Produces unique lemma-tag pairs.
6025 0 void morpho_statistical_guesser::analyze(string_piece form, vector<tagged_lemma>& lemmas, morpho_statistical_guesser::used_rules* used) {
6026 0 unsigned lemmas_initial_size = lemmas.size();
6027  
6028 // We have rules in format "suffix prefix" in rules.
6029 // Find the matching rule with longest suffix and of those with longest prefix.
6030 0 ▶ string rule_label; rule_label.reserve(12);
Branch: 1 branch
BranchTrueFalseTotal
string rule_label; rule_label.reserve(12); 0 0 0
6031 0 unsigned suffix_len = 0;
6032 0 ▶ for (; suffix_len < form.len; suffix_len++) {
Branch: 1 branch
BranchTrueFalseTotal
for (; suffix_len < form.len; suffix_len++) { 0 0 0
6033 0 ▶ rule_label.push_back(form.str[form.len - (suffix_len + 1)]);
Branch: 1 branch
BranchTrueFalseTotal
rule_label.push_back(form.str[form.len - (suffix_len + 1)]); 0 0 0
6034 0 ▶ if (!rules.at(rule_label.c_str(), rule_label.size(), [](pointer_decoder& data){ data.next<char>(data.next_2B()); }))
Branch: 2 branches
BranchTrueFalseTotal
if (!rules.at(rule_label.c_str(), rule_label.size(), [](pointer_decoder& data){ data.next<char>(data.next_2B()); })) 0 0 0
if (!rules.at(rule_label.c_str(), rule_label.size(), [](pointer_decoder& data){ data.next<char>(data.next_2B()); })) 0 0 0
6035 0 break;
6036 }
6037  
6038 0 ▶ for (suffix_len++; suffix_len--; ) {
Branch: 1 branch
BranchTrueFalseTotal
for (suffix_len++; suffix_len--; ) { 0 0 0
6039 0 ▶ rule_label.resize(suffix_len);
Branch: 1 branch
BranchTrueFalseTotal
rule_label.resize(suffix_len); 0 0 0
6040 0 ▶ rule_label.push_back(' ');
Branch: 1 branch
BranchTrueFalseTotal
rule_label.push_back(' '); 0 0 0
6041  
6042 0 const unsigned char* rule = nullptr;
6043 0 unsigned rule_prefix_len = 0;
6044 0 ▶ for (unsigned prefix_len = 0; prefix_len + suffix_len <= form.len; prefix_len++) {
Branch: 1 branch
BranchTrueFalseTotal
for (unsigned prefix_len = 0; prefix_len + suffix_len <= form.len; prefix_len++) { 0 0 0
6045 0 ▶ if (prefix_len) rule_label.push_back(form.str[prefix_len - 1]);
Branch: 2 branches
BranchTrueFalseTotal
if (prefix_len) rule_label.push_back(form.str[prefix_len - 1]); 0 0 0
if (prefix_len) rule_label.push_back(form.str[prefix_len - 1]); 0 0 0
6046 0 ▶ const unsigned char* found = rules.at(rule_label.c_str(), rule_label.size(), [](pointer_decoder& data){ data.next<char>(data.next_2B()); });
Branch: 1 branch
BranchTrueFalseTotal
const unsigned char* found = rules.at(rule_label.c_str(), rule_label.size(), [](pointer_decoder& data){ data.next<char>(data.next_2B()); }); 0 0 0
6047 0 ▶ if (!found) break;
Branch: 1 branch
BranchTrueFalseTotal
if (!found) break; 0 0 0
6048 0 ▶ if (*(found += sizeof(uint16_t))) {
Branch: 1 branch
BranchTrueFalseTotal
if (*(found += sizeof(uint16_t))) { 0 0 0
6049 0 rule = found;
6050 0 rule_prefix_len = prefix_len;
6051 }
6052 }
6053  
6054 0 ▶ if (rule) {
Branch: 1 branch
BranchTrueFalseTotal
if (rule) { 0 0 0
6055 0 ▶ rule_label.resize(suffix_len + 1 + rule_prefix_len);
Branch: 1 branch
BranchTrueFalseTotal
rule_label.resize(suffix_len + 1 + rule_prefix_len); 0 0 0
6056 0 ▶ if (rule_label.size() > 1 && !contains(used, rule_label)) { // ignore rule ' '
Branch: 3 branches
BranchTrueFalseTotal
if (rule_label.size() > 1 && !contains(used, rule_label)) { // ignore rule ' ' 0 0 0
if (rule_label.size() > 1 && !contains(used, rule_label)) { // ignore rule ' ' 0 0 0
if (rule_label.size() > 1 && !contains(used, rule_label)) { // ignore rule ' ' 0 0 0
6057 0 ▶ if (used) used->push_back(rule_label);
Branch: 2 branches
BranchTrueFalseTotal
if (used) used->push_back(rule_label); 0 0 0
if (used) used->push_back(rule_label); 0 0 0
6058 0 ▶ for (int rules_len = *rule++; rules_len; rules_len--) {
Branch: 1 branch
BranchTrueFalseTotal
for (int rules_len = *rule++; rules_len; rules_len--) { 0 0 0
6059 0 unsigned pref_del_len = *rule++; const char* pref_del = (const char*)rule; rule += pref_del_len;
6060 0 unsigned pref_add_len = *rule++; const char* pref_add = (const char*)rule; rule += pref_add_len;
6061 0 unsigned suff_del_len = *rule++; const char* suff_del = (const char*)rule; rule += suff_del_len;
6062 0 unsigned suff_add_len = *rule++; const char* suff_add = (const char*)rule; rule += suff_add_len;
6063 0 unsigned tags_len = *rule++; const uint16_t* tags = (const uint16_t*)rule; rule += tags_len * sizeof(uint16_t);
6064  
6065 0 ▶ if (pref_del_len + suff_del_len > form.len ||
Branch: 1 branch
BranchTrueFalseTotal
if (pref_del_len + suff_del_len > form.len || 0 0 0
6066 0 ▶ (pref_del_len && !small_memeq(pref_del, form.str, pref_del_len)) ||
Branch: 2 branches
BranchTrueFalseTotal
(pref_del_len && !small_memeq(pref_del, form.str, pref_del_len)) || 0 0 0
(pref_del_len && !small_memeq(pref_del, form.str, pref_del_len)) || 0 0 0
6067 0 ▶ (suff_del_len && !small_memeq(suff_del, form.str + form.len - suff_del_len, suff_del_len)) ||
Branch: 3 branches
BranchTrueFalseTotal
(suff_del_len && !small_memeq(suff_del, form.str + form.len - suff_del_len, suff_del_len)) || 0 0 0
(suff_del_len && !small_memeq(suff_del, form.str + form.len - suff_del_len, suff_del_len)) || 0 0 0
(suff_del_len && !small_memeq(suff_del, form.str + form.len - suff_del_len, suff_del_len)) || 0 0 0
6068 0 ▶ (form.len + pref_add_len - pref_del_len + suff_add_len - suff_del_len == 0))
Branch: 1 branch
BranchTrueFalseTotal
(form.len + pref_add_len - pref_del_len + suff_add_len - suff_del_len == 0)) 0 0 0
6069 0 continue;
6070  
6071 0 string lemma;
6072 0 ▶ lemma.reserve(form.len + pref_add_len - pref_del_len + suff_add_len - suff_del_len);
Branch: 1 branch
BranchTrueFalseTotal
lemma.reserve(form.len + pref_add_len - pref_del_len + suff_add_len - suff_del_len); 0 0 0
6073 0 ▶ if (pref_add_len) lemma.append(pref_add, pref_add_len);
Branch: 2 branches
BranchTrueFalseTotal
if (pref_add_len) lemma.append(pref_add, pref_add_len); 0 0 0
if (pref_add_len) lemma.append(pref_add, pref_add_len); 0 0 0
6074 0 ▶ if (pref_del_len + suff_del_len < form.len) lemma.append(form.str + pref_del_len, form.len - pref_del_len - suff_del_len);
Branch: 2 branches
BranchTrueFalseTotal
if (pref_del_len + suff_del_len < form.len) lemma.append(form.str + pref_del_len, form.len - pref_del_len - suff_del_len); 0 0 0
if (pref_del_len + suff_del_len < form.len) lemma.append(form.str + pref_del_len, form.len - pref_del_len - suff_del_len); 0 0 0
6075 0 ▶ if (suff_add_len) lemma.append(suff_add, suff_add_len);
Branch: 2 branches
BranchTrueFalseTotal
if (suff_add_len) lemma.append(suff_add, suff_add_len); 0 0 0
if (suff_add_len) lemma.append(suff_add, suff_add_len); 0 0 0
6076 0 ▶ while (tags_len--)
Branch: 1 branch
BranchTrueFalseTotal
while (tags_len--) 0 0 0
6077 0 ▶ lemmas.emplace_back(lemma, this->tags[unaligned_load_inc<uint16_t>(tags)]);
Branch: 1 branch
BranchTrueFalseTotal
lemmas.emplace_back(lemma, this->tags[unaligned_load_inc<uint16_t>(tags)]); 0 0 0
6078 0 }
6079 }
6080 0 break;
6081 }
6082 }
6083  
6084 // If nothing was found, use default tag.
6085 0 ▶ if (lemmas.size() == lemmas_initial_size)
Branch: 1 branch
BranchTrueFalseTotal
if (lemmas.size() == lemmas_initial_size) 0 0 0
6086 0 ▶ if (!contains(used, string())) {
Branch: 1 branch
BranchTrueFalseTotal
if (!contains(used, string())) { 0 0 0
6087 0 ▶ if (used) used->push_back(string());
Branch: 2 branches
BranchTrueFalseTotal
if (used) used->push_back(string()); 0 0 0
if (used) used->push_back(string()); 0 0 0
6088 0 ▶ lemmas.emplace_back(string(form.str, form.len), tags[default_tag]);
Branch: 2 branches
BranchTrueFalseTotal
lemmas.emplace_back(string(form.str, form.len), tags[default_tag]); 0 0 0
lemmas.emplace_back(string(form.str, form.len), tags[default_tag]); 0 0 0
6089 }
6090 0 }
6091  
6092 /////////
6093 // File: morpho/tag_filter.cpp
6094 /////////
6095  
6096 // This file is part of MorphoDiTa <http://github.com/ufal/morphodita/>.
6097 //
6098 // Copyright 2015 Institute of Formal and Applied Linguistics, Faculty of
6099 // Mathematics and Physics, Charles University in Prague, Czech Republic.
6100 //
6101 // This Source Code Form is subject to the terms of the Mozilla Public
6102 // License, v. 2.0. If a copy of the MPL was not distributed with this
6103 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
6104  
6105 4 tag_filter::tag_filter(const char* filter) {
6106 4 ▶ if (!filter) return;
Branch: 1 branch
BranchTrueFalseTotal
if (!filter) return; 0 4 4
6107  
6108 4 ▶ wildcard.assign(filter);
Branch: 1 branch
BranchTrueFalseTotal
wildcard.assign(filter); 4 0 4
6109 4 filter = wildcard.c_str();
6110  
6111 10 ▶ for (int tag_pos = 0, filter_pos = 0; filter[filter_pos]; tag_pos++, filter_pos++) {
Branch: 1 branch
BranchTrueFalseTotal
for (int tag_pos = 0, filter_pos = 0; filter[filter_pos]; tag_pos++, filter_pos++) { 6 4 10
6112 6 ▶ if (filter[filter_pos] == '?') continue;
Branch: 1 branch
BranchTrueFalseTotal
if (filter[filter_pos] == '?') continue; 1 5 6
6113 5 ▶ if (filter[filter_pos] == '[') {
Branch: 1 branch
BranchTrueFalseTotal
if (filter[filter_pos] == '[') { 3 2 5
6114 3 filter_pos++;
6115  
6116 3 bool negate = false;
6117 3 ▶ if (filter[filter_pos] == '^') negate = true, filter_pos++;
Branch: 1 branch
BranchTrueFalseTotal
if (filter[filter_pos] == '^') negate = true, filter_pos++; 1 2 3
6118  
6119 3 int chars_start = filter_pos;
6120 7 ▶ for (bool first = true; filter[filter_pos] && (first || filter[filter_pos] != ']'); first = false)
Branch: 3 branches
BranchTrueFalseTotal
for (bool first = true; filter[filter_pos] && (first || filter[filter_pos] != ']'); first = false) 7 0 7
for (bool first = true; filter[filter_pos] && (first || filter[filter_pos] != ']'); first = false) 3 4 7
for (bool first = true; filter[filter_pos] && (first || filter[filter_pos] != ']'); first = false) 1 3 4
6121 4 filter_pos++;
6122  
6123 3 ▶ filters.emplace_back(tag_pos, negate, chars_start, filter_pos - chars_start);
Branch: 1 branch
BranchTrueFalseTotal
filters.emplace_back(tag_pos, negate, chars_start, filter_pos - chars_start); 3 0 3
6124 3 ▶ if (!filter[filter_pos]) break;
Branch: 1 branch
BranchTrueFalseTotal
if (!filter[filter_pos]) break; 0 3 3
6125 } else {
6126 2 ▶ filters.emplace_back(tag_pos, false, filter_pos, 1);
Branch: 1 branch
BranchTrueFalseTotal
filters.emplace_back(tag_pos, false, filter_pos, 1); 2 0 2
6127 }
6128 }
6129 }
6130  
6131 /////////
6132 // File: tagger/tagger.h
6133 /////////
6134  
6135 // This file is part of MorphoDiTa <http://github.com/ufal/morphodita/>.
6136 //
6137 // Copyright 2015 Institute of Formal and Applied Linguistics, Faculty of
6138 // Mathematics and Physics, Charles University in Prague, Czech Republic.
6139 //
6140 // This Source Code Form is subject to the terms of the Mozilla Public
6141 // License, v. 2.0. If a copy of the MPL was not distributed with this
6142 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
6143  
6144 class tagger {
6145 public:
6146 0 virtual ~tagger() {}
6147  
6148 static tagger* load(const char* fname);
6149 static tagger* load(istream& is);
6150  
6151 // Return morpho associated with the tagger. Do not delete the pointer, it is
6152 // owned by the tagger instance and deleted in the tagger destructor.
6153 virtual const morpho* get_morpho() const = 0;
6154  
6155 // Perform morphologic analysis and subsequent disambiguation.
6156 virtual void tag(const vector<string_piece>& forms, vector<tagged_lemma>& tags, morpho::guesser_mode guesser = morpho::GUESSER_UNSPECIFIED) const = 0;
6157  
6158 // Perform disambiguation only on given analyses.
6159 virtual void tag_analyzed(const vector<string_piece>& forms, const vector<vector<tagged_lemma>>& analyses, vector<int>& tags) const = 0;
6160  
6161 // Construct a new tokenizer instance appropriate for this tagger.
6162 // Can return NULL if no such tokenizer exists.
6163 // Is equal to get_morpho()->new_tokenizer.
6164 tokenizer* new_tokenizer() const;
6165 };
6166  
6167 /////////
6168 // File: tagger/elementary_features.h
6169 /////////
6170  
6171 // This file is part of MorphoDiTa <http://github.com/ufal/morphodita/>.
6172 //
6173 // Copyright 2015 Institute of Formal and Applied Linguistics, Faculty of
6174 // Mathematics and Physics, Charles University in Prague, Czech Republic.
6175 //
6176 // This Source Code Form is subject to the terms of the Mozilla Public
6177 // License, v. 2.0. If a copy of the MPL was not distributed with this
6178 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
6179  
6180 // Declarations
6181 enum elementary_feature_type { PER_FORM, PER_TAG, DYNAMIC };
6182 enum elementary_feature_range { ONLY_CURRENT, ANY_OFFSET };
6183  
6184 typedef uint32_t elementary_feature_value;
6185 enum :elementary_feature_value { elementary_feature_unknown = 0, elementary_feature_empty = 1 };
6186  
6187 struct elementary_feature_description {
6188 string name;
6189 elementary_feature_type type;
6190 elementary_feature_range range;
6191 int index;
6192 int map_index;
6193 };
6194  
6195 template<class Map>
6196 class elementary_features {
6197 public:
6198 bool load(istream& is);
6199 bool save(ostream& out);
6200  
6201 vector<Map> maps;
6202 };
6203  
6204 class persistent_elementary_feature_map : public persistent_unordered_map {
6205 public:
6206 26 persistent_elementary_feature_map() : persistent_unordered_map() {}
6207 persistent_elementary_feature_map(const persistent_unordered_map&& map) : persistent_unordered_map(map) {}
6208  
6209 120 elementary_feature_value value(const char* feature, int len) const {
6210 120 auto* it = at_typed<elementary_feature_value>(feature, len);
6211 120 ▶ return it ? unaligned_load<elementary_feature_value>(it) : elementary_feature_unknown;
Branch: 1 branch
BranchTrueFalseTotal
return it ? unaligned_load<elementary_feature_value>(it) : elementary_feature_unknown; 45 75 120
6212 }
6213 };
6214  
6215 // Definitions
6216 template <class Map>
6217 1 inline bool elementary_features<Map>::load(istream& is) {
6218 1 binary_decoder data;
6219 1 ▶ if (!compressor::load(is, data)) return false;
Branch: 2 branches
BranchTrueFalseTotal
if (!compressor::load(is, data)) return false; 1 0 1
if (!compressor::load(is, data)) return false; 0 1 1
6220  
6221 try {
6222 1 ▶ maps.resize(data.next_1B());
Branch: 2 branches
BranchTrueFalseTotal
maps.resize(data.next_1B()); 1 0 1
maps.resize(data.next_1B()); 1 0 1
6223 27 ▶ for (auto&& map : maps)
Branch: 1 branch
BranchTrueFalseTotal
for (auto&& map : maps) 26 1 27
6224 26 ▶ map.load(data);
Branch: 2 branches
BranchTrueFalseTotal
map.load(data); 26 0 26
map.load(data); 0 0 0
6225 } catch (binary_decoder_error&) {
6226 return false;
6227 }
6228  
6229 1 return data.is_end();
6230 1 }
6231  
6232 /////////
6233 // File: tagger/vli.h
6234 /////////
6235  
6236 // This file is part of MorphoDiTa <http://github.com/ufal/morphodita/>.
6237 //
6238 // Copyright 2015 Institute of Formal and Applied Linguistics, Faculty of
6239 // Mathematics and Physics, Charles University in Prague, Czech Republic.
6240 //
6241 // This Source Code Form is subject to the terms of the Mozilla Public
6242 // License, v. 2.0. If a copy of the MPL was not distributed with this
6243 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
6244  
6245 // Declarations
6246 template <class T>
6247 class vli {
6248 public:
6249 static int max_length();
6250 static void encode(T value, char*& where);
6251 static T decode(const char*& from);
6252 };
6253  
6254 // Definitions
6255 template <>
6256 22 inline int vli<uint32_t>::max_length() {
6257 22 return 5;
6258 }
6259  
6260 template <>
6261 426 inline void vli<uint32_t>::encode(uint32_t value, char*& where) {
6262 426 ▶ if (value < 0x80) *where++ = value;
Branch: 1 branch
BranchTrueFalseTotal
if (value < 0x80) *where++ = value; 426 0 426
6263 0 ▶ else if (value < 0x4000) *where++ = (value >> 7) | 0x80u, *where++ = value & 0x7Fu;
Branch: 1 branch
BranchTrueFalseTotal
else if (value < 0x4000) *where++ = (value >> 7) | 0x80u, *where++ = value & 0x7Fu; 0 0 0
6264 0 ▶ else if (value < 0x200000) *where++ = (value >> 14) | 0x80u, *where++ = ((value >> 7) & 0x7Fu) | 0x80u, *where++ = value & 0x7Fu;
Branch: 1 branch
BranchTrueFalseTotal
else if (value < 0x200000) *where++ = (value >> 14) | 0x80u, *where++ = ((value >> 7) & 0x7Fu) | 0x80u, *where++ = value & 0x7Fu; 0 0 0
6265 0 ▶ else if (value < 0x10000000) *where++ = (value >> 21) | 0x80u, *where++ = ((value >> 14) & 0x7Fu) | 0x80u, *where++ = ((value >> 7) & 0x7Fu) | 0x80u, *where++ = value & 0x7Fu;
Branch: 1 branch
BranchTrueFalseTotal
else if (value < 0x10000000) *where++ = (value >> 21) | 0x80u, *where++ = ((value >> 14) & 0x7Fu) | 0x80u, *where++ = ((value >> 7) & 0x7Fu) | 0x80u, *where++ = value & 0x7Fu; 0 0 0
6266 0 else *where++ = (value >> 28) | 0x80u, *where++ = ((value >> 21) & 0x7Fu) | 0x80u, *where++ = ((value >> 14) & 0x7Fu) | 0x80u, *where++ = ((value >> 7) & 0x7Fu) | 0x80u, *where++ = value & 0x7Fu;
6267 426 }
6268  
6269 template <>
6270 inline uint32_t vli<uint32_t>::decode(const char*& from) {
6271 uint32_t value = 0;
6272 while (((unsigned char)(*from)) & 0x80u) value = (value << 7) | (((unsigned char)(*from++)) ^ 0x80u);
6273 value = (value << 7) | ((unsigned char)(*from++));
6274 return value;
6275 }
6276  
6277 /////////
6278 // File: tagger/feature_sequences.h
6279 /////////
6280  
6281 // This file is part of MorphoDiTa <http://github.com/ufal/morphodita/>.
6282 //
6283 // Copyright 2015 Institute of Formal and Applied Linguistics, Faculty of
6284 // Mathematics and Physics, Charles University in Prague, Czech Republic.
6285 //
6286 // This Source Code Form is subject to the terms of the Mozilla Public
6287 // License, v. 2.0. If a copy of the MPL was not distributed with this
6288 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
6289  
6290 // Declarations
6291 typedef int32_t feature_sequence_score;
6292 typedef int64_t feature_sequences_score;
6293  
6294 struct feature_sequence_element {
6295 elementary_feature_type type;
6296 int elementary_index;
6297 int sequence_index;
6298  
6299 45 feature_sequence_element() {}
6300 feature_sequence_element(elementary_feature_type type, int elementary_index, int sequence_index) : type(type), elementary_index(elementary_index), sequence_index(sequence_index) {}
6301 };
6302  
6303 struct feature_sequence {
6304 vector<feature_sequence_element> elements;
6305 int dependant_range = 1;
6306 };
6307  
6308 template <class ElementaryFeatures, class Map>
6309 class feature_sequences {
6310 public:
6311 typedef typename ElementaryFeatures::per_form_features per_form_features;
6312 typedef typename ElementaryFeatures::per_tag_features per_tag_features;
6313 typedef typename ElementaryFeatures::dynamic_features dynamic_features;
6314  
6315 void parse(int window_size, istream& is);
6316 bool load(istream& is);
6317 bool save(ostream& os);
6318  
6319 struct cache;
6320  
6321 inline void initialize_sentence(const vector<string_piece>& forms, const vector<vector<tagged_lemma>>& analyses, cache& c) const;
6322 inline void compute_dynamic_features(int form_index, int tag_index, const dynamic_features* prev_dynamic, dynamic_features& dynamic, cache& c) const;
6323 inline feature_sequences_score score(int form_index, int tags_window[], int tags_unchanged, dynamic_features& dynamic, cache& c) const;
6324 void feature_keys(int form_index, int tags_window[], int tags_unchanged, dynamic_features& dynamic, vector<string>& keys, cache& c) const;
6325  
6326 ElementaryFeatures elementary;
6327 vector<Map> scores;
6328 vector<feature_sequence> sequences;
6329 };
6330  
6331 class persistent_feature_sequence_map : public persistent_unordered_map {
6332 public:
6333 21 persistent_feature_sequence_map() : persistent_unordered_map() {}
6334 persistent_feature_sequence_map(const persistent_unordered_map&& map) : persistent_unordered_map(map) {}
6335  
6336 158 feature_sequence_score score(const char* feature, int len) const {
6337 158 auto* it = at_typed<feature_sequence_score>(feature, len);
6338 158 ▶ return it ? unaligned_load<feature_sequence_score>(it) : 0;
Branch: 1 branch
BranchTrueFalseTotal
return it ? unaligned_load<feature_sequence_score>(it) : 0; 100 58 158
6339 }
6340 };
6341  
6342 template <class ElementaryFeatures> using persistent_feature_sequences = feature_sequences<ElementaryFeatures, persistent_feature_sequence_map>;
6343  
6344 // Definitions
6345 template <class ElementaryFeatures, class Map>
6346 0 inline bool feature_sequences<ElementaryFeatures, Map>::load(istream& is) {
6347 0 ▶ if (!elementary.load(is)) return false;
Branch: 6 branches
BranchTrueFalseTotal
if (!elementary.load(is)) return false; 0 0 0
if (!elementary.load(is)) return false; 0 0 0
if (!elementary.load(is)) return false; 1 0 1
if (!elementary.load(is)) return false; 0 1 1
if (!elementary.load(is)) return false; 0 0 0
if (!elementary.load(is)) return false; 0 0 0
6348  
6349 0 binary_decoder data;
6350 0 ▶ if (!compressor::load(is, data)) return false;
Branch: 6 branches
BranchTrueFalseTotal
if (!compressor::load(is, data)) return false; 0 0 0
if (!compressor::load(is, data)) return false; 0 0 0
if (!compressor::load(is, data)) return false; 1 0 1
if (!compressor::load(is, data)) return false; 0 1 1
if (!compressor::load(is, data)) return false; 0 0 0
if (!compressor::load(is, data)) return false; 0 0 0
6351  
6352 try {
6353 0 ▶ sequences.resize(data.next_1B());
Branch: 6 branches
BranchTrueFalseTotal
sequences.resize(data.next_1B()); 0 0 0
sequences.resize(data.next_1B()); 0 0 0
sequences.resize(data.next_1B()); 1 0 1
sequences.resize(data.next_1B()); 1 0 1
sequences.resize(data.next_1B()); 0 0 0
sequences.resize(data.next_1B()); 0 0 0
6354 0 ▶ for (auto&& sequence : sequences) {
Branch: 3 branches
BranchTrueFalseTotal
for (auto&& sequence : sequences) { 0 0 0
for (auto&& sequence : sequences) { 21 1 22
for (auto&& sequence : sequences) { 0 0 0
6355 0 ▶ sequence.dependant_range = data.next_4B();
Branch: 3 branches
BranchTrueFalseTotal
sequence.dependant_range = data.next_4B(); 0 0 0
sequence.dependant_range = data.next_4B(); 21 0 21
sequence.dependant_range = data.next_4B(); 0 0 0
6356 0 ▶ sequence.elements.resize(data.next_1B());
Branch: 6 branches
BranchTrueFalseTotal
sequence.elements.resize(data.next_1B()); 0 0 0
sequence.elements.resize(data.next_1B()); 0 0 0
sequence.elements.resize(data.next_1B()); 21 0 21
sequence.elements.resize(data.next_1B()); 21 0 21
sequence.elements.resize(data.next_1B()); 0 0 0
sequence.elements.resize(data.next_1B()); 0 0 0
6357 0 ▶ for (auto&& element : sequence.elements) {
Branch: 3 branches
BranchTrueFalseTotal
for (auto&& element : sequence.elements) { 0 0 0
for (auto&& element : sequence.elements) { 45 21 66
for (auto&& element : sequence.elements) { 0 0 0
6358 0 ▶ element.type = elementary_feature_type(data.next_4B());
Branch: 3 branches
BranchTrueFalseTotal
element.type = elementary_feature_type(data.next_4B()); 0 0 0
element.type = elementary_feature_type(data.next_4B()); 45 0 45
element.type = elementary_feature_type(data.next_4B()); 0 0 0
6359 0 ▶ element.elementary_index = data.next_4B();
Branch: 3 branches
BranchTrueFalseTotal
element.elementary_index = data.next_4B(); 0 0 0
element.elementary_index = data.next_4B(); 45 0 45
element.elementary_index = data.next_4B(); 0 0 0
6360 0 ▶ element.sequence_index = data.next_4B();
Branch: 3 branches
BranchTrueFalseTotal
element.sequence_index = data.next_4B(); 0 0 0
element.sequence_index = data.next_4B(); 45 0 45
element.sequence_index = data.next_4B(); 0 0 0
6361 }
6362 }
6363  
6364 0 ▶ scores.resize(data.next_1B());
Branch: 6 branches
BranchTrueFalseTotal
scores.resize(data.next_1B()); 0 0 0
scores.resize(data.next_1B()); 0 0 0
scores.resize(data.next_1B()); 1 0 1
scores.resize(data.next_1B()); 1 0 1
scores.resize(data.next_1B()); 0 0 0
scores.resize(data.next_1B()); 0 0 0
6365 0 ▶ for (auto&& score : scores)
Branch: 3 branches
BranchTrueFalseTotal
for (auto&& score : scores) 0 0 0
for (auto&& score : scores) 21 1 22
for (auto&& score : scores) 0 0 0
6366 0 ▶ score.load(data);
Branch: 6 branches
BranchTrueFalseTotal
score.load(data); 0 0 0
score.load(data); 0 0 0
score.load(data); 21 0 21
score.load(data); 0 0 0
score.load(data); 0 0 0
score.load(data); 0 0 0
6367 } catch (binary_decoder_error&) {
6368 return false;
6369 }
6370  
6371 0 return data.is_end();
6372 0 }
6373  
6374 template <class ElementaryFeatures, class Map>
6375 struct feature_sequences<ElementaryFeatures, Map>::cache {
6376 const vector<string_piece>* forms;
6377 const vector<vector<tagged_lemma>>* analyses;
6378 vector<per_form_features> elementary_per_form;
6379 vector<vector<per_tag_features>> elementary_per_tag;
6380  
6381 struct cache_element {
6382 vector<char> key;
6383 int key_size;
6384 feature_sequence_score score;
6385  
6386 0 ▶ cache_element(int elements) : key(vli<elementary_feature_value>::max_length() * elements), key_size(0), score(0) {}
Branch: 3 branches
BranchTrueFalseTotal
cache_element(int elements) : key(vli<elementary_feature_value>::max_length() * elements), key_size(0), score(0) {} 0 0 0
cache_element(int elements) : key(vli<elementary_feature_value>::max_length() * elements), key_size(0), score(0) {} 21 0 21
cache_element(int elements) : key(vli<elementary_feature_value>::max_length() * elements), key_size(0), score(0) {} 0 0 0
6387 };
6388 vector<cache_element> caches;
6389 vector<const per_tag_features*> window;
6390 vector<char> key;
6391 feature_sequences_score score;
6392  
6393 0 cache(const feature_sequences<ElementaryFeatures, Map>& self) : score(0) {
6394 0 ▶ caches.reserve(self.sequences.size());
Branch: 3 branches
BranchTrueFalseTotal
caches.reserve(self.sequences.size()); 0 0 0
caches.reserve(self.sequences.size()); 1 0 1
caches.reserve(self.sequences.size()); 0 0 0
6395 0 int max_sequence_elements = 0, max_window_size = 1;
6396 0 ▶ for (auto&& sequence : self.sequences) {
Branch: 3 branches
BranchTrueFalseTotal
for (auto&& sequence : self.sequences) { 0 0 0
for (auto&& sequence : self.sequences) { 21 1 22
for (auto&& sequence : self.sequences) { 0 0 0
6397 0 ▶ caches.emplace_back(int(sequence.elements.size()));
Branch: 3 branches
BranchTrueFalseTotal
caches.emplace_back(int(sequence.elements.size())); 0 0 0
caches.emplace_back(int(sequence.elements.size())); 21 0 21
caches.emplace_back(int(sequence.elements.size())); 0 0 0
6398 0 ▶ if (int(sequence.elements.size()) > max_sequence_elements) max_sequence_elements = sequence.elements.size();
Branch: 3 branches
BranchTrueFalseTotal
if (int(sequence.elements.size()) > max_sequence_elements) max_sequence_elements = sequence.elements.size(); 0 0 0
if (int(sequence.elements.size()) > max_sequence_elements) max_sequence_elements = sequence.elements.size(); 1 20 21
if (int(sequence.elements.size()) > max_sequence_elements) max_sequence_elements = sequence.elements.size(); 0 0 0
6399 0 ▶ for (auto&& element : sequence.elements)
Branch: 3 branches
BranchTrueFalseTotal
for (auto&& element : sequence.elements) 0 0 0
for (auto&& element : sequence.elements) 45 21 66
for (auto&& element : sequence.elements) 0 0 0
6400 0 ▶ if (element.type == PER_TAG && 1 - element.sequence_index > max_window_size)
Branch: 6 branches
BranchTrueFalseTotal
if (element.type == PER_TAG && 1 - element.sequence_index > max_window_size) 0 0 0
if (element.type == PER_TAG && 1 - element.sequence_index > max_window_size) 0 0 0
if (element.type == PER_TAG && 1 - element.sequence_index > max_window_size) 26 19 45
if (element.type == PER_TAG && 1 - element.sequence_index > max_window_size) 2 24 26
if (element.type == PER_TAG && 1 - element.sequence_index > max_window_size) 0 0 0
if (element.type == PER_TAG && 1 - element.sequence_index > max_window_size) 0 0 0
6401 0 max_window_size = 1 - element.sequence_index;
6402 }
6403 0 ▶ key.resize(max_sequence_elements * vli<elementary_feature_value>::max_length());
Branch: 3 branches
BranchTrueFalseTotal
key.resize(max_sequence_elements * vli<elementary_feature_value>::max_length()); 0 0 0
key.resize(max_sequence_elements * vli<elementary_feature_value>::max_length()); 1 0 1
key.resize(max_sequence_elements * vli<elementary_feature_value>::max_length()); 0 0 0
6404 0 ▶ window.resize(max_window_size);
Branch: 3 branches
BranchTrueFalseTotal
window.resize(max_window_size); 0 0 0
window.resize(max_window_size); 1 0 1
window.resize(max_window_size); 0 0 0
6405 0 }
6406 };
6407  
6408 template <class ElementaryFeatures, class Map>
6409 0 void feature_sequences<ElementaryFeatures, Map>::initialize_sentence(const vector<string_piece>& forms, const vector<vector<tagged_lemma>>& analyses, cache& c) const {
6410 // Store forms and forms_size
6411 0 c.forms = &forms;
6412 0 c.analyses = &analyses;
6413  
6414 // Enlarge elementary features vectors if needed
6415 0 ▶ if (forms.size() > c.elementary_per_form.size()) c.elementary_per_form.resize(forms.size() * 2);
Branch: 3 branches
BranchTrueFalseTotal
if (forms.size() > c.elementary_per_form.size()) c.elementary_per_form.resize(forms.size() * 2); 0 0 0
if (forms.size() > c.elementary_per_form.size()) c.elementary_per_form.resize(forms.size() * 2); 1 1 2
if (forms.size() > c.elementary_per_form.size()) c.elementary_per_form.resize(forms.size() * 2); 0 0 0
6416 0 ▶ if (forms.size() > c.elementary_per_tag.size()) c.elementary_per_tag.resize(forms.size() * 2);
Branch: 3 branches
BranchTrueFalseTotal
if (forms.size() > c.elementary_per_tag.size()) c.elementary_per_tag.resize(forms.size() * 2); 0 0 0
if (forms.size() > c.elementary_per_tag.size()) c.elementary_per_tag.resize(forms.size() * 2); 1 1 2
if (forms.size() > c.elementary_per_tag.size()) c.elementary_per_tag.resize(forms.size() * 2); 0 0 0
6417 0 ▶ for (unsigned i = 0; i < forms.size(); i++)
Branch: 3 branches
BranchTrueFalseTotal
for (unsigned i = 0; i < forms.size(); i++) 0 0 0
for (unsigned i = 0; i < forms.size(); i++) 6 2 8
for (unsigned i = 0; i < forms.size(); i++) 0 0 0
6418 0 ▶ if (analyses[i].size() > c.elementary_per_tag[i].size())
Branch: 3 branches
BranchTrueFalseTotal
if (analyses[i].size() > c.elementary_per_tag[i].size()) 0 0 0
if (analyses[i].size() > c.elementary_per_tag[i].size()) 4 2 6
if (analyses[i].size() > c.elementary_per_tag[i].size()) 0 0 0
6419 0 c.elementary_per_tag[i].resize(analyses[i].size() * 2);
6420  
6421 // Compute elementary features
6422 0 elementary.compute_features(forms, analyses, c.elementary_per_form, c.elementary_per_tag);
6423  
6424 // Clear score cache, because scores may have been modified
6425 0 c.score = 0;
6426 0 ▶ for (auto&& cache : c.caches)
Branch: 3 branches
BranchTrueFalseTotal
for (auto&& cache : c.caches) 0 0 0
for (auto&& cache : c.caches) 42 2 44
for (auto&& cache : c.caches) 0 0 0
6427 0 cache.key_size = cache.score = 0;
6428 0 }
6429  
6430 template <class ElementaryFeatures, class Map>
6431 0 void feature_sequences<ElementaryFeatures, Map>::compute_dynamic_features(int form_index, int tag_index, const dynamic_features* prev_dynamic, dynamic_features& dynamic, cache& c) const {
6432 0 ▶ elementary.compute_dynamic_features((*c.analyses)[form_index][tag_index], c.elementary_per_form[form_index], c.elementary_per_tag[form_index][tag_index], form_index > 0 ? prev_dynamic : nullptr, dynamic);
Branch: 3 branches
BranchTrueFalseTotal
elementary.compute_dynamic_features((*c.analyses)[form_index][tag_index], c.elementary_per_form[form_index], c.elementary_per_tag[form_index][tag_index], form_index > 0 ? prev_dynamic : nullptr, dynamic); 0 0 0
elementary.compute_dynamic_features((*c.analyses)[form_index][tag_index], c.elementary_per_form[form_index], c.elementary_per_tag[form_index][tag_index], form_index > 0 ? prev_dynamic : nullptr, dynamic); 24 5 29
elementary.compute_dynamic_features((*c.analyses)[form_index][tag_index], c.elementary_per_form[form_index], c.elementary_per_tag[form_index][tag_index], form_index > 0 ? prev_dynamic : nullptr, dynamic); 0 0 0
6433 0 }
6434  
6435 template <class ElementaryFeatures, class Map>
6436 0 feature_sequences_score feature_sequences<ElementaryFeatures, Map>::score(int form_index, int tags_window[], int tags_unchanged, dynamic_features& dynamic, cache& c) const {
6437 // Start by creating a window of per_tag_features*
6438 0 ▶ for (int i = 0; i < int(c.window.size()) && form_index - i >= 0; i++)
Branch: 9 branches
BranchTrueFalseTotal
for (int i = 0; i < int(c.window.size()) && form_index - i >= 0; i++) 0 0 0
for (int i = 0; i < int(c.window.size()) && form_index - i >= 0; i++) 0 0 0
for (int i = 0; i < int(c.window.size()) && form_index - i >= 0; i++) 0 0 0
for (int i = 0; i < int(c.window.size()) && form_index - i >= 0; i++) 80 12 92
for (int i = 0; i < int(c.window.size()) && form_index - i >= 0; i++) 64 16 80
for (int i = 0; i < int(c.window.size()) && form_index - i >= 0; i++) 64 28 92
for (int i = 0; i < int(c.window.size()) && form_index - i >= 0; i++) 0 0 0
for (int i = 0; i < int(c.window.size()) && form_index - i >= 0; i++) 0 0 0
for (int i = 0; i < int(c.window.size()) && form_index - i >= 0; i++) 0 0 0
6439 0 c.window[i] = &c.elementary_per_tag[form_index - i][tags_window[i]];
6440  
6441 // Compute the score
6442 0 feature_sequences_score result = c.score;
6443 0 ▶ for (unsigned i = 0; i < sequences.size(); i++) {
Branch: 3 branches
BranchTrueFalseTotal
for (unsigned i = 0; i < sequences.size(); i++) { 0 0 0
for (unsigned i = 0; i < sequences.size(); i++) { 314 12 326
for (unsigned i = 0; i < sequences.size(); i++) { 0 0 0
6444 0 ▶ if (tags_unchanged >= sequences[i].dependant_range)
Branch: 3 branches
BranchTrueFalseTotal
if (tags_unchanged >= sequences[i].dependant_range) 0 0 0
if (tags_unchanged >= sequences[i].dependant_range) 16 298 314
if (tags_unchanged >= sequences[i].dependant_range) 0 0 0
6445 0 break;
6446  
6447 0 char* key = c.key.data();
6448 0 ▶ for (unsigned j = 0; j < sequences[i].elements.size(); j++) {
Branch: 3 branches
BranchTrueFalseTotal
for (unsigned j = 0; j < sequences[i].elements.size(); j++) { 0 0 0
for (unsigned j = 0; j < sequences[i].elements.size(); j++) { 550 174 724
for (unsigned j = 0; j < sequences[i].elements.size(); j++) { 0 0 0
6449 0 auto& element = sequences[i].elements[j];
6450 elementary_feature_value value;
6451  
6452 0 switch (element.type) {
6453 0 case PER_FORM:
6454 0 ▶ value = form_index + element.sequence_index < 0 || unsigned(form_index + element.sequence_index) >= c.forms->size() ? elementary_feature_empty : c.elementary_per_form[form_index + element.sequence_index].values[element.elementary_index];
Branch: 6 branches
BranchTrueFalseTotal
value = form_index + element.sequence_index < 0 || unsigned(form_index + element.sequence_index) >= c.forms->size() ? elementary_feature_empty : c.elementary_per_form[form_index + element.sequence_index].values[element.elementary_index]; 0 0 0
value = form_index + element.sequence_index < 0 || unsigned(form_index + element.sequence_index) >= c.forms->size() ? elementary_feature_empty : c.elementary_per_form[form_index + element.sequence_index].values[element.elementary_index]; 0 0 0
value = form_index + element.sequence_index < 0 || unsigned(form_index + element.sequence_index) >= c.forms->size() ? elementary_feature_empty : c.elementary_per_form[form_index + element.sequence_index].values[element.elementary_index]; 136 16 152
value = form_index + element.sequence_index < 0 || unsigned(form_index + element.sequence_index) >= c.forms->size() ? elementary_feature_empty : c.elementary_per_form[form_index + element.sequence_index].values[element.elementary_index]; 126 10 136
value = form_index + element.sequence_index < 0 || unsigned(form_index + element.sequence_index) >= c.forms->size() ? elementary_feature_empty : c.elementary_per_form[form_index + element.sequence_index].values[element.elementary_index]; 0 0 0
value = form_index + element.sequence_index < 0 || unsigned(form_index + element.sequence_index) >= c.forms->size() ? elementary_feature_empty : c.elementary_per_form[form_index + element.sequence_index].values[element.elementary_index]; 0 0 0
6455 0 break;
6456 0 case PER_TAG:
6457 0 ▶ value = form_index + element.sequence_index < 0 ? elementary_feature_empty : c.window[-element.sequence_index]->values[element.elementary_index];
Branch: 3 branches
BranchTrueFalseTotal
value = form_index + element.sequence_index < 0 ? elementary_feature_empty : c.window[-element.sequence_index]->values[element.elementary_index]; 0 0 0
value = form_index + element.sequence_index < 0 ? elementary_feature_empty : c.window[-element.sequence_index]->values[element.elementary_index]; 380 18 398
value = form_index + element.sequence_index < 0 ? elementary_feature_empty : c.window[-element.sequence_index]->values[element.elementary_index]; 0 0 0
6458 0 break;
6459 0 case DYNAMIC:
6460 default:
6461 0 value = dynamic.values[element.elementary_index];
6462 }
6463  
6464 0 ▶ if (value == elementary_feature_unknown) {
Branch: 3 branches
BranchTrueFalseTotal
if (value == elementary_feature_unknown) { 0 0 0
if (value == elementary_feature_unknown) { 124 426 550
if (value == elementary_feature_unknown) { 0 0 0
6465 0 key = c.key.data();
6466 0 break;
6467 }
6468 0 vli<elementary_feature_value>::encode(value, key);
6469 }
6470  
6471 0 result -= c.caches[i].score;
6472 0 int key_size = key - c.key.data();
6473 0 ▶ if (!key_size) {
Branch: 3 branches
BranchTrueFalseTotal
if (!key_size) { 0 0 0
if (!key_size) { 124 174 298
if (!key_size) { 0 0 0
6474 0 c.caches[i].score = 0;
6475 0 c.caches[i].key_size = 0;
6476 0 ▶ } else if (key_size != c.caches[i].key_size || !small_memeq(c.key.data(), c.caches[i].key.data(), key_size)) {
Branch: 9 branches
BranchTrueFalseTotal
} else if (key_size != c.caches[i].key_size || !small_memeq(c.key.data(), c.caches[i].key.data(), key_size)) { 0 0 0
} else if (key_size != c.caches[i].key_size || !small_memeq(c.key.data(), c.caches[i].key.data(), key_size)) { 0 0 0
} else if (key_size != c.caches[i].key_size || !small_memeq(c.key.data(), c.caches[i].key.data(), key_size)) { 0 0 0
} else if (key_size != c.caches[i].key_size || !small_memeq(c.key.data(), c.caches[i].key.data(), key_size)) { 96 78 174
} else if (key_size != c.caches[i].key_size || !small_memeq(c.key.data(), c.caches[i].key.data(), key_size)) { 80 16 96
} else if (key_size != c.caches[i].key_size || !small_memeq(c.key.data(), c.caches[i].key.data(), key_size)) { 158 16 174
} else if (key_size != c.caches[i].key_size || !small_memeq(c.key.data(), c.caches[i].key.data(), key_size)) { 0 0 0
} else if (key_size != c.caches[i].key_size || !small_memeq(c.key.data(), c.caches[i].key.data(), key_size)) { 0 0 0
} else if (key_size != c.caches[i].key_size || !small_memeq(c.key.data(), c.caches[i].key.data(), key_size)) { 0 0 0
6477 0 ▶ c.caches[i].score = scores[i].score(c.key.data(), key_size);
Branch: 3 branches
BranchTrueFalseTotal
c.caches[i].score = scores[i].score(c.key.data(), key_size); 0 0 0
c.caches[i].score = scores[i].score(c.key.data(), key_size); 158 0 158
c.caches[i].score = scores[i].score(c.key.data(), key_size); 0 0 0
6478 0 c.caches[i].key_size = key_size;
6479 0 small_memcpy(c.caches[i].key.data(), c.key.data(), key_size);
6480 }
6481 0 result += c.caches[i].score;
6482 }
6483  
6484 0 c.score = result;
6485 0 return result;
6486 }
6487  
6488 template <class ElementaryFeatures, class Map>
6489 void feature_sequences<ElementaryFeatures, Map>::feature_keys(int form_index, int tags_window[], int tags_unchanged, dynamic_features& dynamic, vector<string>& keys, cache& c) const {
6490 score(form_index, tags_window, tags_unchanged, dynamic, c);
6491  
6492 keys.resize(c.caches.size());
6493 for (unsigned i = 0; i < c.caches.size(); i++)
6494 keys[i].assign(c.caches[i].key.data(), c.caches[i].key_size);
6495 }
6496  
6497 /////////
6498 // File: tagger/viterbi.h
6499 /////////
6500  
6501 // This file is part of MorphoDiTa <http://github.com/ufal/morphodita/>.
6502 //
6503 // Copyright 2015 Institute of Formal and Applied Linguistics, Faculty of
6504 // Mathematics and Physics, Charles University in Prague, Czech Republic.
6505 //
6506 // This Source Code Form is subject to the terms of the Mozilla Public
6507 // License, v. 2.0. If a copy of the MPL was not distributed with this
6508 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
6509  
6510 // Declarations
6511 template <class FeatureSequences>
6512 class viterbi {
6513 public:
6514 0 viterbi(const FeatureSequences& features, int decoding_order, int window_size)
6515 0 : features(features), decoding_order(decoding_order), window_size(window_size) {}
6516  
6517 struct cache;
6518 void tag(const vector<string_piece>& forms, const vector<vector<tagged_lemma>>& analyses, cache& c, vector<int>& tags) const;
6519  
6520 private:
6521 struct node;
6522  
6523 const FeatureSequences& features;
6524 int decoding_order, window_size;
6525 };
6526  
6527 // Definitions
6528 template <class FeatureSequences>
6529 struct viterbi<FeatureSequences>::cache {
6530 vector<node> nodes;
6531 typename FeatureSequences::cache features_cache;
6532  
6533 0 ▶ cache(const viterbi<FeatureSequences>& self) : features_cache(self.features) {}
Branch: 3 branches
BranchTrueFalseTotal
cache(const viterbi<FeatureSequences>& self) : features_cache(self.features) {} 0 0 0
cache(const viterbi<FeatureSequences>& self) : features_cache(self.features) {} 1 0 1
cache(const viterbi<FeatureSequences>& self) : features_cache(self.features) {} 0 0 0
6534 };
6535  
6536 template <class FeatureSequences>
6537 struct viterbi<FeatureSequences>::node {
6538 int tag;
6539 int prev;
6540 feature_sequences_score score;
6541 typename FeatureSequences::dynamic_features dynamic;
6542 };
6543  
6544 template <class FeatureSequences>
6545 0 void viterbi<FeatureSequences>::tag(const vector<string_piece>& forms, const vector<vector<tagged_lemma>>& analyses, cache& c, vector<int>& tags) const {
6546 0 ▶ if (!forms.size()) return;
Branch: 3 branches
BranchTrueFalseTotal
if (!forms.size()) return; 0 0 0
if (!forms.size()) return; 0 2 2
if (!forms.size()) return; 0 0 0
6547  
6548 // Count number of nodes and allocate
6549 0 unsigned nodes = 0;
6550 0 ▶ for (unsigned i = 0, states = 1; i < forms.size(); i++) {
Branch: 3 branches
BranchTrueFalseTotal
for (unsigned i = 0, states = 1; i < forms.size(); i++) { 0 0 0
for (unsigned i = 0, states = 1; i < forms.size(); i++) { 6 2 8
for (unsigned i = 0, states = 1; i < forms.size(); i++) { 0 0 0
6551 0 ▶ if (analyses[i].empty()) return;
Branch: 3 branches
BranchTrueFalseTotal
if (analyses[i].empty()) return; 0 0 0
if (analyses[i].empty()) return; 0 6 6
if (analyses[i].empty()) return; 0 0 0
6552 0 ▶ states = (i+1 >= unsigned(decoding_order) ? states / analyses[i-decoding_order+1].size() : states) * analyses[i].size();
Branch: 3 branches
BranchTrueFalseTotal
states = (i+1 >= unsigned(decoding_order) ? states / analyses[i-decoding_order+1].size() : states) * analyses[i].size(); 0 0 0
states = (i+1 >= unsigned(decoding_order) ? states / analyses[i-decoding_order+1].size() : states) * analyses[i].size(); 2 4 6
states = (i+1 >= unsigned(decoding_order) ? states / analyses[i-decoding_order+1].size() : states) * analyses[i].size(); 0 0 0
6553 0 nodes += states;
6554 }
6555 0 ▶ if (nodes > c.nodes.size()) c.nodes.resize(nodes);
Branch: 6 branches
BranchTrueFalseTotal
if (nodes > c.nodes.size()) c.nodes.resize(nodes); 0 0 0
if (nodes > c.nodes.size()) c.nodes.resize(nodes); 0 0 0
if (nodes > c.nodes.size()) c.nodes.resize(nodes); 2 0 2
if (nodes > c.nodes.size()) c.nodes.resize(nodes); 2 0 2
if (nodes > c.nodes.size()) c.nodes.resize(nodes); 0 0 0
if (nodes > c.nodes.size()) c.nodes.resize(nodes); 0 0 0
6556  
6557 // Init feature sequences
6558 0 ▶ features.initialize_sentence(forms, analyses, c.features_cache);
Branch: 3 branches
BranchTrueFalseTotal
features.initialize_sentence(forms, analyses, c.features_cache); 0 0 0
features.initialize_sentence(forms, analyses, c.features_cache); 2 0 2
features.initialize_sentence(forms, analyses, c.features_cache); 0 0 0
6559  
6560 0 int window_stack[16]; vector<int> window_heap;
6561 0 ▶ int* window = window_size <= 16 ? window_stack : (window_heap.resize(window_size), window_heap.data());
Branch: 6 branches
BranchTrueFalseTotal
int* window = window_size <= 16 ? window_stack : (window_heap.resize(window_size), window_heap.data()); 0 0 0
int* window = window_size <= 16 ? window_stack : (window_heap.resize(window_size), window_heap.data()); 0 0 0
int* window = window_size <= 16 ? window_stack : (window_heap.resize(window_size), window_heap.data()); 2 0 2
int* window = window_size <= 16 ? window_stack : (window_heap.resize(window_size), window_heap.data()); 0 0 0
int* window = window_size <= 16 ? window_stack : (window_heap.resize(window_size), window_heap.data()); 0 0 0
int* window = window_size <= 16 ? window_stack : (window_heap.resize(window_size), window_heap.data()); 0 0 0
6562 typename FeatureSequences::dynamic_features dynamic;
6563 feature_sequences_score score;
6564  
6565 // Compute all nodes score
6566 0 int nodes_prev = -1, nodes_now = 0;
6567 0 ▶ for (unsigned i = 0; i < forms.size(); i++) {
Branch: 3 branches
BranchTrueFalseTotal
for (unsigned i = 0; i < forms.size(); i++) { 0 0 0
for (unsigned i = 0; i < forms.size(); i++) { 6 2 8
for (unsigned i = 0; i < forms.size(); i++) { 0 0 0
6568 0 int nodes_next = nodes_now;
6569  
6570 0 ▶ for (int j = 0; j < window_size; j++) window[j] = -1;
Branch: 3 branches
BranchTrueFalseTotal
for (int j = 0; j < window_size; j++) window[j] = -1; 0 0 0
for (int j = 0; j < window_size; j++) window[j] = -1; 18 6 24
for (int j = 0; j < window_size; j++) window[j] = -1; 0 0 0
6571 0 ▶ for (int tag = 0; tag < int(analyses[i].size()); tag++)
Branch: 3 branches
BranchTrueFalseTotal
for (int tag = 0; tag < int(analyses[i].size()); tag++) 0 0 0
for (int tag = 0; tag < int(analyses[i].size()); tag++) 13 6 19
for (int tag = 0; tag < int(analyses[i].size()); tag++) 0 0 0
6572 0 ▶ for (int prev = nodes_prev; prev < nodes_now; prev++) {
Branch: 3 branches
BranchTrueFalseTotal
for (int prev = nodes_prev; prev < nodes_now; prev++) { 0 0 0
for (int prev = nodes_prev; prev < nodes_now; prev++) { 29 13 42
for (int prev = nodes_prev; prev < nodes_now; prev++) { 0 0 0
6573 // Compute predecessors and number of unchanges
6574 0 int same_tags = window[0] == tag;
6575 0 window[0] = tag;
6576 0 ▶ for (int p = prev, n = 1; p >= 0 && n < window_size; p = c.nodes[p].prev, n++) {
Branch: 6 branches
BranchTrueFalseTotal
for (int p = prev, n = 1; p >= 0 && n < window_size; p = c.nodes[p].prev, n++) { 0 0 0
for (int p = prev, n = 1; p >= 0 && n < window_size; p = c.nodes[p].prev, n++) { 0 0 0
for (int p = prev, n = 1; p >= 0 && n < window_size; p = c.nodes[p].prev, n++) { 36 29 65
for (int p = prev, n = 1; p >= 0 && n < window_size; p = c.nodes[p].prev, n++) { 36 0 36
for (int p = prev, n = 1; p >= 0 && n < window_size; p = c.nodes[p].prev, n++) { 0 0 0
for (int p = prev, n = 1; p >= 0 && n < window_size; p = c.nodes[p].prev, n++) { 0 0 0
6577 0 ▶ same_tags += same_tags == n && window[n] == c.nodes[p].tag;
Branch: 6 branches
BranchTrueFalseTotal
same_tags += same_tags == n && window[n] == c.nodes[p].tag; 0 0 0
same_tags += same_tags == n && window[n] == c.nodes[p].tag; 0 0 0
same_tags += same_tags == n && window[n] == c.nodes[p].tag; 22 14 36
same_tags += same_tags == n && window[n] == c.nodes[p].tag; 6 16 22
same_tags += same_tags == n && window[n] == c.nodes[p].tag; 0 0 0
same_tags += same_tags == n && window[n] == c.nodes[p].tag; 0 0 0
6578 0 window[n] = c.nodes[p].tag;
6579 }
6580  
6581 // Compute dynamic elementary features and score
6582 0 ▶ features.compute_dynamic_features(i, tag, prev >= 0 ? &c.nodes[prev].dynamic : nullptr, dynamic, c.features_cache);
Branch: 6 branches
BranchTrueFalseTotal
features.compute_dynamic_features(i, tag, prev >= 0 ? &c.nodes[prev].dynamic : nullptr, dynamic, c.features_cache); 0 0 0
features.compute_dynamic_features(i, tag, prev >= 0 ? &c.nodes[prev].dynamic : nullptr, dynamic, c.features_cache); 0 0 0
features.compute_dynamic_features(i, tag, prev >= 0 ? &c.nodes[prev].dynamic : nullptr, dynamic, c.features_cache); 24 5 29
features.compute_dynamic_features(i, tag, prev >= 0 ? &c.nodes[prev].dynamic : nullptr, dynamic, c.features_cache); 29 0 29
features.compute_dynamic_features(i, tag, prev >= 0 ? &c.nodes[prev].dynamic : nullptr, dynamic, c.features_cache); 0 0 0
features.compute_dynamic_features(i, tag, prev >= 0 ? &c.nodes[prev].dynamic : nullptr, dynamic, c.features_cache); 0 0 0
6583 0 ▶ score = (nodes_prev + 1 == nodes_now && analyses[i].size() == 1 ? 0 : features.score(i, window, same_tags, dynamic, c.features_cache)) +
Branch: 9 branches
BranchTrueFalseTotal
score = (nodes_prev + 1 == nodes_now && analyses[i].size() == 1 ? 0 : features.score(i, window, same_tags, dynamic, c.features_cache)) + 0 0 0
score = (nodes_prev + 1 == nodes_now && analyses[i].size() == 1 ? 0 : features.score(i, window, same_tags, dynamic, c.features_cache)) + 0 0 0
score = (nodes_prev + 1 == nodes_now && analyses[i].size() == 1 ? 0 : features.score(i, window, same_tags, dynamic, c.features_cache)) + 0 0 0
score = (nodes_prev + 1 == nodes_now && analyses[i].size() == 1 ? 0 : features.score(i, window, same_tags, dynamic, c.features_cache)) + 9 20 29
score = (nodes_prev + 1 == nodes_now && analyses[i].size() == 1 ? 0 : features.score(i, window, same_tags, dynamic, c.features_cache)) + 8 1 9
score = (nodes_prev + 1 == nodes_now && analyses[i].size() == 1 ? 0 : features.score(i, window, same_tags, dynamic, c.features_cache)) + 28 0 28
score = (nodes_prev + 1 == nodes_now && analyses[i].size() == 1 ? 0 : features.score(i, window, same_tags, dynamic, c.features_cache)) + 0 0 0
score = (nodes_prev + 1 == nodes_now && analyses[i].size() == 1 ? 0 : features.score(i, window, same_tags, dynamic, c.features_cache)) + 0 0 0
score = (nodes_prev + 1 == nodes_now && analyses[i].size() == 1 ? 0 : features.score(i, window, same_tags, dynamic, c.features_cache)) + 0 0 0
6584 0 ▶ (prev >= 0 ? c.nodes[prev].score : 0);
Branch: 3 branches
BranchTrueFalseTotal
(prev >= 0 ? c.nodes[prev].score : 0); 0 0 0
(prev >= 0 ? c.nodes[prev].score : 0); 24 5 29
(prev >= 0 ? c.nodes[prev].score : 0); 0 0 0
6585  
6586 // Update existing node or create a new one
6587 0 ▶ if (same_tags >= decoding_order-1) {
Branch: 3 branches
BranchTrueFalseTotal
if (same_tags >= decoding_order-1) { 0 0 0
if (same_tags >= decoding_order-1) { 6 23 29
if (same_tags >= decoding_order-1) { 0 0 0
6588 0 ▶ if (score <= c.nodes[nodes_next-1].score) continue;
Branch: 3 branches
BranchTrueFalseTotal
if (score <= c.nodes[nodes_next-1].score) continue; 0 0 0
if (score <= c.nodes[nodes_next-1].score) continue; 6 0 6
if (score <= c.nodes[nodes_next-1].score) continue; 0 0 0
6589 0 nodes_next--;
6590 }
6591 0 c.nodes[nodes_next].tag = tag;
6592 0 c.nodes[nodes_next].prev = prev;
6593 0 c.nodes[nodes_next].score = score;
6594 0 c.nodes[nodes_next++].dynamic = dynamic;
6595 }
6596  
6597 0 nodes_prev = nodes_now;
6598 0 nodes_now = nodes_next;
6599 }
6600  
6601 // Choose the best ending node
6602 0 int best = nodes_prev;
6603 0 ▶ for (int node = nodes_prev + 1; node < nodes_now; node++)
Branch: 3 branches
BranchTrueFalseTotal
for (int node = nodes_prev + 1; node < nodes_now; node++) 0 0 0
for (int node = nodes_prev + 1; node < nodes_now; node++) 4 2 6
for (int node = nodes_prev + 1; node < nodes_now; node++) 0 0 0
6604 0 ▶ if (c.nodes[node].score > c.nodes[best].score)
Branch: 3 branches
BranchTrueFalseTotal
if (c.nodes[node].score > c.nodes[best].score) 0 0 0
if (c.nodes[node].score > c.nodes[best].score) 1 3 4
if (c.nodes[node].score > c.nodes[best].score) 0 0 0
6605 0 best = node;
6606  
6607 0 ▶ for (int i = forms.size() - 1; i >= 0; i--, best = c.nodes[best].prev)
Branch: 3 branches
BranchTrueFalseTotal
for (int i = forms.size() - 1; i >= 0; i--, best = c.nodes[best].prev) 0 0 0
for (int i = forms.size() - 1; i >= 0; i--, best = c.nodes[best].prev) 6 2 8
for (int i = forms.size() - 1; i >= 0; i--, best = c.nodes[best].prev) 0 0 0
6608 0 tags[i] = c.nodes[best].tag;
6609 0 }
6610  
6611 /////////
6612 // File: tagger/conllu_elementary_features.h
6613 /////////
6614  
6615 // This file is part of MorphoDiTa <http://github.com/ufal/morphodita/>.
6616 //
6617 // Copyright 2015 Institute of Formal and Applied Linguistics, Faculty of
6618 // Mathematics and Physics, Charles University in Prague, Czech Republic.
6619 //
6620 // This Source Code Form is subject to the terms of the Mozilla Public
6621 // License, v. 2.0. If a copy of the MPL was not distributed with this
6622 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
6623  
6624 // Declarations
6625 template <class Map>
6626 class conllu_elementary_features : public elementary_features<Map> {
6627 public:
6628 conllu_elementary_features();
6629  
6630 enum features_per_form { FORM, FOLLOWING_VERB_TAG, FOLLOWING_VERB_FORM, NUM, CAP, DASH, PREFIX1, PREFIX2, PREFIX3, PREFIX4, PREFIX5, PREFIX6, PREFIX7, PREFIX8, PREFIX9, SUFFIX1, SUFFIX2, SUFFIX3, SUFFIX4, SUFFIX5, SUFFIX6, SUFFIX7, SUFFIX8, SUFFIX9, PER_FORM_TOTAL };
6631 enum features_per_tag { TAG, TAG_UPOS, TAG_CASE, TAG_GENDER, TAG_NUMBER, TAG_NEGATIVE, TAG_PERSON, LEMMA, PER_TAG_TOTAL };
6632 enum features_dynamic { PREVIOUS_VERB_TAG, PREVIOUS_VERB_FORM, PREVIOUS_OR_CURRENT_VERB_TAG, PREVIOUS_OR_CURRENT_VERB_FORM, DYNAMIC_TOTAL };
6633 enum features_map { MAP_NONE = -1, MAP_FORM, MAP_PREFIX1, MAP_PREFIX2, MAP_PREFIX3, MAP_PREFIX4, MAP_PREFIX5, MAP_PREFIX6, MAP_PREFIX7, MAP_PREFIX8, MAP_PREFIX9, MAP_SUFFIX1, MAP_SUFFIX2, MAP_SUFFIX3, MAP_SUFFIX4, MAP_SUFFIX5, MAP_SUFFIX6, MAP_SUFFIX7, MAP_SUFFIX8, MAP_SUFFIX9, MAP_TAG, MAP_TAG_UPOS, MAP_TAG_CASE, MAP_TAG_GENDER, MAP_TAG_NUMBER, MAP_TAG_NEGATIVE, MAP_TAG_PERSON, MAP_LEMMA, MAP_TOTAL } ;
6634  
6635 struct per_form_features { elementary_feature_value values[PER_FORM_TOTAL]; };
6636 struct per_tag_features { elementary_feature_value values[PER_TAG_TOTAL]; };
6637 struct dynamic_features { elementary_feature_value values[DYNAMIC_TOTAL]; };
6638  
6639 static vector<elementary_feature_description> descriptions;
6640  
6641 void compute_features(const vector<string_piece>& forms, const vector<vector<tagged_lemma>>& analyses, vector<per_form_features>& per_form, vector<vector<per_tag_features>>& per_tag) const;
6642 inline void compute_dynamic_features(const tagged_lemma& tag, const per_form_features& per_form, const per_tag_features& per_tag, const dynamic_features* prev_dynamic, dynamic_features& dynamic) const;
6643  
6644 using elementary_features<Map>::maps;
6645 };
6646  
6647 typedef conllu_elementary_features<persistent_elementary_feature_map> persistent_conllu_elementary_features;
6648  
6649 // Definitions
6650 template <class Map>
6651 0 conllu_elementary_features<Map>::conllu_elementary_features() {
6652 0 ▶ maps.resize(MAP_TOTAL);
Branch: 1 branch
BranchTrueFalseTotal
maps.resize(MAP_TOTAL); 0 0 0
6653 0 }
6654  
6655 template <class Map>
6656 vector<elementary_feature_description> conllu_elementary_features<Map>::descriptions = {
6657 {"Form", PER_FORM, ANY_OFFSET, FORM, MAP_FORM},
6658 {"FollowingVerbTag", PER_FORM, ANY_OFFSET, FOLLOWING_VERB_TAG, MAP_TAG},
6659 {"FollowingVerbForm", PER_FORM, ANY_OFFSET, FOLLOWING_VERB_FORM, MAP_FORM},
6660 {"Num", PER_FORM, ONLY_CURRENT, NUM, MAP_NONE},
6661 {"Cap", PER_FORM, ONLY_CURRENT, CAP, MAP_NONE},
6662 {"Dash", PER_FORM, ONLY_CURRENT, DASH, MAP_NONE},
6663 {"Prefix1", PER_FORM, ONLY_CURRENT, PREFIX1, MAP_PREFIX1},
6664 {"Prefix2", PER_FORM, ONLY_CURRENT, PREFIX2, MAP_PREFIX2},
6665 {"Prefix3", PER_FORM, ONLY_CURRENT, PREFIX3, MAP_PREFIX3},
6666 {"Prefix4", PER_FORM, ONLY_CURRENT, PREFIX4, MAP_PREFIX4},
6667 {"Prefix5", PER_FORM, ONLY_CURRENT, PREFIX5, MAP_PREFIX5},
6668 {"Prefix6", PER_FORM, ONLY_CURRENT, PREFIX6, MAP_PREFIX6},
6669 {"Prefix7", PER_FORM, ONLY_CURRENT, PREFIX7, MAP_PREFIX7},
6670 {"Prefix8", PER_FORM, ONLY_CURRENT, PREFIX8, MAP_PREFIX8},
6671 {"Prefix9", PER_FORM, ONLY_CURRENT, PREFIX9, MAP_PREFIX9},
6672 {"Suffix1", PER_FORM, ONLY_CURRENT, SUFFIX1, MAP_SUFFIX1},
6673 {"Suffix2", PER_FORM, ONLY_CURRENT, SUFFIX2, MAP_SUFFIX2},
6674 {"Suffix3", PER_FORM, ONLY_CURRENT, SUFFIX3, MAP_SUFFIX3},
6675 {"Suffix4", PER_FORM, ONLY_CURRENT, SUFFIX4, MAP_SUFFIX4},
6676 {"Suffix5", PER_FORM, ONLY_CURRENT, SUFFIX5, MAP_SUFFIX5},
6677 {"Suffix6", PER_FORM, ONLY_CURRENT, SUFFIX6, MAP_SUFFIX6},
6678 {"Suffix7", PER_FORM, ONLY_CURRENT, SUFFIX7, MAP_SUFFIX7},
6679 {"Suffix8", PER_FORM, ONLY_CURRENT, SUFFIX8, MAP_SUFFIX8},
6680 {"Suffix9", PER_FORM, ONLY_CURRENT, SUFFIX9, MAP_SUFFIX9},
6681  
6682 {"Tag", PER_TAG, ANY_OFFSET, TAG, MAP_TAG},
6683 {"TagUPos", PER_TAG, ANY_OFFSET, TAG_UPOS, MAP_TAG_UPOS},
6684 {"TagCase", PER_TAG, ANY_OFFSET, TAG_CASE, MAP_TAG_CASE},
6685 {"TagGender", PER_TAG, ANY_OFFSET, TAG_GENDER, MAP_TAG_GENDER},
6686 {"TagNumber", PER_TAG, ANY_OFFSET, TAG_NUMBER, MAP_TAG_NUMBER},
6687 {"TagNegative", PER_TAG, ANY_OFFSET, TAG_NEGATIVE, MAP_TAG_NEGATIVE},
6688 {"TagPerson", PER_TAG, ANY_OFFSET, TAG_PERSON, MAP_TAG_PERSON},
6689 {"Lemma", PER_TAG, ANY_OFFSET, LEMMA, MAP_LEMMA},
6690  
6691 {"PreviousVerbTag", DYNAMIC, ANY_OFFSET, PREVIOUS_VERB_TAG, MAP_TAG},
6692 {"PreviousVerbForm", DYNAMIC, ANY_OFFSET, PREVIOUS_VERB_FORM, MAP_FORM},
6693 };
6694  
6695 template <class Map>
6696 0 void conllu_elementary_features<Map>::compute_features(const vector<string_piece>& forms, const vector<vector<tagged_lemma>>& analyses, vector<per_form_features>& per_form, vector<vector<per_tag_features>>& per_tag) const {
6697 using namespace unilib;
6698  
6699 // We process the sentence in reverse order, so that we can compute FollowingVerbTag and FollowingVerbLemma directly.
6700 0 elementary_feature_value following_verb_tag = elementary_feature_empty, following_verb_form = elementary_feature_empty;
6701 0 ▶ for (unsigned i = forms.size(); i--;) {
Branch: 1 branch
BranchTrueFalseTotal
for (unsigned i = forms.size(); i--;) { 0 0 0
6702 0 int verb_candidate = -1;
6703  
6704 // Per_tag features and verb_candidate
6705 0 ▶ for (unsigned j = 0; j < analyses[i].size(); j++) {
Branch: 1 branch
BranchTrueFalseTotal
for (unsigned j = 0; j < analyses[i].size(); j++) { 0 0 0
6706 0 const string& tag = analyses[i][j].tag;
6707 0 const string& lemma = analyses[i][j].lemma;
6708  
6709 // Tag consists of three parts separated by tag[0] character
6710 // - first is TAG_UPOS,
6711 // - second is TAG_LPOS,
6712 // - then there is any number of | separated named fields in format Name=Value
6713 0 per_tag[i][j].values[TAG] = maps[MAP_TAG].value(tag.c_str(), tag.size());
6714 0 per_tag[i][j].values[TAG_UPOS] = per_tag[i][j].values[TAG_CASE] = per_tag[i][j].values[TAG_GENDER] = elementary_feature_empty;
6715 0 per_tag[i][j].values[TAG_NUMBER] = per_tag[i][j].values[TAG_NEGATIVE] = per_tag[i][j].values[TAG_PERSON] = elementary_feature_empty;
6716 0 ▶ per_tag[i][j].values[LEMMA] = j && analyses[i][j-1].lemma == lemma ? per_tag[i][j-1].values[LEMMA] :
Branch: 2 branches
BranchTrueFalseTotal
per_tag[i][j].values[LEMMA] = j && analyses[i][j-1].lemma == lemma ? per_tag[i][j-1].values[LEMMA] : 0 0 0
per_tag[i][j].values[LEMMA] = j && analyses[i][j-1].lemma == lemma ? per_tag[i][j-1].values[LEMMA] : 0 0 0
6717 0 maps[MAP_LEMMA].value(lemma.c_str(), lemma.size());
6718  
6719 0 char separator = tag[0];
6720 0 size_t index = tag.find(separator, 1);
6721 0 ▶ if (index == string::npos) index = tag.size();
Branch: 1 branch
BranchTrueFalseTotal
if (index == string::npos) index = tag.size(); 0 0 0
6722 0 ▶ per_tag[i][j].values[TAG_UPOS] = maps[MAP_TAG_UPOS].value(tag.c_str() + (index ? 1 : 0), index - (index ? 1 : 0));
Branch: 2 branches
BranchTrueFalseTotal
per_tag[i][j].values[TAG_UPOS] = maps[MAP_TAG_UPOS].value(tag.c_str() + (index ? 1 : 0), index - (index ? 1 : 0)); 0 0 0
per_tag[i][j].values[TAG_UPOS] = maps[MAP_TAG_UPOS].value(tag.c_str() + (index ? 1 : 0), index - (index ? 1 : 0)); 0 0 0
6723  
6724 0 ▶ if (index < tag.size()) index++;
Branch: 1 branch
BranchTrueFalseTotal
if (index < tag.size()) index++; 0 0 0
6725 0 ▶ if (index < tag.size()) index = tag.find(separator, index);
Branch: 1 branch
BranchTrueFalseTotal
if (index < tag.size()) index = tag.find(separator, index); 0 0 0
6726 0 ▶ if (index < tag.size()) index++;
Branch: 1 branch
BranchTrueFalseTotal
if (index < tag.size()) index++; 0 0 0
6727 0 ▶ for (size_t length; index < tag.size(); index += length + 1) {
Branch: 1 branch
BranchTrueFalseTotal
for (size_t length; index < tag.size(); index += length + 1) { 0 0 0
6728 0 length = tag.find('|', index);
6729 0 ▶ length = (length == string::npos ? tag.size() : length) - index;
Branch: 1 branch
BranchTrueFalseTotal
length = (length == string::npos ? tag.size() : length) - index; 0 0 0
6730  
6731 0 ▶ for (size_t equal_sign = 0; equal_sign + 1 < length; equal_sign++)
Branch: 1 branch
BranchTrueFalseTotal
for (size_t equal_sign = 0; equal_sign + 1 < length; equal_sign++) 0 0 0
6732 0 ▶ if (tag[index + equal_sign] == '=') {
Branch: 1 branch
BranchTrueFalseTotal
if (tag[index + equal_sign] == '=') { 0 0 0
6733 0 int value = -1, map;
6734 0 switch (equal_sign) {
6735 0 case 4:
6736 0 ▶ if (tag.compare(index, equal_sign, "Case") == 0) value = TAG_CASE, map = MAP_TAG_CASE;
Branch: 1 branch
BranchTrueFalseTotal
if (tag.compare(index, equal_sign, "Case") == 0) value = TAG_CASE, map = MAP_TAG_CASE; 0 0 0
6737 0 break;
6738 0 case 6:
6739 0 ▶ if (tag.compare(index, equal_sign, "Gender") == 0) value = TAG_GENDER, map = MAP_TAG_GENDER;
Branch: 1 branch
BranchTrueFalseTotal
if (tag.compare(index, equal_sign, "Gender") == 0) value = TAG_GENDER, map = MAP_TAG_GENDER; 0 0 0
6740 0 ▶ if (tag.compare(index, equal_sign, "Number") == 0) value = TAG_NUMBER, map = MAP_TAG_NUMBER;
Branch: 1 branch
BranchTrueFalseTotal
if (tag.compare(index, equal_sign, "Number") == 0) value = TAG_NUMBER, map = MAP_TAG_NUMBER; 0 0 0
6741 0 ▶ if (tag.compare(index, equal_sign, "Person") == 0) value = TAG_PERSON, map = MAP_TAG_PERSON;
Branch: 1 branch
BranchTrueFalseTotal
if (tag.compare(index, equal_sign, "Person") == 0) value = TAG_PERSON, map = MAP_TAG_PERSON; 0 0 0
6742 0 break;
6743 0 case 8:
6744 0 ▶ if (tag.compare(index, equal_sign, "Negative") == 0) value = TAG_NEGATIVE, map = MAP_TAG_NEGATIVE;
Branch: 1 branch
BranchTrueFalseTotal
if (tag.compare(index, equal_sign, "Negative") == 0) value = TAG_NEGATIVE, map = MAP_TAG_NEGATIVE; 0 0 0
6745 0 break;
6746 }
6747  
6748 0 ▶ if (value >= 0)
Branch: 1 branch
BranchTrueFalseTotal
if (value >= 0) 0 0 0
6749 0 per_tag[i][j].values[value] = maps[map].value(tag.c_str() + index + equal_sign + 1, length - equal_sign - 1);
6750 0 break;
6751 }
6752 }
6753  
6754 0 ▶ if (tag.size() >= 2 && tag[1] == 'V') {
Branch: 3 branches
BranchTrueFalseTotal
if (tag.size() >= 2 && tag[1] == 'V') { 0 0 0
if (tag.size() >= 2 && tag[1] == 'V') { 0 0 0
if (tag.size() >= 2 && tag[1] == 'V') { 0 0 0
6755 int tag_compare;
6756 0 ▶ verb_candidate = verb_candidate < 0 || (tag_compare = tag.compare(analyses[i][verb_candidate].tag), tag_compare < 0) || (tag_compare == 0 && lemma < analyses[i][verb_candidate].lemma) ? j : verb_candidate;
Branch: 4 branches
BranchTrueFalseTotal
verb_candidate = verb_candidate < 0 || (tag_compare = tag.compare(analyses[i][verb_candidate].tag), tag_compare < 0) || (tag_compare == 0 && lemma < analyses[i][verb_candidate].lemma) ? j : verb_candidate; 0 0 0
verb_candidate = verb_candidate < 0 || (tag_compare = tag.compare(analyses[i][verb_candidate].tag), tag_compare < 0) || (tag_compare == 0 && lemma < analyses[i][verb_candidate].lemma) ? j : verb_candidate; 0 0 0
verb_candidate = verb_candidate < 0 || (tag_compare = tag.compare(analyses[i][verb_candidate].tag), tag_compare < 0) || (tag_compare == 0 && lemma < analyses[i][verb_candidate].lemma) ? j : verb_candidate; 0 0 0
verb_candidate = verb_candidate < 0 || (tag_compare = tag.compare(analyses[i][verb_candidate].tag), tag_compare < 0) || (tag_compare == 0 && lemma < analyses[i][verb_candidate].lemma) ? j : verb_candidate; 0 0 0
6757 }
6758 }
6759  
6760 // Per_form features
6761 0 per_form[i].values[FORM] = maps[MAP_FORM].value(forms[i].str, forms[i].len);
6762 0 per_form[i].values[FOLLOWING_VERB_TAG] = following_verb_tag;
6763 0 per_form[i].values[FOLLOWING_VERB_FORM] = following_verb_form;
6764  
6765 // Update following_verb_{tag,lemma} _after_ filling FOLLOWING_VERB_{TAG,LEMMA}.
6766 0 ▶ if (verb_candidate >= 0) {
Branch: 1 branch
BranchTrueFalseTotal
if (verb_candidate >= 0) { 0 0 0
6767 0 following_verb_tag = per_tag[i][verb_candidate].values[TAG];
6768 0 following_verb_form = per_form[i].values[FORM];
6769 }
6770  
6771 // Ortographic per_form features if needed
6772 0 ▶ if (analyses[i].size() == 1) {
Branch: 1 branch
BranchTrueFalseTotal
if (analyses[i].size() == 1) { 0 0 0
6773 0 per_form[i].values[NUM] = per_form[i].values[CAP] = per_form[i].values[DASH] = elementary_feature_unknown;
6774 0 per_form[i].values[PREFIX1] = per_form[i].values[PREFIX2] = per_form[i].values[PREFIX3] = elementary_feature_unknown;
6775 0 per_form[i].values[PREFIX4] = per_form[i].values[PREFIX5] = per_form[i].values[PREFIX6] = elementary_feature_unknown;
6776 0 per_form[i].values[PREFIX7] = per_form[i].values[PREFIX8] = per_form[i].values[PREFIX9] = elementary_feature_unknown;
6777 0 per_form[i].values[SUFFIX1] = per_form[i].values[SUFFIX2] = per_form[i].values[SUFFIX3] = elementary_feature_unknown;
6778 0 per_form[i].values[SUFFIX4] = per_form[i].values[SUFFIX5] = per_form[i].values[SUFFIX6] = elementary_feature_unknown;
6779 0 per_form[i].values[SUFFIX7] = per_form[i].values[SUFFIX8] = per_form[i].values[SUFFIX9] = elementary_feature_unknown;
6780 0 ▶ } else if (forms[i].len <= 0) {
Branch: 1 branch
BranchTrueFalseTotal
} else if (forms[i].len <= 0) { 0 0 0
6781 0 per_form[i].values[NUM] = per_form[i].values[CAP] = per_form[i].values[DASH] = elementary_feature_empty + 1;
6782 0 per_form[i].values[PREFIX1] = per_form[i].values[PREFIX2] = per_form[i].values[PREFIX3] = elementary_feature_empty;
6783 0 per_form[i].values[PREFIX4] = per_form[i].values[PREFIX5] = per_form[i].values[PREFIX6] = elementary_feature_empty;
6784 0 per_form[i].values[PREFIX7] = per_form[i].values[PREFIX8] = per_form[i].values[PREFIX9] = elementary_feature_empty;
6785 0 per_form[i].values[SUFFIX1] = per_form[i].values[SUFFIX2] = per_form[i].values[SUFFIX3] = elementary_feature_empty;
6786 0 per_form[i].values[SUFFIX4] = per_form[i].values[SUFFIX5] = per_form[i].values[SUFFIX6] = elementary_feature_empty;
6787 0 per_form[i].values[SUFFIX7] = per_form[i].values[SUFFIX8] = per_form[i].values[SUFFIX9] = elementary_feature_empty;
6788 } else {
6789 0 string_piece form = forms[i];
6790 0 const char* form_start = form.str;
6791  
6792 0 bool num = false, cap = false, dash = false;
6793 0 size_t indices[18] = {0, form.len, form.len, form.len, form.len, form.len, form.len, form.len, form.len, form.len, 0, 0, 0, 0, 0, 0, 0, 0}; // careful here regarding forms shorter than 9 characters
6794 0 int index = 0;
6795 0 ▶ while (form.len) {
Branch: 1 branch
BranchTrueFalseTotal
while (form.len) { 0 0 0
6796 0 indices[(index++) % 18] = form.str - form_start;
6797  
6798 0 unicode::category_t cat = unicode::category(utf8::decode(form.str, form.len));
6799 0 ▶ num = num || cat & unicode::N;
Branch: 2 branches
BranchTrueFalseTotal
num = num || cat & unicode::N; 0 0 0
num = num || cat & unicode::N; 0 0 0
6800 0 ▶ cap = cap || cat & unicode::Lut;
Branch: 2 branches
BranchTrueFalseTotal
cap = cap || cat & unicode::Lut; 0 0 0
cap = cap || cat & unicode::Lut; 0 0 0
6801 0 ▶ dash = dash || cat & unicode::Pd;
Branch: 2 branches
BranchTrueFalseTotal
dash = dash || cat & unicode::Pd; 0 0 0
dash = dash || cat & unicode::Pd; 0 0 0
6802  
6803 0 ▶ if (index == 10 || (!form.len && index < 10)) {
Branch: 3 branches
BranchTrueFalseTotal
if (index == 10 || (!form.len && index < 10)) { 0 0 0
if (index == 10 || (!form.len && index < 10)) { 0 0 0
if (index == 10 || (!form.len && index < 10)) { 0 0 0
6804 0 ▶ per_form[i].values[PREFIX1] = maps[MAP_PREFIX1].value(form_start, indices[1]);
Branch: 1 branch
BranchTrueFalseTotal
per_form[i].values[PREFIX1] = maps[MAP_PREFIX1].value(form_start, indices[1]); 0 0 0
6805 0 ▶ per_form[i].values[PREFIX2] = maps[MAP_PREFIX2].value(form_start, indices[2]);
Branch: 1 branch
BranchTrueFalseTotal
per_form[i].values[PREFIX2] = maps[MAP_PREFIX2].value(form_start, indices[2]); 0 0 0
6806 0 ▶ per_form[i].values[PREFIX3] = maps[MAP_PREFIX3].value(form_start, indices[3]);
Branch: 1 branch
BranchTrueFalseTotal
per_form[i].values[PREFIX3] = maps[MAP_PREFIX3].value(form_start, indices[3]); 0 0 0
6807 0 ▶ per_form[i].values[PREFIX4] = maps[MAP_PREFIX4].value(form_start, indices[4]);
Branch: 1 branch
BranchTrueFalseTotal
per_form[i].values[PREFIX4] = maps[MAP_PREFIX4].value(form_start, indices[4]); 0 0 0
6808 0 ▶ per_form[i].values[PREFIX5] = maps[MAP_PREFIX5].value(form_start, indices[5]);
Branch: 1 branch
BranchTrueFalseTotal
per_form[i].values[PREFIX5] = maps[MAP_PREFIX5].value(form_start, indices[5]); 0 0 0
6809 0 ▶ per_form[i].values[PREFIX6] = maps[MAP_PREFIX6].value(form_start, indices[6]);
Branch: 1 branch
BranchTrueFalseTotal
per_form[i].values[PREFIX6] = maps[MAP_PREFIX6].value(form_start, indices[6]); 0 0 0
6810 0 ▶ per_form[i].values[PREFIX7] = maps[MAP_PREFIX7].value(form_start, indices[7]);
Branch: 1 branch
BranchTrueFalseTotal
per_form[i].values[PREFIX7] = maps[MAP_PREFIX7].value(form_start, indices[7]); 0 0 0
6811 0 ▶ per_form[i].values[PREFIX8] = maps[MAP_PREFIX8].value(form_start, indices[8]);
Branch: 1 branch
BranchTrueFalseTotal
per_form[i].values[PREFIX8] = maps[MAP_PREFIX8].value(form_start, indices[8]); 0 0 0
6812 0 ▶ per_form[i].values[PREFIX9] = maps[MAP_PREFIX9].value(form_start, indices[9]);
Branch: 1 branch
BranchTrueFalseTotal
per_form[i].values[PREFIX9] = maps[MAP_PREFIX9].value(form_start, indices[9]); 0 0 0
6813 }
6814 }
6815 0 ▶ per_form[i].values[SUFFIX1] = maps[MAP_SUFFIX1].value(form_start + indices[(index+18-1) % 18], form.str - form_start - indices[(index+18-1) % 18]);
Branch: 1 branch
BranchTrueFalseTotal
per_form[i].values[SUFFIX1] = maps[MAP_SUFFIX1].value(form_start + indices[(index+18-1) % 18], form.str - form_start - indices[(index+18-1) % 18]); 0 0 0
6816 0 ▶ per_form[i].values[SUFFIX2] = maps[MAP_SUFFIX2].value(form_start + indices[(index+18-2) % 18], form.str - form_start - indices[(index+18-2) % 18]);
Branch: 1 branch
BranchTrueFalseTotal
per_form[i].values[SUFFIX2] = maps[MAP_SUFFIX2].value(form_start + indices[(index+18-2) % 18], form.str - form_start - indices[(index+18-2) % 18]); 0 0 0
6817 0 ▶ per_form[i].values[SUFFIX3] = maps[MAP_SUFFIX3].value(form_start + indices[(index+18-3) % 18], form.str - form_start - indices[(index+18-3) % 18]);
Branch: 1 branch
BranchTrueFalseTotal
per_form[i].values[SUFFIX3] = maps[MAP_SUFFIX3].value(form_start + indices[(index+18-3) % 18], form.str - form_start - indices[(index+18-3) % 18]); 0 0 0
6818 0 ▶ per_form[i].values[SUFFIX4] = maps[MAP_SUFFIX4].value(form_start + indices[(index+18-4) % 18], form.str - form_start - indices[(index+18-4) % 18]);
Branch: 1 branch
BranchTrueFalseTotal
per_form[i].values[SUFFIX4] = maps[MAP_SUFFIX4].value(form_start + indices[(index+18-4) % 18], form.str - form_start - indices[(index+18-4) % 18]); 0 0 0
6819 0 ▶ per_form[i].values[SUFFIX5] = maps[MAP_SUFFIX5].value(form_start + indices[(index+18-5) % 18], form.str - form_start - indices[(index+18-5) % 18]);
Branch: 1 branch
BranchTrueFalseTotal
per_form[i].values[SUFFIX5] = maps[MAP_SUFFIX5].value(form_start + indices[(index+18-5) % 18], form.str - form_start - indices[(index+18-5) % 18]); 0 0 0
6820 0 ▶ per_form[i].values[SUFFIX6] = maps[MAP_SUFFIX6].value(form_start + indices[(index+18-6) % 18], form.str - form_start - indices[(index+18-6) % 18]);
Branch: 1 branch
BranchTrueFalseTotal
per_form[i].values[SUFFIX6] = maps[MAP_SUFFIX6].value(form_start + indices[(index+18-6) % 18], form.str - form_start - indices[(index+18-6) % 18]); 0 0 0
6821 0 ▶ per_form[i].values[SUFFIX7] = maps[MAP_SUFFIX7].value(form_start + indices[(index+18-7) % 18], form.str - form_start - indices[(index+18-7) % 18]);
Branch: 1 branch
BranchTrueFalseTotal
per_form[i].values[SUFFIX7] = maps[MAP_SUFFIX7].value(form_start + indices[(index+18-7) % 18], form.str - form_start - indices[(index+18-7) % 18]); 0 0 0
6822 0 ▶ per_form[i].values[SUFFIX8] = maps[MAP_SUFFIX8].value(form_start + indices[(index+18-8) % 18], form.str - form_start - indices[(index+18-8) % 18]);
Branch: 1 branch
BranchTrueFalseTotal
per_form[i].values[SUFFIX8] = maps[MAP_SUFFIX8].value(form_start + indices[(index+18-8) % 18], form.str - form_start - indices[(index+18-8) % 18]); 0 0 0
6823 0 ▶ per_form[i].values[SUFFIX9] = maps[MAP_SUFFIX9].value(form_start + indices[(index+18-9) % 18], form.str - form_start - indices[(index+18-9) % 18]);
Branch: 1 branch
BranchTrueFalseTotal
per_form[i].values[SUFFIX9] = maps[MAP_SUFFIX9].value(form_start + indices[(index+18-9) % 18], form.str - form_start - indices[(index+18-9) % 18]); 0 0 0
6824 0 per_form[i].values[NUM] = elementary_feature_empty + 1 + num;
6825 0 per_form[i].values[CAP] = elementary_feature_empty + 1 + cap;
6826 0 per_form[i].values[DASH] = elementary_feature_empty + 1 + dash;
6827 }
6828 }
6829 0 }
6830  
6831 template <class Map>
6832 0 void conllu_elementary_features<Map>::compute_dynamic_features(const tagged_lemma& tag, const per_form_features& per_form, const per_tag_features& per_tag, const dynamic_features* prev_dynamic, dynamic_features& dynamic) const {
6833 0 ▶ if (prev_dynamic) {
Branch: 1 branch
BranchTrueFalseTotal
if (prev_dynamic) { 0 0 0
6834 0 dynamic.values[PREVIOUS_VERB_TAG] = prev_dynamic->values[PREVIOUS_OR_CURRENT_VERB_TAG];
6835 0 dynamic.values[PREVIOUS_VERB_FORM] = prev_dynamic->values[PREVIOUS_OR_CURRENT_VERB_FORM];
6836 } else {
6837 0 dynamic.values[PREVIOUS_VERB_TAG] = elementary_feature_empty;
6838 0 dynamic.values[PREVIOUS_VERB_FORM] = elementary_feature_empty;
6839 }
6840  
6841 0 ▶ if (tag.tag.size() >= 2 && tag.tag[1] == 'V') {
Branch: 3 branches
BranchTrueFalseTotal
if (tag.tag.size() >= 2 && tag.tag[1] == 'V') { 0 0 0
if (tag.tag.size() >= 2 && tag.tag[1] == 'V') { 0 0 0
if (tag.tag.size() >= 2 && tag.tag[1] == 'V') { 0 0 0
6842 0 dynamic.values[PREVIOUS_OR_CURRENT_VERB_TAG] = per_tag.values[TAG];
6843 0 dynamic.values[PREVIOUS_OR_CURRENT_VERB_FORM] = per_form.values[FORM];
6844 } else {
6845 0 dynamic.values[PREVIOUS_OR_CURRENT_VERB_TAG] = dynamic.values[PREVIOUS_VERB_TAG];
6846 0 dynamic.values[PREVIOUS_OR_CURRENT_VERB_FORM] = dynamic.values[PREVIOUS_VERB_FORM];
6847 }
6848 0 }
6849  
6850 /////////
6851 // File: tagger/czech_elementary_features.h
6852 /////////
6853  
6854 // This file is part of MorphoDiTa <http://github.com/ufal/morphodita/>.
6855 //
6856 // Copyright 2015 Institute of Formal and Applied Linguistics, Faculty of
6857 // Mathematics and Physics, Charles University in Prague, Czech Republic.
6858 //
6859 // This Source Code Form is subject to the terms of the Mozilla Public
6860 // License, v. 2.0. If a copy of the MPL was not distributed with this
6861 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
6862  
6863 // Declarations
6864 template <class Map>
6865 class czech_elementary_features : public elementary_features<Map> {
6866 public:
6867 czech_elementary_features();
6868  
6869 enum features_per_form { FORM, FOLLOWING_VERB_TAG, FOLLOWING_VERB_LEMMA, NUM, CAP, DASH, PREFIX1, PREFIX2, PREFIX3, PREFIX4, SUFFIX1, SUFFIX2, SUFFIX3, SUFFIX4, PER_FORM_TOTAL };
6870 enum features_per_tag { TAG, TAG3, TAG5, TAG25, LEMMA, PER_TAG_TOTAL };
6871 enum features_dynamic { PREVIOUS_VERB_TAG, PREVIOUS_VERB_LEMMA, PREVIOUS_OR_CURRENT_VERB_TAG, PREVIOUS_OR_CURRENT_VERB_LEMMA, DYNAMIC_TOTAL };
6872 enum features_map { MAP_NONE = -1, MAP_FORM, MAP_LEMMA, MAP_PREFIX1, MAP_PREFIX2, MAP_PREFIX3, MAP_PREFIX4, MAP_SUFFIX1, MAP_SUFFIX2, MAP_SUFFIX3, MAP_SUFFIX4, MAP_TAG, MAP_TAG3, MAP_TAG5, MAP_TAG25, MAP_TOTAL } ;
6873  
6874 struct per_form_features { elementary_feature_value values[PER_FORM_TOTAL]; };
6875 struct per_tag_features { elementary_feature_value values[PER_TAG_TOTAL]; };
6876 struct dynamic_features { elementary_feature_value values[DYNAMIC_TOTAL]; };
6877  
6878 static vector<elementary_feature_description> descriptions;
6879  
6880 void compute_features(const vector<string_piece>& forms, const vector<vector<tagged_lemma>>& analyses, vector<per_form_features>& per_form, vector<vector<per_tag_features>>& per_tag) const;
6881 inline void compute_dynamic_features(const tagged_lemma& tag, const per_form_features& per_form, const per_tag_features& per_tag, const dynamic_features* prev_dynamic, dynamic_features& dynamic) const;
6882  
6883 using elementary_features<Map>::maps;
6884 };
6885  
6886 typedef czech_elementary_features<persistent_elementary_feature_map> persistent_czech_elementary_features;
6887  
6888 // Definitions
6889 template <class Map>
6890 0 czech_elementary_features<Map>::czech_elementary_features() {
6891 0 ▶ maps.resize(MAP_TOTAL);
Branch: 1 branch
BranchTrueFalseTotal
maps.resize(MAP_TOTAL); 0 0 0
6892 0 }
6893  
6894 template <class Map>
6895 vector<elementary_feature_description> czech_elementary_features<Map>::descriptions = {
6896 {"Form", PER_FORM, ANY_OFFSET, FORM, MAP_FORM},
6897 {"FollowingVerbTag", PER_FORM, ANY_OFFSET, FOLLOWING_VERB_TAG, MAP_TAG},
6898 {"FollowingVerbLemma", PER_FORM, ANY_OFFSET, FOLLOWING_VERB_LEMMA, MAP_LEMMA },
6899 {"Num", PER_FORM, ONLY_CURRENT, NUM, MAP_NONE},
6900 {"Cap", PER_FORM, ONLY_CURRENT, CAP, MAP_NONE},
6901 {"Dash", PER_FORM, ONLY_CURRENT, DASH, MAP_NONE},
6902 {"Prefix1", PER_FORM, ONLY_CURRENT, PREFIX1, MAP_PREFIX1},
6903 {"Prefix2", PER_FORM, ONLY_CURRENT, PREFIX2, MAP_PREFIX2},
6904 {"Prefix3", PER_FORM, ONLY_CURRENT, PREFIX3, MAP_PREFIX3},
6905 {"Prefix4", PER_FORM, ONLY_CURRENT, PREFIX4, MAP_PREFIX4},
6906 {"Suffix1", PER_FORM, ONLY_CURRENT, SUFFIX1, MAP_SUFFIX1},
6907 {"Suffix2", PER_FORM, ONLY_CURRENT, SUFFIX2, MAP_SUFFIX2},
6908 {"Suffix3", PER_FORM, ONLY_CURRENT, SUFFIX3, MAP_SUFFIX3},
6909 {"Suffix4", PER_FORM, ONLY_CURRENT, SUFFIX4, MAP_SUFFIX4},
6910  
6911 {"Tag", PER_TAG, ANY_OFFSET, TAG, MAP_TAG},
6912 {"Tag3", PER_TAG, ANY_OFFSET, TAG3, MAP_TAG3},
6913 {"Tag5", PER_TAG, ANY_OFFSET, TAG5, MAP_TAG5},
6914 {"Tag25", PER_TAG, ANY_OFFSET, TAG25, MAP_TAG25},
6915 {"Lemma", PER_TAG, ANY_OFFSET, LEMMA, MAP_LEMMA},
6916  
6917 {"PreviousVerbTag", DYNAMIC, ANY_OFFSET, PREVIOUS_VERB_TAG, MAP_TAG},
6918 {"PreviousVerbLemma", DYNAMIC, ANY_OFFSET, PREVIOUS_VERB_LEMMA, MAP_LEMMA}
6919 };
6920  
6921 template <class Map>
6922 0 void czech_elementary_features<Map>::compute_features(const vector<string_piece>& forms, const vector<vector<tagged_lemma>>& analyses, vector<per_form_features>& per_form, vector<vector<per_tag_features>>& per_tag) const {
6923 using namespace unilib;
6924  
6925 // We process the sentence in reverse order, so that we can compute FollowingVerbTag and FollowingVerbLemma directly.
6926 0 elementary_feature_value following_verb_tag = elementary_feature_empty, following_verb_lemma = elementary_feature_empty;
6927 0 ▶ for (unsigned i = forms.size(); i--;) {
Branch: 1 branch
BranchTrueFalseTotal
for (unsigned i = forms.size(); i--;) { 0 0 0
6928 0 int verb_candidate = -1;
6929  
6930 // Per_tag features and verb_candidate
6931 0 ▶ for (unsigned j = 0; j < analyses[i].size(); j++) {
Branch: 1 branch
BranchTrueFalseTotal
for (unsigned j = 0; j < analyses[i].size(); j++) { 0 0 0
6932 char tag25[2];
6933 0 ▶ per_tag[i][j].values[TAG] = maps[MAP_TAG].value(analyses[i][j].tag.c_str(), analyses[i][j].tag.size());
Branch: 1 branch
BranchTrueFalseTotal
per_tag[i][j].values[TAG] = maps[MAP_TAG].value(analyses[i][j].tag.c_str(), analyses[i][j].tag.size()); 0 0 0
6934 0 ▶ per_tag[i][j].values[TAG3] = analyses[i][j].tag.size() >= 3 ? maps[MAP_TAG3].value(analyses[i][j].tag.c_str() + 2, 1) : elementary_feature_empty;
Branch: 2 branches
BranchTrueFalseTotal
per_tag[i][j].values[TAG3] = analyses[i][j].tag.size() >= 3 ? maps[MAP_TAG3].value(analyses[i][j].tag.c_str() + 2, 1) : elementary_feature_empty; 0 0 0
per_tag[i][j].values[TAG3] = analyses[i][j].tag.size() >= 3 ? maps[MAP_TAG3].value(analyses[i][j].tag.c_str() + 2, 1) : elementary_feature_empty; 0 0 0
6935 0 ▶ per_tag[i][j].values[TAG5] = analyses[i][j].tag.size() >= 5 ? maps[MAP_TAG5].value(analyses[i][j].tag.c_str() + 4, 1) : elementary_feature_empty;
Branch: 2 branches
BranchTrueFalseTotal
per_tag[i][j].values[TAG5] = analyses[i][j].tag.size() >= 5 ? maps[MAP_TAG5].value(analyses[i][j].tag.c_str() + 4, 1) : elementary_feature_empty; 0 0 0
per_tag[i][j].values[TAG5] = analyses[i][j].tag.size() >= 5 ? maps[MAP_TAG5].value(analyses[i][j].tag.c_str() + 4, 1) : elementary_feature_empty; 0 0 0
6936 0 ▶ per_tag[i][j].values[TAG25] = analyses[i][j].tag.size() >= 5 ? maps[MAP_TAG25].value((tag25[0] = analyses[i][j].tag[1], tag25[1] = analyses[i][j].tag[4], tag25), 2) : elementary_feature_empty;
Branch: 2 branches
BranchTrueFalseTotal
per_tag[i][j].values[TAG25] = analyses[i][j].tag.size() >= 5 ? maps[MAP_TAG25].value((tag25[0] = analyses[i][j].tag[1], tag25[1] = analyses[i][j].tag[4], tag25), 2) : elementary_feature_empty; 0 0 0
per_tag[i][j].values[TAG25] = analyses[i][j].tag.size() >= 5 ? maps[MAP_TAG25].value((tag25[0] = analyses[i][j].tag[1], tag25[1] = analyses[i][j].tag[4], tag25), 2) : elementary_feature_empty; 0 0 0
6937 0 ▶ per_tag[i][j].values[LEMMA] = j && analyses[i][j-1].lemma == analyses[i][j].lemma ? per_tag[i][j-1].values[LEMMA] :
Branch: 2 branches
BranchTrueFalseTotal
per_tag[i][j].values[LEMMA] = j && analyses[i][j-1].lemma == analyses[i][j].lemma ? per_tag[i][j-1].values[LEMMA] : 0 0 0
per_tag[i][j].values[LEMMA] = j && analyses[i][j-1].lemma == analyses[i][j].lemma ? per_tag[i][j-1].values[LEMMA] : 0 0 0
6938 0 ▶ maps[MAP_LEMMA].value(analyses[i][j].lemma.c_str(), analyses[i][j].lemma.size());
Branch: 1 branch
BranchTrueFalseTotal
maps[MAP_LEMMA].value(analyses[i][j].lemma.c_str(), analyses[i][j].lemma.size()); 0 0 0
6939  
6940 0 ▶ if (analyses[i][j].tag[0] == 'V') {
Branch: 1 branch
BranchTrueFalseTotal
if (analyses[i][j].tag[0] == 'V') { 0 0 0
6941 int tag_compare;
6942 0 ▶ verb_candidate = verb_candidate < 0 || (tag_compare = analyses[i][j].tag.compare(analyses[i][verb_candidate].tag), tag_compare < 0) || (tag_compare == 0 && analyses[i][j].lemma < analyses[i][verb_candidate].lemma) ? j : verb_candidate;
Branch: 5 branches
BranchTrueFalseTotal
verb_candidate = verb_candidate < 0 || (tag_compare = analyses[i][j].tag.compare(analyses[i][verb_candidate].tag), tag_compare < 0) || (tag_compare == 0 && analyses[i][j].lemma < analyses[i][verb_candidate].lemma) ? j : verb_candidate; 0 0 0
verb_candidate = verb_candidate < 0 || (tag_compare = analyses[i][j].tag.compare(analyses[i][verb_candidate].tag), tag_compare < 0) || (tag_compare == 0 && analyses[i][j].lemma < analyses[i][verb_candidate].lemma) ? j : verb_candidate; 0 0 0
verb_candidate = verb_candidate < 0 || (tag_compare = analyses[i][j].tag.compare(analyses[i][verb_candidate].tag), tag_compare < 0) || (tag_compare == 0 && analyses[i][j].lemma < analyses[i][verb_candidate].lemma) ? j : verb_candidate; 0 0 0
verb_candidate = verb_candidate < 0 || (tag_compare = analyses[i][j].tag.compare(analyses[i][verb_candidate].tag), tag_compare < 0) || (tag_compare == 0 && analyses[i][j].lemma < analyses[i][verb_candidate].lemma) ? j : verb_candidate; 0 0 0
verb_candidate = verb_candidate < 0 || (tag_compare = analyses[i][j].tag.compare(analyses[i][verb_candidate].tag), tag_compare < 0) || (tag_compare == 0 && analyses[i][j].lemma < analyses[i][verb_candidate].lemma) ? j : verb_candidate; 0 0 0
6943 }
6944 }
6945  
6946 // Per_form features
6947 0 per_form[i].values[FORM] = maps[MAP_FORM].value(forms[i].str, forms[i].len);
6948 0 per_form[i].values[FOLLOWING_VERB_TAG] = following_verb_tag;
6949 0 per_form[i].values[FOLLOWING_VERB_LEMMA] = following_verb_lemma;
6950  
6951 // Update following_verb_{tag,lemma} _after_ filling FOLLOWING_VERB_{TAG,LEMMA}.
6952 0 ▶ if (verb_candidate >= 0) {
Branch: 1 branch
BranchTrueFalseTotal
if (verb_candidate >= 0) { 0 0 0
6953 0 following_verb_tag = per_tag[i][verb_candidate].values[TAG];
6954 0 following_verb_lemma = per_tag[i][verb_candidate].values[LEMMA];
6955 }
6956  
6957 // Ortographic per_form features if needed
6958 0 ▶ if (analyses[i].size() == 1) {
Branch: 1 branch
BranchTrueFalseTotal
if (analyses[i].size() == 1) { 0 0 0
6959 0 per_form[i].values[NUM] = per_form[i].values[CAP] = per_form[i].values[DASH] = elementary_feature_unknown;
6960 0 per_form[i].values[PREFIX1] = per_form[i].values[PREFIX2] = per_form[i].values[PREFIX3] = per_form[i].values[PREFIX4] = elementary_feature_unknown;
6961 0 per_form[i].values[SUFFIX1] = per_form[i].values[SUFFIX2] = per_form[i].values[SUFFIX3] = per_form[i].values[SUFFIX4] = elementary_feature_unknown;
6962 0 ▶ } else if (forms[i].len <= 0) {
Branch: 1 branch
BranchTrueFalseTotal
} else if (forms[i].len <= 0) { 0 0 0
6963 0 per_form[i].values[NUM] = per_form[i].values[CAP] = per_form[i].values[DASH] = elementary_feature_empty + 1;
6964 0 per_form[i].values[PREFIX1] = per_form[i].values[PREFIX2] = per_form[i].values[PREFIX3] = per_form[i].values[PREFIX4] = elementary_feature_empty;
6965 0 per_form[i].values[SUFFIX1] = per_form[i].values[SUFFIX2] = per_form[i].values[SUFFIX3] = per_form[i].values[SUFFIX4] = elementary_feature_empty;
6966 } else {
6967 0 string_piece form = forms[i];
6968 0 const char* form_start = form.str;
6969  
6970 0 bool num = false, cap = false, dash = false;
6971 0 size_t indices[8] = {0, form.len, form.len, form.len, form.len, 0, 0, 0}; // careful here regarding forms shorter than 4 characters
6972 0 int index = 0;
6973 0 ▶ while (form.len) {
Branch: 1 branch
BranchTrueFalseTotal
while (form.len) { 0 0 0
6974 0 indices[(index++)&7] = form.str - form_start;
6975  
6976 0 unicode::category_t cat = unicode::category(utf8::decode(form.str, form.len));
6977 0 ▶ num = num || cat & unicode::N;
Branch: 2 branches
BranchTrueFalseTotal
num = num || cat & unicode::N; 0 0 0
num = num || cat & unicode::N; 0 0 0
6978 0 ▶ cap = cap || cat & unicode::Lut;
Branch: 2 branches
BranchTrueFalseTotal
cap = cap || cat & unicode::Lut; 0 0 0
cap = cap || cat & unicode::Lut; 0 0 0
6979 0 ▶ dash = dash || cat & unicode::Pd;
Branch: 2 branches
BranchTrueFalseTotal
dash = dash || cat & unicode::Pd; 0 0 0
dash = dash || cat & unicode::Pd; 0 0 0
6980  
6981 0 ▶ if (index == 5 || (!form.len && index < 5)) {
Branch: 3 branches
BranchTrueFalseTotal
if (index == 5 || (!form.len && index < 5)) { 0 0 0
if (index == 5 || (!form.len && index < 5)) { 0 0 0
if (index == 5 || (!form.len && index < 5)) { 0 0 0
6982 0 ▶ per_form[i].values[PREFIX1] = maps[MAP_PREFIX1].value(form_start, indices[1]);
Branch: 1 branch
BranchTrueFalseTotal
per_form[i].values[PREFIX1] = maps[MAP_PREFIX1].value(form_start, indices[1]); 0 0 0
6983 0 ▶ per_form[i].values[PREFIX2] = maps[MAP_PREFIX2].value(form_start, indices[2]);
Branch: 1 branch
BranchTrueFalseTotal
per_form[i].values[PREFIX2] = maps[MAP_PREFIX2].value(form_start, indices[2]); 0 0 0
6984 0 ▶ per_form[i].values[PREFIX3] = maps[MAP_PREFIX3].value(form_start, indices[3]);
Branch: 1 branch
BranchTrueFalseTotal
per_form[i].values[PREFIX3] = maps[MAP_PREFIX3].value(form_start, indices[3]); 0 0 0
6985 0 ▶ per_form[i].values[PREFIX4] = maps[MAP_PREFIX4].value(form_start, indices[4]);
Branch: 1 branch
BranchTrueFalseTotal
per_form[i].values[PREFIX4] = maps[MAP_PREFIX4].value(form_start, indices[4]); 0 0 0
6986 }
6987 }
6988 0 ▶ per_form[i].values[SUFFIX1] = maps[MAP_SUFFIX1].value(form_start + indices[(index-1)&7], form.str - form_start - indices[(index-1)&7]);
Branch: 1 branch
BranchTrueFalseTotal
per_form[i].values[SUFFIX1] = maps[MAP_SUFFIX1].value(form_start + indices[(index-1)&7], form.str - form_start - indices[(index-1)&7]); 0 0 0
6989 0 ▶ per_form[i].values[SUFFIX2] = maps[MAP_SUFFIX2].value(form_start + indices[(index-2)&7], form.str - form_start - indices[(index-2)&7]);
Branch: 1 branch
BranchTrueFalseTotal
per_form[i].values[SUFFIX2] = maps[MAP_SUFFIX2].value(form_start + indices[(index-2)&7], form.str - form_start - indices[(index-2)&7]); 0 0 0
6990 0 ▶ per_form[i].values[SUFFIX3] = maps[MAP_SUFFIX3].value(form_start + indices[(index-3)&7], form.str - form_start - indices[(index-3)&7]);
Branch: 1 branch
BranchTrueFalseTotal
per_form[i].values[SUFFIX3] = maps[MAP_SUFFIX3].value(form_start + indices[(index-3)&7], form.str - form_start - indices[(index-3)&7]); 0 0 0
6991 0 ▶ per_form[i].values[SUFFIX4] = maps[MAP_SUFFIX4].value(form_start + indices[(index-4)&7], form.str - form_start - indices[(index-4)&7]);
Branch: 1 branch
BranchTrueFalseTotal
per_form[i].values[SUFFIX4] = maps[MAP_SUFFIX4].value(form_start + indices[(index-4)&7], form.str - form_start - indices[(index-4)&7]); 0 0 0
6992 0 per_form[i].values[NUM] = elementary_feature_empty + 1 + num;
6993 0 per_form[i].values[CAP] = elementary_feature_empty + 1 + cap;
6994 0 per_form[i].values[DASH] = elementary_feature_empty + 1 + dash;
6995 }
6996 }
6997 0 }
6998  
6999 template <class Map>
7000 0 void czech_elementary_features<Map>::compute_dynamic_features(const tagged_lemma& tag, const per_form_features& /*per_form*/, const per_tag_features& per_tag, const dynamic_features* prev_dynamic, dynamic_features& dynamic) const {
7001 0 ▶ if (prev_dynamic) {
Branch: 1 branch
BranchTrueFalseTotal
if (prev_dynamic) { 0 0 0
7002 0 dynamic.values[PREVIOUS_VERB_TAG] = prev_dynamic->values[PREVIOUS_OR_CURRENT_VERB_TAG];
7003 0 dynamic.values[PREVIOUS_VERB_LEMMA] = prev_dynamic->values[PREVIOUS_OR_CURRENT_VERB_LEMMA];
7004 } else {
7005 0 dynamic.values[PREVIOUS_VERB_TAG] = elementary_feature_empty;
7006 0 dynamic.values[PREVIOUS_VERB_LEMMA] = elementary_feature_empty;
7007 }
7008  
7009 0 ▶ if (tag.tag[0] == 'V') {
Branch: 1 branch
BranchTrueFalseTotal
if (tag.tag[0] == 'V') { 0 0 0
7010 0 dynamic.values[PREVIOUS_OR_CURRENT_VERB_TAG] = per_tag.values[TAG];
7011 0 dynamic.values[PREVIOUS_OR_CURRENT_VERB_LEMMA] = per_tag.values[LEMMA];
7012 } else {
7013 0 dynamic.values[PREVIOUS_OR_CURRENT_VERB_TAG] = dynamic.values[PREVIOUS_VERB_TAG];
7014 0 dynamic.values[PREVIOUS_OR_CURRENT_VERB_LEMMA] = dynamic.values[PREVIOUS_VERB_LEMMA];
7015 }
7016 0 }
7017  
7018 /////////
7019 // File: tagger/generic_elementary_features.h
7020 /////////
7021  
7022 // This file is part of MorphoDiTa <http://github.com/ufal/morphodita/>.
7023 //
7024 // Copyright 2015 Institute of Formal and Applied Linguistics, Faculty of
7025 // Mathematics and Physics, Charles University in Prague, Czech Republic.
7026 //
7027 // This Source Code Form is subject to the terms of the Mozilla Public
7028 // License, v. 2.0. If a copy of the MPL was not distributed with this
7029 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
7030  
7031 // Declarations
7032 template <class Map>
7033 class generic_elementary_features : public elementary_features<Map> {
7034 public:
7035 generic_elementary_features();
7036  
7037 enum features_per_form { FORM, FOLLOWING_VERB_TAG, FOLLOWING_VERB_LEMMA, NUM, CAP, DASH, PREFIX1, PREFIX2, PREFIX3, PREFIX4, PREFIX5, PREFIX6, PREFIX7, PREFIX8, PREFIX9, SUFFIX1, SUFFIX2, SUFFIX3, SUFFIX4, SUFFIX5, SUFFIX6, SUFFIX7, SUFFIX8, SUFFIX9, PER_FORM_TOTAL };
7038 enum features_per_tag { TAG, TAG1, TAG2, TAG3, TAG4, TAG5, LEMMA, PER_TAG_TOTAL };
7039 enum features_dynamic { PREVIOUS_VERB_TAG, PREVIOUS_VERB_LEMMA, PREVIOUS_OR_CURRENT_VERB_TAG, PREVIOUS_OR_CURRENT_VERB_LEMMA, DYNAMIC_TOTAL };
7040 enum features_map { MAP_NONE = -1, MAP_FORM, MAP_PREFIX1, MAP_PREFIX2, MAP_PREFIX3, MAP_PREFIX4, MAP_PREFIX5, MAP_PREFIX6, MAP_PREFIX7, MAP_PREFIX8, MAP_PREFIX9, MAP_SUFFIX1, MAP_SUFFIX2, MAP_SUFFIX3, MAP_SUFFIX4, MAP_SUFFIX5, MAP_SUFFIX6, MAP_SUFFIX7, MAP_SUFFIX8, MAP_SUFFIX9, MAP_TAG, MAP_TAG1, MAP_TAG2, MAP_TAG3, MAP_TAG4, MAP_TAG5, MAP_LEMMA, MAP_TOTAL } ;
7041  
7042 struct per_form_features { elementary_feature_value values[PER_FORM_TOTAL]; };
7043 struct per_tag_features { elementary_feature_value values[PER_TAG_TOTAL]; };
7044 struct dynamic_features { elementary_feature_value values[DYNAMIC_TOTAL]; };
7045  
7046 static vector<elementary_feature_description> descriptions;
7047  
7048 void compute_features(const vector<string_piece>& forms, const vector<vector<tagged_lemma>>& analyses, vector<per_form_features>& per_form, vector<vector<per_tag_features>>& per_tag) const;
7049 inline void compute_dynamic_features(const tagged_lemma& tag, const per_form_features& per_form, const per_tag_features& per_tag, const dynamic_features* prev_dynamic, dynamic_features& dynamic) const;
7050  
7051 using elementary_features<Map>::maps;
7052 };
7053  
7054 typedef generic_elementary_features<persistent_elementary_feature_map> persistent_generic_elementary_features;
7055  
7056 // Definitions
7057 template <class Map>
7058 1 generic_elementary_features<Map>::generic_elementary_features() {
7059 1 ▶ maps.resize(MAP_TOTAL);
Branch: 1 branch
BranchTrueFalseTotal
maps.resize(MAP_TOTAL); 1 0 1
7060 1 }
7061  
7062 template <class Map>
7063 vector<elementary_feature_description> generic_elementary_features<Map>::descriptions = {
7064 {"Form", PER_FORM, ANY_OFFSET, FORM, MAP_FORM},
7065 {"FollowingVerbTag", PER_FORM, ANY_OFFSET, FOLLOWING_VERB_TAG, MAP_TAG},
7066 {"FollowingVerbLemma", PER_FORM, ANY_OFFSET, FOLLOWING_VERB_LEMMA, MAP_LEMMA },
7067 {"Num", PER_FORM, ONLY_CURRENT, NUM, MAP_NONE},
7068 {"Cap", PER_FORM, ONLY_CURRENT, CAP, MAP_NONE},
7069 {"Dash", PER_FORM, ONLY_CURRENT, DASH, MAP_NONE},
7070 {"Prefix1", PER_FORM, ONLY_CURRENT, PREFIX1, MAP_PREFIX1},
7071 {"Prefix2", PER_FORM, ONLY_CURRENT, PREFIX2, MAP_PREFIX2},
7072 {"Prefix3", PER_FORM, ONLY_CURRENT, PREFIX3, MAP_PREFIX3},
7073 {"Prefix4", PER_FORM, ONLY_CURRENT, PREFIX4, MAP_PREFIX4},
7074 {"Prefix5", PER_FORM, ONLY_CURRENT, PREFIX5, MAP_PREFIX5},
7075 {"Prefix6", PER_FORM, ONLY_CURRENT, PREFIX6, MAP_PREFIX6},
7076 {"Prefix7", PER_FORM, ONLY_CURRENT, PREFIX7, MAP_PREFIX7},
7077 {"Prefix8", PER_FORM, ONLY_CURRENT, PREFIX8, MAP_PREFIX8},
7078 {"Prefix9", PER_FORM, ONLY_CURRENT, PREFIX9, MAP_PREFIX9},
7079 {"Suffix1", PER_FORM, ONLY_CURRENT, SUFFIX1, MAP_SUFFIX1},
7080 {"Suffix2", PER_FORM, ONLY_CURRENT, SUFFIX2, MAP_SUFFIX2},
7081 {"Suffix3", PER_FORM, ONLY_CURRENT, SUFFIX3, MAP_SUFFIX3},
7082 {"Suffix4", PER_FORM, ONLY_CURRENT, SUFFIX4, MAP_SUFFIX4},
7083 {"Suffix5", PER_FORM, ONLY_CURRENT, SUFFIX5, MAP_SUFFIX5},
7084 {"Suffix6", PER_FORM, ONLY_CURRENT, SUFFIX6, MAP_SUFFIX6},
7085 {"Suffix7", PER_FORM, ONLY_CURRENT, SUFFIX7, MAP_SUFFIX7},
7086 {"Suffix8", PER_FORM, ONLY_CURRENT, SUFFIX8, MAP_SUFFIX8},
7087 {"Suffix9", PER_FORM, ONLY_CURRENT, SUFFIX9, MAP_SUFFIX9},
7088  
7089 {"Tag", PER_TAG, ANY_OFFSET, TAG, MAP_TAG},
7090 {"Tag1", PER_TAG, ANY_OFFSET, TAG1, MAP_TAG1},
7091 {"Tag2", PER_TAG, ANY_OFFSET, TAG2, MAP_TAG2},
7092 {"Tag3", PER_TAG, ANY_OFFSET, TAG3, MAP_TAG3},
7093 {"Tag4", PER_TAG, ANY_OFFSET, TAG4, MAP_TAG4},
7094 {"Tag5", PER_TAG, ANY_OFFSET, TAG5, MAP_TAG5},
7095 {"Lemma", PER_TAG, ANY_OFFSET, LEMMA, MAP_LEMMA},
7096  
7097 {"PreviousVerbTag", DYNAMIC, ANY_OFFSET, PREVIOUS_VERB_TAG, MAP_TAG},
7098 {"PreviousVerbLemma", DYNAMIC, ANY_OFFSET, PREVIOUS_VERB_LEMMA, MAP_LEMMA}
7099 };
7100  
7101 template <class Map>
7102 2 void generic_elementary_features<Map>::compute_features(const vector<string_piece>& forms, const vector<vector<tagged_lemma>>& analyses, vector<per_form_features>& per_form, vector<vector<per_tag_features>>& per_tag) const {
7103 using namespace unilib;
7104  
7105 // We process the sentence in reverse order, so that we can compute FollowingVerbTag and FollowingVerbLemma directly.
7106 2 elementary_feature_value following_verb_tag = elementary_feature_empty, following_verb_lemma = elementary_feature_empty;
7107 8 ▶ for (unsigned i = forms.size(); i--;) {
Branch: 1 branch
BranchTrueFalseTotal
for (unsigned i = forms.size(); i--;) { 6 2 8
7108 6 int verb_candidate = -1;
7109  
7110 // Per_tag features and verb_candidate
7111 19 ▶ for (unsigned j = 0; j < analyses[i].size(); j++) {
Branch: 1 branch
BranchTrueFalseTotal
for (unsigned j = 0; j < analyses[i].size(); j++) { 13 6 19
7112 13 per_tag[i][j].values[TAG] = maps[MAP_TAG].value(analyses[i][j].tag.c_str(), analyses[i][j].tag.size());
7113 13 ▶ per_tag[i][j].values[TAG1] = analyses[i][j].tag.size() >= 1 ? maps[MAP_TAG1].value(analyses[i][j].tag.c_str() + 0, 1) : elementary_feature_empty;
Branch: 1 branch
BranchTrueFalseTotal
per_tag[i][j].values[TAG1] = analyses[i][j].tag.size() >= 1 ? maps[MAP_TAG1].value(analyses[i][j].tag.c_str() + 0, 1) : elementary_feature_empty; 13 0 13
7114 13 ▶ per_tag[i][j].values[TAG2] = analyses[i][j].tag.size() >= 2 ? maps[MAP_TAG2].value(analyses[i][j].tag.c_str() + 1, 1) : elementary_feature_empty;
Branch: 1 branch
BranchTrueFalseTotal
per_tag[i][j].values[TAG2] = analyses[i][j].tag.size() >= 2 ? maps[MAP_TAG2].value(analyses[i][j].tag.c_str() + 1, 1) : elementary_feature_empty; 13 0 13
7115 13 ▶ per_tag[i][j].values[TAG3] = analyses[i][j].tag.size() >= 3 ? maps[MAP_TAG3].value(analyses[i][j].tag.c_str() + 2, 1) : elementary_feature_empty;
Branch: 1 branch
BranchTrueFalseTotal
per_tag[i][j].values[TAG3] = analyses[i][j].tag.size() >= 3 ? maps[MAP_TAG3].value(analyses[i][j].tag.c_str() + 2, 1) : elementary_feature_empty; 13 0 13
7116 13 ▶ per_tag[i][j].values[TAG4] = analyses[i][j].tag.size() >= 4 ? maps[MAP_TAG4].value(analyses[i][j].tag.c_str() + 3, 1) : elementary_feature_empty;
Branch: 1 branch
BranchTrueFalseTotal
per_tag[i][j].values[TAG4] = analyses[i][j].tag.size() >= 4 ? maps[MAP_TAG4].value(analyses[i][j].tag.c_str() + 3, 1) : elementary_feature_empty; 2 11 13
7117 13 ▶ per_tag[i][j].values[TAG5] = analyses[i][j].tag.size() >= 5 ? maps[MAP_TAG5].value(analyses[i][j].tag.c_str() + 4, 1) : elementary_feature_empty;
Branch: 1 branch
BranchTrueFalseTotal
per_tag[i][j].values[TAG5] = analyses[i][j].tag.size() >= 5 ? maps[MAP_TAG5].value(analyses[i][j].tag.c_str() + 4, 1) : elementary_feature_empty; 0 13 13
7118 19 ▶ per_tag[i][j].values[LEMMA] = j && analyses[i][j-1].lemma == analyses[i][j].lemma ? per_tag[i][j-1].values[LEMMA] :
Branch: 2 branches
BranchTrueFalseTotal
per_tag[i][j].values[LEMMA] = j && analyses[i][j-1].lemma == analyses[i][j].lemma ? per_tag[i][j-1].values[LEMMA] : 7 6 13
per_tag[i][j].values[LEMMA] = j && analyses[i][j-1].lemma == analyses[i][j].lemma ? per_tag[i][j-1].values[LEMMA] : 7 0 7
7119 6 maps[MAP_LEMMA].value(analyses[i][j].lemma.c_str(), analyses[i][j].lemma.size());
7120  
7121 13 ▶ if (analyses[i][j].tag[0] == 'V') {
Branch: 1 branch
BranchTrueFalseTotal
if (analyses[i][j].tag[0] == 'V') { 3 10 13
7122 int tag_compare;
7123 3 ▶ verb_candidate = verb_candidate < 0 || (tag_compare = analyses[i][j].tag.compare(analyses[i][verb_candidate].tag), tag_compare < 0) || (tag_compare == 0 && analyses[i][j].lemma < analyses[i][verb_candidate].lemma) ? j : verb_candidate;
Branch: 4 branches
BranchTrueFalseTotal
verb_candidate = verb_candidate < 0 || (tag_compare = analyses[i][j].tag.compare(analyses[i][verb_candidate].tag), tag_compare < 0) || (tag_compare == 0 && analyses[i][j].lemma < analyses[i][verb_candidate].lemma) ? j : verb_candidate; 1 2 3
verb_candidate = verb_candidate < 0 || (tag_compare = analyses[i][j].tag.compare(analyses[i][verb_candidate].tag), tag_compare < 0) || (tag_compare == 0 && analyses[i][j].lemma < analyses[i][verb_candidate].lemma) ? j : verb_candidate; 1 0 1
verb_candidate = verb_candidate < 0 || (tag_compare = analyses[i][j].tag.compare(analyses[i][verb_candidate].tag), tag_compare < 0) || (tag_compare == 0 && analyses[i][j].lemma < analyses[i][verb_candidate].lemma) ? j : verb_candidate; 0 1 1
verb_candidate = verb_candidate < 0 || (tag_compare = analyses[i][j].tag.compare(analyses[i][verb_candidate].tag), tag_compare < 0) || (tag_compare == 0 && analyses[i][j].lemma < analyses[i][verb_candidate].lemma) ? j : verb_candidate; 0 0 0
7124 }
7125 }
7126  
7127 // Per_form features
7128 6 per_form[i].values[FORM] = maps[MAP_FORM].value(forms[i].str, forms[i].len);
7129 6 per_form[i].values[FOLLOWING_VERB_TAG] = following_verb_tag;
7130 6 per_form[i].values[FOLLOWING_VERB_LEMMA] = following_verb_lemma;
7131  
7132 // Update following_verb_{tag,lemma} _after_ filling FOLLOWING_VERB_{TAG,LEMMA}.
7133 6 ▶ if (verb_candidate >= 0) {
Branch: 1 branch
BranchTrueFalseTotal
if (verb_candidate >= 0) { 2 4 6
7134 2 following_verb_tag = per_tag[i][verb_candidate].values[TAG];
7135 2 following_verb_lemma = per_tag[i][verb_candidate].values[LEMMA];
7136 }
7137  
7138 // Ortographic per_form features if needed
7139 6 ▶ if (analyses[i].size() == 1) {
Branch: 1 branch
BranchTrueFalseTotal
if (analyses[i].size() == 1) { 3 3 6
7140 3 per_form[i].values[NUM] = per_form[i].values[CAP] = per_form[i].values[DASH] = elementary_feature_unknown;
7141 3 per_form[i].values[PREFIX1] = per_form[i].values[PREFIX2] = per_form[i].values[PREFIX3] = elementary_feature_unknown;
7142 3 per_form[i].values[PREFIX4] = per_form[i].values[PREFIX5] = per_form[i].values[PREFIX6] = elementary_feature_unknown;
7143 3 per_form[i].values[PREFIX7] = per_form[i].values[PREFIX8] = per_form[i].values[PREFIX9] = elementary_feature_unknown;
7144 3 per_form[i].values[SUFFIX1] = per_form[i].values[SUFFIX2] = per_form[i].values[SUFFIX3] = elementary_feature_unknown;
7145 3 per_form[i].values[SUFFIX4] = per_form[i].values[SUFFIX5] = per_form[i].values[SUFFIX6] = elementary_feature_unknown;
7146 3 per_form[i].values[SUFFIX7] = per_form[i].values[SUFFIX8] = per_form[i].values[SUFFIX9] = elementary_feature_unknown;
7147 3 ▶ } else if (forms[i].len <= 0) {
Branch: 1 branch
BranchTrueFalseTotal
} else if (forms[i].len <= 0) { 0 3 3
7148 0 per_form[i].values[NUM] = per_form[i].values[CAP] = per_form[i].values[DASH] = elementary_feature_empty + 1;
7149 0 per_form[i].values[PREFIX1] = per_form[i].values[PREFIX2] = per_form[i].values[PREFIX3] = elementary_feature_empty;
7150 0 per_form[i].values[PREFIX4] = per_form[i].values[PREFIX5] = per_form[i].values[PREFIX6] = elementary_feature_empty;
7151 0 per_form[i].values[PREFIX7] = per_form[i].values[PREFIX8] = per_form[i].values[PREFIX9] = elementary_feature_empty;
7152 0 per_form[i].values[SUFFIX1] = per_form[i].values[SUFFIX2] = per_form[i].values[SUFFIX3] = elementary_feature_empty;
7153 0 per_form[i].values[SUFFIX4] = per_form[i].values[SUFFIX5] = per_form[i].values[SUFFIX6] = elementary_feature_empty;
7154 0 per_form[i].values[SUFFIX7] = per_form[i].values[SUFFIX8] = per_form[i].values[SUFFIX9] = elementary_feature_empty;
7155 } else {
7156 3 string_piece form = forms[i];
7157 3 const char* form_start = form.str;
7158  
7159 3 bool num = false, cap = false, dash = false;
7160 3 size_t indices[18] = {0, form.len, form.len, form.len, form.len, form.len, form.len, form.len, form.len, form.len, 0, 0, 0, 0, 0, 0, 0, 0}; // careful here regarding forms shorter than 9 characters
7161 3 int index = 0;
7162 17 ▶ while (form.len) {
Branch: 1 branch
BranchTrueFalseTotal
while (form.len) { 14 3 17
7163 14 indices[(index++) % 18] = form.str - form_start;
7164  
7165 14 unicode::category_t cat = unicode::category(utf8::decode(form.str, form.len));
7166 14 ▶ num = num || cat & unicode::N;
Branch: 2 branches
BranchTrueFalseTotal
num = num || cat & unicode::N; 14 0 14
num = num || cat & unicode::N; 0 14 14
7167 14 ▶ cap = cap || cat & unicode::Lut;
Branch: 2 branches
BranchTrueFalseTotal
cap = cap || cat & unicode::Lut; 10 4 14
cap = cap || cat & unicode::Lut; 1 9 10
7168 14 ▶ dash = dash || cat & unicode::Pd;
Branch: 2 branches
BranchTrueFalseTotal
dash = dash || cat & unicode::Pd; 14 0 14
dash = dash || cat & unicode::Pd; 0 14 14
7169  
7170 14 ▶ if (index == 10 || (!form.len && index < 10)) {
Branch: 3 branches
BranchTrueFalseTotal
if (index == 10 || (!form.len && index < 10)) { 14 0 14
if (index == 10 || (!form.len && index < 10)) { 3 11 14
if (index == 10 || (!form.len && index < 10)) { 3 0 3
7171 3 ▶ per_form[i].values[PREFIX1] = maps[MAP_PREFIX1].value(form_start, indices[1]);
Branch: 1 branch
BranchTrueFalseTotal
per_form[i].values[PREFIX1] = maps[MAP_PREFIX1].value(form_start, indices[1]); 3 0 3
7172 3 ▶ per_form[i].values[PREFIX2] = maps[MAP_PREFIX2].value(form_start, indices[2]);
Branch: 1 branch
BranchTrueFalseTotal
per_form[i].values[PREFIX2] = maps[MAP_PREFIX2].value(form_start, indices[2]); 3 0 3
7173 3 ▶ per_form[i].values[PREFIX3] = maps[MAP_PREFIX3].value(form_start, indices[3]);
Branch: 1 branch
BranchTrueFalseTotal
per_form[i].values[PREFIX3] = maps[MAP_PREFIX3].value(form_start, indices[3]); 3 0 3
7174 3 ▶ per_form[i].values[PREFIX4] = maps[MAP_PREFIX4].value(form_start, indices[4]);
Branch: 1 branch
BranchTrueFalseTotal
per_form[i].values[PREFIX4] = maps[MAP_PREFIX4].value(form_start, indices[4]); 3 0 3
7175 3 ▶ per_form[i].values[PREFIX5] = maps[MAP_PREFIX5].value(form_start, indices[5]);
Branch: 1 branch
BranchTrueFalseTotal
per_form[i].values[PREFIX5] = maps[MAP_PREFIX5].value(form_start, indices[5]); 3 0 3
7176 3 ▶ per_form[i].values[PREFIX6] = maps[MAP_PREFIX6].value(form_start, indices[6]);
Branch: 1 branch
BranchTrueFalseTotal
per_form[i].values[PREFIX6] = maps[MAP_PREFIX6].value(form_start, indices[6]); 3 0 3
7177 3 ▶ per_form[i].values[PREFIX7] = maps[MAP_PREFIX7].value(form_start, indices[7]);
Branch: 1 branch
BranchTrueFalseTotal
per_form[i].values[PREFIX7] = maps[MAP_PREFIX7].value(form_start, indices[7]); 3 0 3
7178 3 ▶ per_form[i].values[PREFIX8] = maps[MAP_PREFIX8].value(form_start, indices[8]);
Branch: 1 branch
BranchTrueFalseTotal
per_form[i].values[PREFIX8] = maps[MAP_PREFIX8].value(form_start, indices[8]); 3 0 3
7179 3 ▶ per_form[i].values[PREFIX9] = maps[MAP_PREFIX9].value(form_start, indices[9]);
Branch: 1 branch
BranchTrueFalseTotal
per_form[i].values[PREFIX9] = maps[MAP_PREFIX9].value(form_start, indices[9]); 3 0 3
7180 }
7181 }
7182 3 ▶ per_form[i].values[SUFFIX1] = maps[MAP_SUFFIX1].value(form_start + indices[(index+18-1) % 18], form.str - form_start - indices[(index+18-1) % 18]);
Branch: 1 branch
BranchTrueFalseTotal
per_form[i].values[SUFFIX1] = maps[MAP_SUFFIX1].value(form_start + indices[(index+18-1) % 18], form.str - form_start - indices[(index+18-1) % 18]); 3 0 3
7183 3 ▶ per_form[i].values[SUFFIX2] = maps[MAP_SUFFIX2].value(form_start + indices[(index+18-2) % 18], form.str - form_start - indices[(index+18-2) % 18]);
Branch: 1 branch
BranchTrueFalseTotal
per_form[i].values[SUFFIX2] = maps[MAP_SUFFIX2].value(form_start + indices[(index+18-2) % 18], form.str - form_start - indices[(index+18-2) % 18]); 3 0 3
7184 3 ▶ per_form[i].values[SUFFIX3] = maps[MAP_SUFFIX3].value(form_start + indices[(index+18-3) % 18], form.str - form_start - indices[(index+18-3) % 18]);
Branch: 1 branch
BranchTrueFalseTotal
per_form[i].values[SUFFIX3] = maps[MAP_SUFFIX3].value(form_start + indices[(index+18-3) % 18], form.str - form_start - indices[(index+18-3) % 18]); 3 0 3
7185 3 ▶ per_form[i].values[SUFFIX4] = maps[MAP_SUFFIX4].value(form_start + indices[(index+18-4) % 18], form.str - form_start - indices[(index+18-4) % 18]);
Branch: 1 branch
BranchTrueFalseTotal
per_form[i].values[SUFFIX4] = maps[MAP_SUFFIX4].value(form_start + indices[(index+18-4) % 18], form.str - form_start - indices[(index+18-4) % 18]); 3 0 3
7186 3 ▶ per_form[i].values[SUFFIX5] = maps[MAP_SUFFIX5].value(form_start + indices[(index+18-5) % 18], form.str - form_start - indices[(index+18-5) % 18]);
Branch: 1 branch
BranchTrueFalseTotal
per_form[i].values[SUFFIX5] = maps[MAP_SUFFIX5].value(form_start + indices[(index+18-5) % 18], form.str - form_start - indices[(index+18-5) % 18]); 3 0 3
7187 3 ▶ per_form[i].values[SUFFIX6] = maps[MAP_SUFFIX6].value(form_start + indices[(index+18-6) % 18], form.str - form_start - indices[(index+18-6) % 18]);
Branch: 1 branch
BranchTrueFalseTotal
per_form[i].values[SUFFIX6] = maps[MAP_SUFFIX6].value(form_start + indices[(index+18-6) % 18], form.str - form_start - indices[(index+18-6) % 18]); 3 0 3
7188 3 ▶ per_form[i].values[SUFFIX7] = maps[MAP_SUFFIX7].value(form_start + indices[(index+18-7) % 18], form.str - form_start - indices[(index+18-7) % 18]);
Branch: 1 branch
BranchTrueFalseTotal
per_form[i].values[SUFFIX7] = maps[MAP_SUFFIX7].value(form_start + indices[(index+18-7) % 18], form.str - form_start - indices[(index+18-7) % 18]); 3 0 3
7189 3 ▶ per_form[i].values[SUFFIX8] = maps[MAP_SUFFIX8].value(form_start + indices[(index+18-8) % 18], form.str - form_start - indices[(index+18-8) % 18]);
Branch: 1 branch
BranchTrueFalseTotal
per_form[i].values[SUFFIX8] = maps[MAP_SUFFIX8].value(form_start + indices[(index+18-8) % 18], form.str - form_start - indices[(index+18-8) % 18]); 3 0 3
7190 3 ▶ per_form[i].values[SUFFIX9] = maps[MAP_SUFFIX9].value(form_start + indices[(index+18-9) % 18], form.str - form_start - indices[(index+18-9) % 18]);
Branch: 1 branch
BranchTrueFalseTotal
per_form[i].values[SUFFIX9] = maps[MAP_SUFFIX9].value(form_start + indices[(index+18-9) % 18], form.str - form_start - indices[(index+18-9) % 18]); 3 0 3
7191 3 per_form[i].values[NUM] = elementary_feature_empty + 1 + num;
7192 3 per_form[i].values[CAP] = elementary_feature_empty + 1 + cap;
7193 3 per_form[i].values[DASH] = elementary_feature_empty + 1 + dash;
7194 }
7195 }
7196 2 }
7197  
7198 template <class Map>
7199 29 void generic_elementary_features<Map>::compute_dynamic_features(const tagged_lemma& tag, const per_form_features& /*per_form*/, const per_tag_features& per_tag, const dynamic_features* prev_dynamic, dynamic_features& dynamic) const {
7200 29 ▶ if (prev_dynamic) {
Branch: 1 branch
BranchTrueFalseTotal
if (prev_dynamic) { 24 5 29
7201 24 dynamic.values[PREVIOUS_VERB_TAG] = prev_dynamic->values[PREVIOUS_OR_CURRENT_VERB_TAG];
7202 24 dynamic.values[PREVIOUS_VERB_LEMMA] = prev_dynamic->values[PREVIOUS_OR_CURRENT_VERB_LEMMA];
7203 } else {
7204 5 dynamic.values[PREVIOUS_VERB_TAG] = elementary_feature_empty;
7205 5 dynamic.values[PREVIOUS_VERB_LEMMA] = elementary_feature_empty;
7206 }
7207  
7208 29 ▶ if (tag.tag[0] == 'V') {
Branch: 1 branch
BranchTrueFalseTotal
if (tag.tag[0] == 'V') { 9 20 29
7209 9 dynamic.values[PREVIOUS_OR_CURRENT_VERB_TAG] = per_tag.values[TAG];
7210 9 dynamic.values[PREVIOUS_OR_CURRENT_VERB_LEMMA] = per_tag.values[LEMMA];
7211 } else {
7212 20 dynamic.values[PREVIOUS_OR_CURRENT_VERB_TAG] = dynamic.values[PREVIOUS_VERB_TAG];
7213 20 dynamic.values[PREVIOUS_OR_CURRENT_VERB_LEMMA] = dynamic.values[PREVIOUS_VERB_LEMMA];
7214 }
7215 29 }
7216  
7217 /////////
7218 // File: utils/threadsafe_stack.h
7219 /////////
7220  
7221 // This file is part of UFAL C++ Utils <http://github.com/ufal/cpp_utils/>.
7222 //
7223 // Copyright 2015 Institute of Formal and Applied Linguistics, Faculty of
7224 // Mathematics and Physics, Charles University in Prague, Czech Republic.
7225 //
7226 // This Source Code Form is subject to the terms of the Mozilla Public
7227 // License, v. 2.0. If a copy of the MPL was not distributed with this
7228 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
7229  
7230 namespace utils {
7231  
7232 //
7233 // Declarations
7234 //
7235  
7236 template <class T>
7237 class threadsafe_stack {
7238 public:
7239 inline void push(T* t);
7240 inline T* pop();
7241  
7242 private:
7243 vector<unique_ptr<T>> stack;
7244 atomic_flag lock = ATOMIC_FLAG_INIT;
7245 };
7246  
7247 //
7248 // Definitions
7249 //
7250  
7251 template <class T>
7252 0 void threadsafe_stack<T>::push(T* t) {
7253 0 ▶ while (lock.test_and_set(memory_order_acquire)) {}
Branch: 3 branches
BranchTrueFalseTotal
while (lock.test_and_set(memory_order_acquire)) {} 0 0 0
while (lock.test_and_set(memory_order_acquire)) {} 0 2 2
while (lock.test_and_set(memory_order_acquire)) {} 0 0 0
7254 0 stack.emplace_back(t);
7255 0 lock.clear(memory_order_release);
7256 0 }
7257  
7258 template <class T>
7259 0 T* threadsafe_stack<T>::pop() {
7260 0 T* res = nullptr;
7261  
7262 0 ▶ while (lock.test_and_set(memory_order_acquire)) {}
Branch: 3 branches
BranchTrueFalseTotal
while (lock.test_and_set(memory_order_acquire)) {} 0 0 0
while (lock.test_and_set(memory_order_acquire)) {} 0 2 2
while (lock.test_and_set(memory_order_acquire)) {} 0 0 0
7263 0 ▶ if (!stack.empty()) {
Branch: 3 branches
BranchTrueFalseTotal
if (!stack.empty()) { 0 0 0
if (!stack.empty()) { 1 1 2
if (!stack.empty()) { 0 0 0
7264 0 res = stack.back().release();
7265 0 stack.pop_back();
7266 }
7267 0 lock.clear(memory_order_release);
7268  
7269 0 return res;
7270 }
7271  
7272 } // namespace utils
7273  
7274 /////////
7275 // File: tagger/perceptron_tagger.h
7276 /////////
7277  
7278 // This file is part of MorphoDiTa <http://github.com/ufal/morphodita/>.
7279 //
7280 // Copyright 2015 Institute of Formal and Applied Linguistics, Faculty of
7281 // Mathematics and Physics, Charles University in Prague, Czech Republic.
7282 //
7283 // This Source Code Form is subject to the terms of the Mozilla Public
7284 // License, v. 2.0. If a copy of the MPL was not distributed with this
7285 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
7286  
7287 // Declarations
7288 template<class FeatureSequences>
7289 class perceptron_tagger : public tagger {
7290 public:
7291 perceptron_tagger(int decoding_order, int window_size);
7292  
7293 bool load(istream& is);
7294 virtual const morpho* get_morpho() const override;
7295 virtual void tag(const vector<string_piece>& forms, vector<tagged_lemma>& tags, morpho::guesser_mode guesser = morpho::guesser_mode(-1)) const override;
7296 virtual void tag_analyzed(const vector<string_piece>& forms, const vector<vector<tagged_lemma>>& analyses, vector<int>& tags) const override;
7297  
7298 private:
7299 int decoding_order, window_size;
7300  
7301 unique_ptr<morpho> dict;
7302 bool use_guesser;
7303 FeatureSequences features;
7304 typedef viterbi<FeatureSequences> viterbi_decoder;
7305 viterbi_decoder decoder;
7306 struct cache {
7307 vector<string_piece> forms;
7308 vector<vector<tagged_lemma>> analyses;
7309 vector<int> tags;
7310 typename viterbi_decoder::cache decoder_cache;
7311  
7312 0 ▶ cache(const perceptron_tagger<FeatureSequences>& self) : decoder_cache(self.decoder) {}
Branch: 3 branches
BranchTrueFalseTotal
cache(const perceptron_tagger<FeatureSequences>& self) : decoder_cache(self.decoder) {} 0 0 0
cache(const perceptron_tagger<FeatureSequences>& self) : decoder_cache(self.decoder) {} 1 0 1
cache(const perceptron_tagger<FeatureSequences>& self) : decoder_cache(self.decoder) {} 0 0 0
7313 };
7314  
7315 mutable threadsafe_stack<cache> caches;
7316 };
7317  
7318 // Definitions
7319  
7320 template<class FeatureSequences>
7321 0 perceptron_tagger<FeatureSequences>::perceptron_tagger(int decoding_order, int window_size)
7322 0 ▶ : decoding_order(decoding_order), window_size(window_size), decoder(features, decoding_order, window_size) {}
Branch: 3 branches
BranchTrueFalseTotal
: decoding_order(decoding_order), window_size(window_size), decoder(features, decoding_order, window_size) {} 0 0 0
: decoding_order(decoding_order), window_size(window_size), decoder(features, decoding_order, window_size) {} 1 0 1
: decoding_order(decoding_order), window_size(window_size), decoder(features, decoding_order, window_size) {} 0 0 0
7323  
7324 template<class FeatureSequences>
7325 0 bool perceptron_tagger<FeatureSequences>::load(istream& is) {
7326 0 ▶ if (dict.reset(morpho::load(is)), !dict) return false;
Branch: 3 branches
BranchTrueFalseTotal
if (dict.reset(morpho::load(is)), !dict) return false; 0 0 0
if (dict.reset(morpho::load(is)), !dict) return false; 0 1 1
if (dict.reset(morpho::load(is)), !dict) return false; 0 0 0
7327 0 use_guesser = is.get();
7328 0 ▶ if (!features.load(is)) return false;
Branch: 3 branches
BranchTrueFalseTotal
if (!features.load(is)) return false; 0 0 0
if (!features.load(is)) return false; 0 1 1
if (!features.load(is)) return false; 0 0 0
7329 0 return true;
7330 }
7331  
7332 template<class FeatureSequences>
7333 0 const morpho* perceptron_tagger<FeatureSequences>::get_morpho() const {
7334 0 return dict.get();
7335 }
7336  
7337 template<class FeatureSequences>
7338 0 void perceptron_tagger<FeatureSequences>::tag(const vector<string_piece>& forms, vector<tagged_lemma>& tags, morpho::guesser_mode guesser) const {
7339 0 tags.clear();
7340 0 ▶ if (!dict) return;
Branch: 3 branches
BranchTrueFalseTotal
if (!dict) return; 0 0 0
if (!dict) return; 0 2 2
if (!dict) return; 0 0 0
7341  
7342 0 cache* c = caches.pop();
7343 0 ▶ if (!c) c = new cache(*this);
Branch: 9 branches
BranchTrueFalseTotal
if (!c) c = new cache(*this); 0 0 0
if (!c) c = new cache(*this); 0 0 0
if (!c) c = new cache(*this); 0 0 0
if (!c) c = new cache(*this); 1 1 2
if (!c) c = new cache(*this); 1 0 1
if (!c) c = new cache(*this); 0 0 0
if (!c) c = new cache(*this); 0 0 0
if (!c) c = new cache(*this); 0 0 0
if (!c) c = new cache(*this); 0 0 0
7344  
7345 0 c->forms.resize(forms.size());
7346 0 ▶ if (c->analyses.size() < forms.size()) c->analyses.resize(forms.size());
Branch: 3 branches
BranchTrueFalseTotal
if (c->analyses.size() < forms.size()) c->analyses.resize(forms.size()); 0 0 0
if (c->analyses.size() < forms.size()) c->analyses.resize(forms.size()); 1 1 2
if (c->analyses.size() < forms.size()) c->analyses.resize(forms.size()); 0 0 0
7347 0 ▶ for (unsigned i = 0; i < forms.size(); i++) {
Branch: 3 branches
BranchTrueFalseTotal
for (unsigned i = 0; i < forms.size(); i++) { 0 0 0
for (unsigned i = 0; i < forms.size(); i++) { 6 2 8
for (unsigned i = 0; i < forms.size(); i++) { 0 0 0
7348 0 c->forms[i] = forms[i];
7349 0 c->forms[i].len = dict->raw_form_len(forms[i]);
7350 0 ▶ dict->analyze(forms[i], guesser >= 0 ? guesser : use_guesser ? morpho::GUESSER : morpho::NO_GUESSER, c->analyses[i]);
Branch: 6 branches
BranchTrueFalseTotal
dict->analyze(forms[i], guesser >= 0 ? guesser : use_guesser ? morpho::GUESSER : morpho::NO_GUESSER, c->analyses[i]); 0 0 0
dict->analyze(forms[i], guesser >= 0 ? guesser : use_guesser ? morpho::GUESSER : morpho::NO_GUESSER, c->analyses[i]); 0 0 0
dict->analyze(forms[i], guesser >= 0 ? guesser : use_guesser ? morpho::GUESSER : morpho::NO_GUESSER, c->analyses[i]); 6 0 6
dict->analyze(forms[i], guesser >= 0 ? guesser : use_guesser ? morpho::GUESSER : morpho::NO_GUESSER, c->analyses[i]); 0 6 6
dict->analyze(forms[i], guesser >= 0 ? guesser : use_guesser ? morpho::GUESSER : morpho::NO_GUESSER, c->analyses[i]); 0 0 0
dict->analyze(forms[i], guesser >= 0 ? guesser : use_guesser ? morpho::GUESSER : morpho::NO_GUESSER, c->analyses[i]); 0 0 0
7351 }
7352  
7353 0 ▶ if (c->tags.size() < forms.size()) c->tags.resize(forms.size() * 2);
Branch: 3 branches
BranchTrueFalseTotal
if (c->tags.size() < forms.size()) c->tags.resize(forms.size() * 2); 0 0 0
if (c->tags.size() < forms.size()) c->tags.resize(forms.size() * 2); 1 1 2
if (c->tags.size() < forms.size()) c->tags.resize(forms.size() * 2); 0 0 0
7354 0 decoder.tag(c->forms, c->analyses, c->decoder_cache, c->tags);
7355  
7356 0 ▶ for (unsigned i = 0; i < forms.size(); i++)
Branch: 3 branches
BranchTrueFalseTotal
for (unsigned i = 0; i < forms.size(); i++) 0 0 0
for (unsigned i = 0; i < forms.size(); i++) 6 2 8
for (unsigned i = 0; i < forms.size(); i++) 0 0 0
7357 0 tags.emplace_back(c->analyses[i][c->tags[i]]);
7358  
7359 0 caches.push(c);
7360 }
7361  
7362 template<class FeatureSequences>
7363 0 void perceptron_tagger<FeatureSequences>::tag_analyzed(const vector<string_piece>& forms, const vector<vector<tagged_lemma>>& analyses, vector<int>& tags) const {
7364 0 tags.clear();
7365  
7366 0 cache* c = caches.pop();
7367 0 ▶ if (!c) c = new cache(*this);
Branch: 9 branches
BranchTrueFalseTotal
if (!c) c = new cache(*this); 0 0 0
if (!c) c = new cache(*this); 0 0 0
if (!c) c = new cache(*this); 0 0 0
if (!c) c = new cache(*this); 0 0 0
if (!c) c = new cache(*this); 0 0 0
if (!c) c = new cache(*this); 0 0 0
if (!c) c = new cache(*this); 0 0 0
if (!c) c = new cache(*this); 0 0 0
if (!c) c = new cache(*this); 0 0 0
7368  
7369 0 tags.resize(forms.size());
7370 0 decoder.tag(forms, analyses, c->decoder_cache, tags);
7371  
7372 0 caches.push(c);
7373 0 }
7374  
7375 /////////
7376 // File: tagger/tagger_ids.h
7377 /////////
7378  
7379 // This file is part of MorphoDiTa <http://github.com/ufal/morphodita/>.
7380 //
7381 // Copyright 2015 Institute of Formal and Applied Linguistics, Faculty of
7382 // Mathematics and Physics, Charles University in Prague, Czech Republic.
7383 //
7384 // This Source Code Form is subject to the terms of the Mozilla Public
7385 // License, v. 2.0. If a copy of the MPL was not distributed with this
7386 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
7387  
7388 class tagger_ids {
7389 public:
7390 enum tagger_id {
7391 CZECH2 = 0, CZECH3 = 1, CZECH2_3 = 6,
7392 /* 2 was used internally for ENGLISH3, but never released publicly */
7393 GENERIC2 = 3, GENERIC3 = 4, GENERIC4 = 5, GENERIC2_3 = 7,
7394 CONLLU2 = 8, CONLLU2_3 = 9, CONLLU3 = 10,
7395 };
7396  
7397 static bool parse(const string& str, tagger_id& id) {
7398 if (str == "czech2") return id = CZECH2, true;
7399 if (str == "czech2_3") return id = CZECH2_3, true;
7400 if (str == "czech3") return id = CZECH3, true;
7401 if (str == "generic2") return id = GENERIC2, true;
7402 if (str == "generic2_3") return id = GENERIC2_3, true;
7403 if (str == "generic3") return id = GENERIC3, true;
7404 if (str == "generic4") return id = GENERIC4, true;
7405 if (str == "conllu2") return id = CONLLU2, true;
7406 if (str == "conllu2_3") return id = CONLLU2_3, true;
7407 if (str == "conllu3") return id = CONLLU3, true;
7408 return false;
7409 }
7410  
7411 2 static int decoding_order(tagger_id id) {
7412 2 switch (id) {
7413 0 case CZECH2: return 2;
7414 0 case CZECH2_3: return 2;
7415 0 case CZECH3: return 3;
7416 0 case GENERIC2: return 2;
7417 0 case GENERIC2_3: return 2;
7418 2 case GENERIC3: return 3;
7419 0 case GENERIC4: return 4;
7420 0 case CONLLU2: return 2;
7421 0 case CONLLU2_3: return 2;
7422 0 case CONLLU3: return 3;
7423 }
7424 0 return 0;
7425 }
7426  
7427 1 static int window_size(tagger_id id) {
7428 1 switch (id) {
7429 0 case CZECH2_3: return 3;
7430 0 case GENERIC2_3: return 3;
7431 0 case CONLLU2_3: return 3;
7432 1 default: break;
7433 }
7434 1 return decoding_order(id);
7435 }
7436 };
7437  
7438 typedef tagger_ids::tagger_id tagger_id;
7439  
7440 /////////
7441 // File: tagger/tagger.cpp
7442 /////////
7443  
7444 // This file is part of MorphoDiTa <http://github.com/ufal/morphodita/>.
7445 //
7446 // Copyright 2015 Institute of Formal and Applied Linguistics, Faculty of
7447 // Mathematics and Physics, Charles University in Prague, Czech Republic.
7448 //
7449 // This Source Code Form is subject to the terms of the Mozilla Public
7450 // License, v. 2.0. If a copy of the MPL was not distributed with this
7451 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
7452  
7453 1 tagger* tagger::load(istream& is) {
7454 1 tagger_id id = tagger_id(is.get());
7455 1 switch (id) {
7456 0 case tagger_ids::CZECH2:
7457 case tagger_ids::CZECH2_3:
7458 case tagger_ids::CZECH3:
7459 {
7460 0 ▶ auto res = new_unique_ptr<perceptron_tagger<persistent_feature_sequences<persistent_czech_elementary_features>>>(tagger_ids::decoding_order(id), tagger_ids::window_size(id));
Branch: 1 branch
BranchTrueFalseTotal
auto res = new_unique_ptr<perceptron_tagger<persistent_feature_sequences<persistent_czech_elementary_features>>>(tagger_ids::decoding_order(id), tagger_ids::window_size(id)); 0 0 0
7461 0 ▶ if (res->load(is)) return res.release();
Branch: 2 branches
BranchTrueFalseTotal
if (res->load(is)) return res.release(); 0 0 0
if (res->load(is)) return res.release(); 0 0 0
7462 0 break;
7463 0 ▶ }
Branch: 1 branch
BranchTrueFalseTotal
} 0 0 0
7464 1 case tagger_ids::GENERIC2:
7465 case tagger_ids::GENERIC2_3:
7466 case tagger_ids::GENERIC3:
7467 case tagger_ids::GENERIC4:
7468 {
7469 1 ▶ auto res = new_unique_ptr<perceptron_tagger<persistent_feature_sequences<persistent_generic_elementary_features>>>(tagger_ids::decoding_order(id), tagger_ids::window_size(id));
Branch: 1 branch
BranchTrueFalseTotal
auto res = new_unique_ptr<perceptron_tagger<persistent_feature_sequences<persistent_generic_elementary_features>>>(tagger_ids::decoding_order(id), tagger_ids::window_size(id)); 1 0 1
7470 1 ▶ if (res->load(is)) return res.release();
Branch: 2 branches
BranchTrueFalseTotal
if (res->load(is)) return res.release(); 1 0 1
if (res->load(is)) return res.release(); 1 0 1
7471 0 break;
7472 1 ▶ }
Branch: 1 branch
BranchTrueFalseTotal
} 1 0 1
7473 0 case tagger_ids::CONLLU2:
7474 case tagger_ids::CONLLU2_3:
7475 case tagger_ids::CONLLU3:
7476 {
7477 0 ▶ auto res = new_unique_ptr<perceptron_tagger<persistent_feature_sequences<persistent_conllu_elementary_features>>>(tagger_ids::decoding_order(id), tagger_ids::window_size(id));
Branch: 1 branch
BranchTrueFalseTotal
auto res = new_unique_ptr<perceptron_tagger<persistent_feature_sequences<persistent_conllu_elementary_features>>>(tagger_ids::decoding_order(id), tagger_ids::window_size(id)); 0 0 0
7478 0 ▶ if (res->load(is)) return res.release();
Branch: 2 branches
BranchTrueFalseTotal
if (res->load(is)) return res.release(); 0 0 0
if (res->load(is)) return res.release(); 0 0 0
7479 0 break;
7480 0 ▶ }
Branch: 1 branch
BranchTrueFalseTotal
} 0 0 0
7481 }
7482  
7483 0 return nullptr;
7484 }
7485  
7486 1 tagger* tagger::load(const char* fname) {
7487 1 ▶ ifstream f(path_from_utf8(fname).c_str(), ifstream::binary);
Branch: 2 branches
BranchTrueFalseTotal
ifstream f(path_from_utf8(fname).c_str(), ifstream::binary); 1 0 1
ifstream f(path_from_utf8(fname).c_str(), ifstream::binary); 1 0 1
7488 1 ▶ if (!f) return nullptr;
Branch: 2 branches
BranchTrueFalseTotal
if (!f) return nullptr; 1 0 1
if (!f) return nullptr; 0 1 1
7489  
7490 1 ▶ return load(f);
Branch: 1 branch
BranchTrueFalseTotal
return load(f); 1 0 1
7491 1 }
7492  
7493 2 tokenizer* tagger::new_tokenizer() const {
7494 2 auto morpho = get_morpho();
7495 2 ▶ return morpho ? morpho->new_tokenizer() : nullptr;
Branch: 1 branch
BranchTrueFalseTotal
return morpho ? morpho->new_tokenizer() : nullptr; 2 0 2
7496 }
7497  
7498 /////////
7499 // File: tagset_converter/identity_tagset_converter.h
7500 /////////
7501  
7502 // This file is part of MorphoDiTa <http://github.com/ufal/morphodita/>.
7503 //
7504 // Copyright 2015 Institute of Formal and Applied Linguistics, Faculty of
7505 // Mathematics and Physics, Charles University in Prague, Czech Republic.
7506 //
7507 // This Source Code Form is subject to the terms of the Mozilla Public
7508 // License, v. 2.0. If a copy of the MPL was not distributed with this
7509 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
7510  
7511 class identity_tagset_converter : public tagset_converter {
7512 public:
7513 virtual void convert(tagged_lemma& tagged_lemma) const override;
7514 virtual void convert_analyzed(vector<tagged_lemma>& tagged_lemmas) const override;
7515 virtual void convert_generated(vector<tagged_lemma_forms>& forms) const override;
7516 };
7517  
7518 /////////
7519 // File: tagset_converter/identity_tagset_converter.cpp
7520 /////////
7521  
7522 // This file is part of MorphoDiTa <http://github.com/ufal/morphodita/>.
7523 //
7524 // Copyright 2015 Institute of Formal and Applied Linguistics, Faculty of
7525 // Mathematics and Physics, Charles University in Prague, Czech Republic.
7526 //
7527 // This Source Code Form is subject to the terms of the Mozilla Public
7528 // License, v. 2.0. If a copy of the MPL was not distributed with this
7529 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
7530  
7531 0 void identity_tagset_converter::convert(tagged_lemma& /*tagged_lemma*/) const {}
7532  
7533 0 void identity_tagset_converter::convert_analyzed(vector<tagged_lemma>& /*tagged_lemmas*/) const {}
7534  
7535 0 void identity_tagset_converter::convert_generated(vector<tagged_lemma_forms>& /*forms*/) const {}
7536  
7537 /////////
7538 // File: tagset_converter/pdt_to_conll2009_tagset_converter.h
7539 /////////
7540  
7541 // This file is part of MorphoDiTa <http://github.com/ufal/morphodita/>.
7542 //
7543 // Copyright 2015 Institute of Formal and Applied Linguistics, Faculty of
7544 // Mathematics and Physics, Charles University in Prague, Czech Republic.
7545 //
7546 // This Source Code Form is subject to the terms of the Mozilla Public
7547 // License, v. 2.0. If a copy of the MPL was not distributed with this
7548 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
7549  
7550 class pdt_to_conll2009_tagset_converter : public tagset_converter {
7551 public:
7552 virtual void convert(tagged_lemma& tagged_lemma) const override;
7553 virtual void convert_analyzed(vector<tagged_lemma>& tagged_lemmas) const override;
7554 virtual void convert_generated(vector<tagged_lemma_forms>& forms) const override;
7555  
7556 private:
7557 inline void convert_tag(const string& lemma, string& tag) const;
7558 inline bool convert_lemma(string& lemma) const;
7559 };
7560  
7561 /////////
7562 // File: tagset_converter/pdt_to_conll2009_tagset_converter.cpp
7563 /////////
7564  
7565 // This file is part of MorphoDiTa <http://github.com/ufal/morphodita/>.
7566 //
7567 // Copyright 2015 Institute of Formal and Applied Linguistics, Faculty of
7568 // Mathematics and Physics, Charles University in Prague, Czech Republic.
7569 //
7570 // This Source Code Form is subject to the terms of the Mozilla Public
7571 // License, v. 2.0. If a copy of the MPL was not distributed with this
7572 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
7573  
7574 static const char* names[15] = {"POS", "SubPOS", "Gen", "Num", "Cas", "PGe", "PNu", "Per", "Ten", "Gra", "Neg", "Voi", "", "", "Var"};
7575  
7576 0 inline void pdt_to_conll2009_tagset_converter::convert_tag(const string& lemma, string& tag) const {
7577 char pdt_tag[16];
7578 0 strncpy(pdt_tag, tag.c_str(), 15);
7579  
7580 // Clear the tag
7581 0 tag.clear();
7582  
7583 // Fill FEAT of filled tag characters
7584 0 ▶ for (int i = 0; i < 15 && pdt_tag[i]; i++)
Branch: 2 branches
BranchTrueFalseTotal
for (int i = 0; i < 15 && pdt_tag[i]; i++) 0 0 0
for (int i = 0; i < 15 && pdt_tag[i]; i++) 0 0 0
7585 0 ▶ if (pdt_tag[i] != '-') {
Branch: 1 branch
BranchTrueFalseTotal
if (pdt_tag[i] != '-') { 0 0 0
7586 0 ▶ if (!tag.empty()) tag.push_back('|');
Branch: 2 branches
BranchTrueFalseTotal
if (!tag.empty()) tag.push_back('|'); 0 0 0
if (!tag.empty()) tag.push_back('|'); 0 0 0
7587 0 ▶ tag.append(names[i]);
Branch: 1 branch
BranchTrueFalseTotal
tag.append(names[i]); 0 0 0
7588 0 ▶ tag.push_back('=');
Branch: 1 branch
BranchTrueFalseTotal
tag.push_back('='); 0 0 0
7589 0 ▶ tag.push_back(pdt_tag[i]);
Branch: 1 branch
BranchTrueFalseTotal
tag.push_back(pdt_tag[i]); 0 0 0
7590 }
7591  
7592 // Try adding Sem FEAT
7593 0 ▶ for (unsigned i = 0; i + 2 < lemma.size(); i++)
Branch: 1 branch
BranchTrueFalseTotal
for (unsigned i = 0; i + 2 < lemma.size(); i++) 0 0 0
7594 0 ▶ if (lemma[i] == '_' && lemma[i + 1] == ';') {
Branch: 3 branches
BranchTrueFalseTotal
if (lemma[i] == '_' && lemma[i + 1] == ';') { 0 0 0
if (lemma[i] == '_' && lemma[i + 1] == ';') { 0 0 0
if (lemma[i] == '_' && lemma[i + 1] == ';') { 0 0 0
7595 0 ▶ if (!tag.empty()) tag.push_back('|');
Branch: 2 branches
BranchTrueFalseTotal
if (!tag.empty()) tag.push_back('|'); 0 0 0
if (!tag.empty()) tag.push_back('|'); 0 0 0
7596 0 ▶ tag.append("Sem=");
Branch: 1 branch
BranchTrueFalseTotal
tag.append("Sem="); 0 0 0
7597 0 ▶ tag.push_back(lemma[i + 2]);
Branch: 1 branch
BranchTrueFalseTotal
tag.push_back(lemma[i + 2]); 0 0 0
7598 0 break;
7599 }
7600 0 }
7601  
7602 0 inline bool pdt_to_conll2009_tagset_converter::convert_lemma(string& lemma) const {
7603 0 unsigned raw_lemma = czech_lemma_addinfo::raw_lemma_len(lemma);
7604 0 ▶ return raw_lemma < lemma.size() ? (lemma.resize(raw_lemma), true) : false;
Branch: 1 branch
BranchTrueFalseTotal
return raw_lemma < lemma.size() ? (lemma.resize(raw_lemma), true) : false; 0 0 0
7605 }
7606  
7607 0 void pdt_to_conll2009_tagset_converter::convert(tagged_lemma& tagged_lemma) const {
7608 0 convert_tag(tagged_lemma.lemma, tagged_lemma.tag);
7609 0 convert_lemma(tagged_lemma.lemma);
7610 0 }
7611  
7612 0 void pdt_to_conll2009_tagset_converter::convert_analyzed(vector<tagged_lemma>& tagged_lemmas) const {
7613 0 bool lemma_changed = false;
7614  
7615 0 ▶ for (auto&& tagged_lemma : tagged_lemmas) {
Branch: 1 branch
BranchTrueFalseTotal
for (auto&& tagged_lemma : tagged_lemmas) { 0 0 0
7616 0 ▶ convert_tag(tagged_lemma.lemma, tagged_lemma.tag);
Branch: 1 branch
BranchTrueFalseTotal
convert_tag(tagged_lemma.lemma, tagged_lemma.tag); 0 0 0
7617 0 ▶ lemma_changed |= convert_lemma(tagged_lemma.lemma);
Branch: 1 branch
BranchTrueFalseTotal
lemma_changed |= convert_lemma(tagged_lemma.lemma); 0 0 0
7618 }
7619  
7620 // If no lemma was changed or there is 1 analysis, no duplicates could be created.
7621 0 ▶ if (!lemma_changed || tagged_lemmas.size() < 2) return;
Branch: 3 branches
BranchTrueFalseTotal
if (!lemma_changed || tagged_lemmas.size() < 2) return; 0 0 0
if (!lemma_changed || tagged_lemmas.size() < 2) return; 0 0 0
if (!lemma_changed || tagged_lemmas.size() < 2) return; 0 0 0
7622  
7623 0 tagset_converter_unique_analyzed(tagged_lemmas);
7624 }
7625  
7626 0 void pdt_to_conll2009_tagset_converter::convert_generated(vector<tagged_lemma_forms>& forms) const {
7627 0 bool lemma_changed = false;
7628  
7629 0 ▶ for (auto&& tagged_lemma_forms : forms) {
Branch: 1 branch
BranchTrueFalseTotal
for (auto&& tagged_lemma_forms : forms) { 0 0 0
7630 0 ▶ for (auto&& tagged_form : tagged_lemma_forms.forms)
Branch: 1 branch
BranchTrueFalseTotal
for (auto&& tagged_form : tagged_lemma_forms.forms) 0 0 0
7631 0 ▶ convert_tag(tagged_lemma_forms.lemma, tagged_form.tag);
Branch: 1 branch
BranchTrueFalseTotal
convert_tag(tagged_lemma_forms.lemma, tagged_form.tag); 0 0 0
7632 0 ▶ lemma_changed |= convert_lemma(tagged_lemma_forms.lemma);
Branch: 1 branch
BranchTrueFalseTotal
lemma_changed |= convert_lemma(tagged_lemma_forms.lemma); 0 0 0
7633 }
7634  
7635 // If no lemma was changed or there is 1 analysis, no duplicates could be created.
7636 0 ▶ if (!lemma_changed || forms.size() < 2) return;
Branch: 3 branches
BranchTrueFalseTotal
if (!lemma_changed || forms.size() < 2) return; 0 0 0
if (!lemma_changed || forms.size() < 2) return; 0 0 0
if (!lemma_changed || forms.size() < 2) return; 0 0 0
7637  
7638 0 tagset_converter_unique_generated(forms);
7639 }
7640  
7641 /////////
7642 // File: tagset_converter/strip_lemma_comment_tagset_converter.h
7643 /////////
7644  
7645 // This file is part of MorphoDiTa <http://github.com/ufal/morphodita/>.
7646 //
7647 // Copyright 2015 Institute of Formal and Applied Linguistics, Faculty of
7648 // Mathematics and Physics, Charles University in Prague, Czech Republic.
7649 //
7650 // This Source Code Form is subject to the terms of the Mozilla Public
7651 // License, v. 2.0. If a copy of the MPL was not distributed with this
7652 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
7653  
7654 class strip_lemma_comment_tagset_converter : public tagset_converter {
7655 public:
7656 0 strip_lemma_comment_tagset_converter(const morpho& dictionary) : dictionary(dictionary) {}
7657  
7658 virtual void convert(tagged_lemma& tagged_lemma) const override;
7659 virtual void convert_analyzed(vector<tagged_lemma>& tagged_lemmas) const override;
7660 virtual void convert_generated(vector<tagged_lemma_forms>& forms) const override;
7661  
7662 private:
7663 inline bool convert_lemma(string& lemma) const;
7664 const morpho& dictionary;
7665 };
7666  
7667 /////////
7668 // File: tagset_converter/strip_lemma_comment_tagset_converter.cpp
7669 /////////
7670  
7671 // This file is part of MorphoDiTa <http://github.com/ufal/morphodita/>.
7672 //
7673 // Copyright 2015 Institute of Formal and Applied Linguistics, Faculty of
7674 // Mathematics and Physics, Charles University in Prague, Czech Republic.
7675 //
7676 // This Source Code Form is subject to the terms of the Mozilla Public
7677 // License, v. 2.0. If a copy of the MPL was not distributed with this
7678 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
7679  
7680 0 inline bool strip_lemma_comment_tagset_converter::convert_lemma(string& lemma) const {
7681 0 ▶ unsigned lemma_id_len = dictionary.lemma_id_len(lemma);
Branch: 1 branch
BranchTrueFalseTotal
unsigned lemma_id_len = dictionary.lemma_id_len(lemma); 0 0 0
7682 0 ▶ return lemma_id_len < lemma.size() ? (lemma.resize(lemma_id_len), true) : false;
Branch: 1 branch
BranchTrueFalseTotal
return lemma_id_len < lemma.size() ? (lemma.resize(lemma_id_len), true) : false; 0 0 0
7683 }
7684  
7685 0 void strip_lemma_comment_tagset_converter::convert(tagged_lemma& tagged_lemma) const {
7686 0 convert_lemma(tagged_lemma.lemma);
7687 0 }
7688  
7689 0 void strip_lemma_comment_tagset_converter::convert_analyzed(vector<tagged_lemma>& tagged_lemmas) const {
7690 0 bool lemma_changed = false;
7691  
7692 0 ▶ for (auto&& tagged_lemma : tagged_lemmas)
Branch: 1 branch
BranchTrueFalseTotal
for (auto&& tagged_lemma : tagged_lemmas) 0 0 0
7693 0 ▶ lemma_changed |= convert_lemma(tagged_lemma.lemma);
Branch: 1 branch
BranchTrueFalseTotal
lemma_changed |= convert_lemma(tagged_lemma.lemma); 0 0 0
7694  
7695 // If no lemma was changed or there is 1 analysis, no duplicates could be created.
7696 0 ▶ if (!lemma_changed || tagged_lemmas.size() < 2) return;
Branch: 3 branches
BranchTrueFalseTotal
if (!lemma_changed || tagged_lemmas.size() < 2) return; 0 0 0
if (!lemma_changed || tagged_lemmas.size() < 2) return; 0 0 0
if (!lemma_changed || tagged_lemmas.size() < 2) return; 0 0 0
7697  
7698 0 tagset_converter_unique_analyzed(tagged_lemmas);
7699 }
7700  
7701 0 void strip_lemma_comment_tagset_converter::convert_generated(vector<tagged_lemma_forms>& forms) const {
7702 0 bool lemma_changed = false;
7703  
7704 0 ▶ for (auto&& tagged_lemma_forms : forms)
Branch: 1 branch
BranchTrueFalseTotal
for (auto&& tagged_lemma_forms : forms) 0 0 0
7705 0 ▶ lemma_changed |= convert_lemma(tagged_lemma_forms.lemma);
Branch: 1 branch
BranchTrueFalseTotal
lemma_changed |= convert_lemma(tagged_lemma_forms.lemma); 0 0 0
7706  
7707 // If no lemma was changed or there is 1 analysis, no duplicates could be created.
7708 0 ▶ if (!lemma_changed || forms.size() < 2) return;
Branch: 3 branches
BranchTrueFalseTotal
if (!lemma_changed || forms.size() < 2) return; 0 0 0
if (!lemma_changed || forms.size() < 2) return; 0 0 0
if (!lemma_changed || forms.size() < 2) return; 0 0 0
7709  
7710 0 tagset_converter_unique_generated(forms);
7711 }
7712  
7713 /////////
7714 // File: tagset_converter/strip_lemma_id_tagset_converter.h
7715 /////////
7716  
7717 // This file is part of MorphoDiTa <http://github.com/ufal/morphodita/>.
7718 //
7719 // Copyright 2015 Institute of Formal and Applied Linguistics, Faculty of
7720 // Mathematics and Physics, Charles University in Prague, Czech Republic.
7721 //
7722 // This Source Code Form is subject to the terms of the Mozilla Public
7723 // License, v. 2.0. If a copy of the MPL was not distributed with this
7724 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
7725  
7726 class strip_lemma_id_tagset_converter : public tagset_converter {
7727 public:
7728 0 strip_lemma_id_tagset_converter(const morpho& dictionary) : dictionary(dictionary) {}
7729  
7730 virtual void convert(tagged_lemma& tagged_lemma) const override;
7731 virtual void convert_analyzed(vector<tagged_lemma>& tagged_lemmas) const override;
7732 virtual void convert_generated(vector<tagged_lemma_forms>& forms) const override;
7733  
7734 private:
7735 inline bool convert_lemma(string& lemma) const;
7736 const morpho& dictionary;
7737 };
7738  
7739 /////////
7740 // File: tagset_converter/strip_lemma_id_tagset_converter.cpp
7741 /////////
7742  
7743 // This file is part of MorphoDiTa <http://github.com/ufal/morphodita/>.
7744 //
7745 // Copyright 2015 Institute of Formal and Applied Linguistics, Faculty of
7746 // Mathematics and Physics, Charles University in Prague, Czech Republic.
7747 //
7748 // This Source Code Form is subject to the terms of the Mozilla Public
7749 // License, v. 2.0. If a copy of the MPL was not distributed with this
7750 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
7751  
7752 0 inline bool strip_lemma_id_tagset_converter::convert_lemma(string& lemma) const {
7753 0 ▶ unsigned raw_lemma_len = dictionary.raw_lemma_len(lemma);
Branch: 1 branch
BranchTrueFalseTotal
unsigned raw_lemma_len = dictionary.raw_lemma_len(lemma); 0 0 0
7754 0 ▶ return raw_lemma_len < lemma.size() ? (lemma.resize(raw_lemma_len), true) : false;
Branch: 1 branch
BranchTrueFalseTotal
return raw_lemma_len < lemma.size() ? (lemma.resize(raw_lemma_len), true) : false; 0 0 0
7755 }
7756  
7757 0 void strip_lemma_id_tagset_converter::convert(tagged_lemma& tagged_lemma) const {
7758 0 convert_lemma(tagged_lemma.lemma);
7759 0 }
7760  
7761 0 void strip_lemma_id_tagset_converter::convert_analyzed(vector<tagged_lemma>& tagged_lemmas) const {
7762 0 bool lemma_changed = false;
7763  
7764 0 ▶ for (auto&& tagged_lemma : tagged_lemmas)
Branch: 1 branch
BranchTrueFalseTotal
for (auto&& tagged_lemma : tagged_lemmas) 0 0 0
7765 0 ▶ lemma_changed |= convert_lemma(tagged_lemma.lemma);
Branch: 1 branch
BranchTrueFalseTotal
lemma_changed |= convert_lemma(tagged_lemma.lemma); 0 0 0
7766  
7767 // If no lemma was changed or there is 1 analysis, no duplicates could be created.
7768 0 ▶ if (!lemma_changed || tagged_lemmas.size() < 2) return;
Branch: 3 branches
BranchTrueFalseTotal
if (!lemma_changed || tagged_lemmas.size() < 2) return; 0 0 0
if (!lemma_changed || tagged_lemmas.size() < 2) return; 0 0 0
if (!lemma_changed || tagged_lemmas.size() < 2) return; 0 0 0
7769  
7770 0 tagset_converter_unique_analyzed(tagged_lemmas);
7771 }
7772  
7773 0 void strip_lemma_id_tagset_converter::convert_generated(vector<tagged_lemma_forms>& forms) const {
7774 0 bool lemma_changed = false;
7775  
7776 0 ▶ for (auto&& tagged_lemma_forms : forms)
Branch: 1 branch
BranchTrueFalseTotal
for (auto&& tagged_lemma_forms : forms) 0 0 0
7777 0 ▶ lemma_changed |= convert_lemma(tagged_lemma_forms.lemma);
Branch: 1 branch
BranchTrueFalseTotal
lemma_changed |= convert_lemma(tagged_lemma_forms.lemma); 0 0 0
7778  
7779 // If no lemma was changed or there is 1 analysis, no duplicates could be created.
7780 0 ▶ if (!lemma_changed || forms.size() < 2) return;
Branch: 3 branches
BranchTrueFalseTotal
if (!lemma_changed || forms.size() < 2) return; 0 0 0
if (!lemma_changed || forms.size() < 2) return; 0 0 0
if (!lemma_changed || forms.size() < 2) return; 0 0 0
7781  
7782 0 tagset_converter_unique_generated(forms);
7783 }
7784  
7785 /////////
7786 // File: tagset_converter/tagset_converter.cpp
7787 /////////
7788  
7789 // This file is part of MorphoDiTa <http://github.com/ufal/morphodita/>.
7790 //
7791 // Copyright 2015 Institute of Formal and Applied Linguistics, Faculty of
7792 // Mathematics and Physics, Charles University in Prague, Czech Republic.
7793 //
7794 // This Source Code Form is subject to the terms of the Mozilla Public
7795 // License, v. 2.0. If a copy of the MPL was not distributed with this
7796 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
7797  
7798 0 tagset_converter* tagset_converter::new_identity_converter() {
7799 0 return new identity_tagset_converter();
7800 }
7801  
7802 0 tagset_converter* tagset_converter::new_pdt_to_conll2009_converter() {
7803 0 return new pdt_to_conll2009_tagset_converter();
7804 }
7805  
7806 0 tagset_converter* tagset_converter::new_strip_lemma_comment_converter(const morpho& dictionary) {
7807 0 return new strip_lemma_comment_tagset_converter(dictionary);
7808 }
7809  
7810 0 tagset_converter* tagset_converter::new_strip_lemma_id_converter(const morpho& dictionary) {
7811 0 return new strip_lemma_id_tagset_converter(dictionary);
7812 }
7813  
7814 0 tagset_converter* new_tagset_converter(const string& name, const morpho& dictionary) {
7815 0 ▶ if (name == "pdt_to_conll2009") return tagset_converter::new_pdt_to_conll2009_converter();
Branch: 1 branch
BranchTrueFalseTotal
if (name == "pdt_to_conll2009") return tagset_converter::new_pdt_to_conll2009_converter(); 0 0 0
7816 0 ▶ if (name == "strip_lemma_comment") return tagset_converter::new_strip_lemma_comment_converter(dictionary);
Branch: 1 branch
BranchTrueFalseTotal
if (name == "strip_lemma_comment") return tagset_converter::new_strip_lemma_comment_converter(dictionary); 0 0 0
7817 0 ▶ if (name == "strip_lemma_id") return tagset_converter::new_strip_lemma_id_converter(dictionary);
Branch: 1 branch
BranchTrueFalseTotal
if (name == "strip_lemma_id") return tagset_converter::new_strip_lemma_id_converter(dictionary); 0 0 0
7818 0 return nullptr;
7819 }
7820  
7821 0 void tagset_converter_unique_analyzed(vector<tagged_lemma>& tagged_lemmas) {
7822 // Remove possible lemma-tag pair duplicates
7823 struct tagged_lemma_comparator {
7824 0 ▶ inline static bool eq(const tagged_lemma& a, const tagged_lemma& b) { return a.lemma == b.lemma && a.tag == b.tag; }
Branch: 2 branches
BranchTrueFalseTotal
inline static bool eq(const tagged_lemma& a, const tagged_lemma& b) { return a.lemma == b.lemma && a.tag == b.tag; } 0 0 0
inline static bool eq(const tagged_lemma& a, const tagged_lemma& b) { return a.lemma == b.lemma && a.tag == b.tag; } 0 0 0
7825 0 ▶ inline static bool lt(const tagged_lemma& a, const tagged_lemma& b) { int lemma_compare = a.lemma.compare(b.lemma); return lemma_compare < 0 || (lemma_compare == 0 && a.tag < b.tag); }
Branch: 3 branches
BranchTrueFalseTotal
inline static bool lt(const tagged_lemma& a, const tagged_lemma& b) { int lemma_compare = a.lemma.compare(b.lemma); return lemma_compare < 0 || (lemma_compare == 0 && a.tag < b.tag); } 0 0 0
inline static bool lt(const tagged_lemma& a, const tagged_lemma& b) { int lemma_compare = a.lemma.compare(b.lemma); return lemma_compare < 0 || (lemma_compare == 0 && a.tag < b.tag); } 0 0 0
inline static bool lt(const tagged_lemma& a, const tagged_lemma& b) { int lemma_compare = a.lemma.compare(b.lemma); return lemma_compare < 0 || (lemma_compare == 0 && a.tag < b.tag); } 0 0 0
7826 };
7827  
7828 0 sort(tagged_lemmas.begin(), tagged_lemmas.end(), tagged_lemma_comparator::lt);
7829 0 ▶ tagged_lemmas.resize(unique(tagged_lemmas.begin(), tagged_lemmas.end(), tagged_lemma_comparator::eq) - tagged_lemmas.begin());
Branch: 2 branches
BranchTrueFalseTotal
tagged_lemmas.resize(unique(tagged_lemmas.begin(), tagged_lemmas.end(), tagged_lemma_comparator::eq) - tagged_lemmas.begin()); 0 0 0
tagged_lemmas.resize(unique(tagged_lemmas.begin(), tagged_lemmas.end(), tagged_lemma_comparator::eq) - tagged_lemmas.begin()); 0 0 0
7830 0 }
7831  
7832 0 void tagset_converter_unique_generated(vector<tagged_lemma_forms>& forms) {
7833 // Regroup and if needed remove duplicate form-tag pairs for each lemma
7834 0 ▶ for (unsigned i = 0; i < forms.size(); i++) {
Branch: 1 branch
BranchTrueFalseTotal
for (unsigned i = 0; i < forms.size(); i++) { 0 0 0
7835 0 bool any_merged = false;
7836 0 ▶ for (unsigned j = forms.size() - 1; j > i; j--)
Branch: 1 branch
BranchTrueFalseTotal
for (unsigned j = forms.size() - 1; j > i; j--) 0 0 0
7837 0 ▶ if (forms[j].lemma == forms[i].lemma) {
Branch: 1 branch
BranchTrueFalseTotal
if (forms[j].lemma == forms[i].lemma) { 0 0 0
7838 // Same lemma was found. Merge form-tag pairs
7839 0 ▶ for (auto&& tagged_form : forms[j].forms)
Branch: 1 branch
BranchTrueFalseTotal
for (auto&& tagged_form : forms[j].forms) 0 0 0
7840 0 ▶ forms[i].forms.emplace_back(std::move(tagged_form));
Branch: 1 branch
BranchTrueFalseTotal
forms[i].forms.emplace_back(std::move(tagged_form)); 0 0 0
7841  
7842 // Remove lemma j by moving it to end and deleting
7843 0 ▶ if (j < forms.size() - 1) {
Branch: 1 branch
BranchTrueFalseTotal
if (j < forms.size() - 1) { 0 0 0
7844 0 forms[j].lemma.swap(forms[forms.size() - 1].lemma);
7845 0 forms[j].forms.swap(forms[forms.size() - 1].forms);
7846 }
7847 0 forms.pop_back();
7848 0 any_merged = true;
7849 }
7850  
7851 0 ▶ if (any_merged && forms[i].forms.size() > 1) {
Branch: 3 branches
BranchTrueFalseTotal
if (any_merged && forms[i].forms.size() > 1) { 0 0 0
if (any_merged && forms[i].forms.size() > 1) { 0 0 0
if (any_merged && forms[i].forms.size() > 1) { 0 0 0
7852 // Remove duplicate form-tag pairs
7853 struct tagged_form_comparator {
7854 0 ▶ inline static bool eq(const tagged_form& a, const tagged_form& b) { return a.tag == b.tag && a.form == b.form; }
Branch: 2 branches
BranchTrueFalseTotal
inline static bool eq(const tagged_form& a, const tagged_form& b) { return a.tag == b.tag && a.form == b.form; } 0 0 0
inline static bool eq(const tagged_form& a, const tagged_form& b) { return a.tag == b.tag && a.form == b.form; } 0 0 0
7855 0 ▶ inline static bool lt(const tagged_form& a, const tagged_form& b) { int tag_compare = a.tag.compare(b.tag); return tag_compare < 0 || (tag_compare == 0 && a.form < b.form); }
Branch: 3 branches
BranchTrueFalseTotal
inline static bool lt(const tagged_form& a, const tagged_form& b) { int tag_compare = a.tag.compare(b.tag); return tag_compare < 0 || (tag_compare == 0 && a.form < b.form); } 0 0 0
inline static bool lt(const tagged_form& a, const tagged_form& b) { int tag_compare = a.tag.compare(b.tag); return tag_compare < 0 || (tag_compare == 0 && a.form < b.form); } 0 0 0
inline static bool lt(const tagged_form& a, const tagged_form& b) { int tag_compare = a.tag.compare(b.tag); return tag_compare < 0 || (tag_compare == 0 && a.form < b.form); } 0 0 0
7856 };
7857  
7858 0 sort(forms[i].forms.begin(), forms[i].forms.end(), tagged_form_comparator::lt);
7859 0 ▶ forms[i].forms.resize(unique(forms[i].forms.begin(), forms[i].forms.end(), tagged_form_comparator::eq) - forms[i].forms.begin());
Branch: 2 branches
BranchTrueFalseTotal
forms[i].forms.resize(unique(forms[i].forms.begin(), forms[i].forms.end(), tagged_form_comparator::eq) - forms[i].forms.begin()); 0 0 0
forms[i].forms.resize(unique(forms[i].forms.begin(), forms[i].forms.end(), tagged_form_comparator::eq) - forms[i].forms.begin()); 0 0 0
7860 }
7861 }
7862 0 }
7863  
7864 /////////
7865 // File: tokenizer/czech_tokenizer.cpp
7866 /////////
7867  
7868 // This file is part of MorphoDiTa <http://github.com/ufal/morphodita/>.
7869 //
7870 // Copyright 2015 Institute of Formal and Applied Linguistics, Faculty of
7871 // Mathematics and Physics, Charles University in Prague, Czech Republic.
7872 //
7873 // This Source Code Form is subject to the terms of the Mozilla Public
7874 // License, v. 2.0. If a copy of the MPL was not distributed with this
7875 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
7876  
7877 static const char _czech_tokenizer_cond_offsets[] = {
7878 0, 0, 0, 0, 0, 0, 0, 0,
7879 2, 2, 2, 2, 2, 2, 2, 2,
7880 2, 2, 2, 2
7881 };
7882  
7883 static const char _czech_tokenizer_cond_lengths[] = {
7884 0, 0, 0, 0, 0, 0, 0, 2,
7885 0, 0, 0, 0, 0, 0, 0, 0,
7886 0, 0, 0, 0
7887 };
7888  
7889 static const short _czech_tokenizer_cond_keys[] = {
7890 43u, 43u, 45u, 45u, 0
7891 };
7892  
7893 static const char _czech_tokenizer_cond_spaces[] = {
7894 1, 0, 0
7895 };
7896  
7897 static const unsigned char _czech_tokenizer_key_offsets[] = {
7898 0, 0, 17, 29, 43, 46, 51, 54,
7899 89, 94, 99, 100, 105, 106, 111, 125,
7900 132, 137, 140, 152
7901 };
7902  
7903 static const short _czech_tokenizer_trans_keys[] = {
7904 13u, 32u, 34u, 40u, 91u, 96u, 123u, 129u,
7905 133u, 135u, 147u, 150u, 162u, 9u, 10u, 65u,
7906 90u, 34u, 40u, 91u, 96u, 123u, 129u, 133u,
7907 135u, 150u, 162u, 65u, 90u, 13u, 32u, 34u,
7908 39u, 41u, 59u, 93u, 125u, 139u, 141u, 147u,
7909 161u, 9u, 10u, 159u, 48u, 57u, 43u, 45u,
7910 159u, 48u, 57u, 159u, 48u, 57u, 9u, 10u,
7911 13u, 32u, 33u, 44u, 46u, 47u, 63u, 129u,
7912 131u, 135u, 142u, 147u, 157u, 159u, 160u, 301u,
7913 557u, 811u, 1067u, 0u, 42u, 48u, 57u, 58u,
7914 64u, 65u, 90u, 91u, 96u, 97u, 122u, 123u,
7915 255u, 9u, 10u, 13u, 32u, 147u, 9u, 10u,
7916 13u, 32u, 147u, 13u, 9u, 10u, 13u, 32u,
7917 147u, 10u, 9u, 10u, 13u, 32u, 147u, 13u,
7918 32u, 34u, 39u, 41u, 59u, 93u, 125u, 139u,
7919 141u, 147u, 161u, 9u, 10u, 44u, 46u, 69u,
7920 101u, 159u, 48u, 57u, 69u, 101u, 159u, 48u,
7921 57u, 159u, 48u, 57u, 129u, 131u, 135u, 151u,
7922 155u, 157u, 65u, 90u, 97u, 122u, 142u, 143u,
7923 159u, 48u, 57u, 0
7924 };
7925  
7926 static const char _czech_tokenizer_single_lengths[] = {
7927 0, 13, 10, 12, 1, 3, 1, 21,
7928 5, 5, 1, 5, 1, 5, 12, 5,
7929 3, 1, 6, 1
7930 };
7931  
7932 static const char _czech_tokenizer_range_lengths[] = {
7933 0, 2, 1, 1, 1, 1, 1, 7,
7934 0, 0, 0, 0, 0, 0, 1, 1,
7935 1, 1, 3, 1
7936 };
7937  
7938 static const unsigned char _czech_tokenizer_index_offsets[] = {
7939 0, 0, 16, 28, 42, 45, 50, 53,
7940 82, 88, 94, 96, 102, 104, 110, 124,
7941 131, 136, 139, 149
7942 };
7943  
7944 static const char _czech_tokenizer_indicies[] = {
7945 1, 1, 2, 2, 2, 2, 2, 3,
7946 2, 3, 1, 2, 2, 1, 3, 0,
7947 2, 2, 2, 2, 2, 3, 2, 3,
7948 2, 2, 3, 0, 4, 4, 5, 5,
7949 5, 5, 5, 5, 5, 5, 4, 5,
7950 4, 0, 6, 6, 0, 7, 7, 8,
7951 8, 0, 8, 8, 0, 10, 11, 12,
7952 10, 13, 9, 13, 9, 13, 16, 16,
7953 16, 16, 10, 16, 15, 13, 9, 17,
7954 9, 17, 9, 15, 9, 16, 9, 16,
7955 9, 14, 10, 11, 12, 10, 10, 18,
7956 10, 19, 20, 10, 10, 18, 22, 21,
7957 10, 19, 23, 10, 10, 18, 22, 21,
7958 10, 20, 23, 10, 10, 18, 4, 4,
7959 5, 5, 5, 5, 5, 5, 5, 5,
7960 4, 5, 4, 24, 25, 25, 26, 26,
7961 15, 15, 24, 26, 26, 6, 6, 24,
7962 8, 8, 24, 16, 16, 16, 16, 16,
7963 16, 16, 16, 16, 24, 15, 15, 24,
7964 0
7965 };
7966  
7967 static const char _czech_tokenizer_trans_targs[] = {
7968 7, 1, 2, 7, 1, 3, 16, 6,
7969 17, 7, 8, 9, 13, 14, 0, 15,
7970 18, 19, 7, 10, 11, 7, 7, 12,
7971 7, 4, 5
7972 };
7973  
7974 static const char _czech_tokenizer_trans_actions[] = {
7975 1, 0, 0, 2, 3, 0, 4, 0,
7976 0, 7, 0, 0, 0, 4, 0, 4,
7977 0, 0, 8, 0, 0, 9, 10, 0,
7978 11, 0, 0
7979 };
7980  
7981 static const char _czech_tokenizer_to_state_actions[] = {
7982 0, 0, 0, 0, 0, 0, 0, 5,
7983 0, 0, 0, 0, 0, 0, 0, 0,
7984 0, 0, 0, 0
7985 };
7986  
7987 static const char _czech_tokenizer_from_state_actions[] = {
7988 0, 0, 0, 0, 0, 0, 0, 6,
7989 0, 0, 0, 0, 0, 0, 0, 0,
7990 0, 0, 0, 0
7991 };
7992  
7993 static const unsigned char _czech_tokenizer_eof_trans[] = {
7994 0, 1, 1, 1, 1, 1, 1, 0,
7995 19, 19, 22, 19, 22, 19, 25, 25,
7996 25, 25, 25, 25
7997 };
7998  
7999 static const int czech_tokenizer_start = 7;
8000  
8001 // The list of lower cased words that when preceding eos do not end sentence.
8002 // Note: because of VS, we cannot list the abbreviations directly in UTF-8,
8003 // because the compilation of utf-8 encoded sources fail on some locales
8004 // (e.g., Japanese).
8005 // perl -CS -ple 'use Encode;s/([^[:ascii:]])/join("", map {sprintf "\\%o", ord($_)} split(m@@, encode("utf-8", $1)))/ge'
8006 // perl -CS -ple 'use Encode;s/\\([0-7]{3})\\([0-7]{3})/decode("utf-8", chr(oct($1)).chr(oct($2)))/ge'
8007 const unordered_set<string> czech_tokenizer::abbreviations_czech = {
8008 // Titles
8009 "prof", "csc", "drsc", "doc", "phd", "ph", "d",
8010 "judr", "mddr", "mudr", "mvdr", "paeddr", "paedr", "phdr", "rndr", "rsdr", "dr",
8011 "ing", "arch", "mgr", "bc", "mag", "mba", "bca", "mga",
8012 "gen", "plk", "pplk", "npor", "por", "ppor", "kpt", "mjr", "sgt", "pls", "p", "s",
8013 "p", "p\303\255", "fa", "fy", "mr", "mrs", "ms", "miss", "tr", "sv",
8014 // Geographic names
8015 "angl", "fr", "\304\215es", "ces", "\304\215s", "cs", "slov", "n\304\233m", "nem", "it", "pol", "ma\304\217", "mad", "rus",
8016 "sev", "v\303\275ch", "vych", "ji\305\276", "jiz", "z\303\241p", "zap",
8017 // Common abbrevs
8018 "adr", "\304\215", "c", "eg", "ev", "g", "hod", "j", "kr", "m", "max", "min", "mj", "nap\305\231", "napr",
8019 "okr", "pop\305\231", "popr", "pozn", "r", "\305\231", "red", "rep", "resp", "srov", "st", "st\305\231", "str",
8020 "sv", "tel", "tj", "tzv", "\303\272", "u", "uh", "ul", "um", "zl", "zn",
8021 };
8022  
8023 const unordered_set<string> czech_tokenizer::abbreviations_slovak = {
8024 // Titles
8025 "prof", "csc", "drsc", "doc", "phd", "ph", "d",
8026 "judr", "mddr", "mudr", "mvdr", "paeddr", "paedr", "phdr", "rndr", "rsdr", "dr",
8027 "ing", "arch", "mgr", "bc", "mag", "mba", "bca", "mga",
8028 "gen", "plk", "pplk", "npor", "por", "ppor", "kpt", "mjr", "sgt", "pls", "p", "s",
8029 "p", "p\303\255", "fa", "fy", "mr", "mrs", "ms", "miss", "tr", "sv",
8030 // Geographic names
8031 "angl", "fr", "\304\215es", "ces", "\304\215s", "cs", "slov", "nem", "it", "po\304\276", "pol", "ma\304\217", "mad",
8032 "rus", "sev", "v\303\275ch", "vych", "ju\305\276", "juz", "z\303\241p", "zap",
8033 // Common abbrevs
8034 "adr", "\304\215", "c", "eg", "ev", "g", "hod", "j", "kr", "m", "max", "min", "mj", "napr",
8035 "okr", "popr", "pozn", "r", "red", "rep", "resp", "srov", "st", "str",
8036 "sv", "tel", "tj", "tzv", "\303\272", "u", "uh", "ul", "um", "zl", "zn",
8037 };
8038  
8039 1 czech_tokenizer::czech_tokenizer(tokenizer_language language, unsigned version, const morpho* m)
8040 1 ▶ : ragel_tokenizer(version <= 1 ? 1 : 2), m(m) {
Branch: 1 branch
BranchTrueFalseTotal
: ragel_tokenizer(version <= 1 ? 1 : 2), m(m) { 0 1 1
8041 1 switch (language) {
8042 1 case CZECH:
8043 1 abbreviations = &abbreviations_czech;
8044 1 break;
8045 0 case SLOVAK:
8046 0 abbreviations = &abbreviations_slovak;
8047 0 break;
8048 }
8049 1 }
8050  
8051 22 void czech_tokenizer::merge_hyphenated(vector<token_range>& tokens) {
8052 using namespace unilib;
8053  
8054 22 ▶ if (!m) return;
Branch: 1 branch
BranchTrueFalseTotal
if (!m) return; 22 0 22
8055 0 ▶ if (tokens.empty() || chars[tokens.back().start].cat & ~unicode::L) return;
Branch: 3 branches
BranchTrueFalseTotal
if (tokens.empty() || chars[tokens.back().start].cat & ~unicode::L) return; 0 0 0
if (tokens.empty() || chars[tokens.back().start].cat & ~unicode::L) return; 0 0 0
if (tokens.empty() || chars[tokens.back().start].cat & ~unicode::L) return; 0 0 0
8056  
8057 0 unsigned matched_hyphens = 0;
8058 0 ▶ for (unsigned hyphens = 1; hyphens <= 2; hyphens++) {
Branch: 1 branch
BranchTrueFalseTotal
for (unsigned hyphens = 1; hyphens <= 2; hyphens++) { 0 0 0
8059 // Are the tokens a sequence of 'hyphens' hyphenated tokens?
8060 0 ▶ if (tokens.size() < 2*hyphens + 1) break;
Branch: 1 branch
BranchTrueFalseTotal
if (tokens.size() < 2*hyphens + 1) break; 0 0 0
8061 0 unsigned first_hyphen = tokens.size() - 2*hyphens;
8062 0 ▶ if (tokens[first_hyphen].length != 1 || chars[tokens[first_hyphen].start].cat & ~unicode::P ||
Branch: 1 branch
BranchTrueFalseTotal
if (tokens[first_hyphen].length != 1 || chars[tokens[first_hyphen].start].cat & ~unicode::P || 0 0 0
8063 0 ▶ tokens[first_hyphen].start + tokens[first_hyphen].length != tokens[first_hyphen + 1].start ||
Branch: 1 branch
BranchTrueFalseTotal
tokens[first_hyphen].start + tokens[first_hyphen].length != tokens[first_hyphen + 1].start || 0 0 0
8064 0 ▶ tokens[first_hyphen-1].start + tokens[first_hyphen-1].length != tokens[first_hyphen].start ||
Branch: 3 branches
BranchTrueFalseTotal
tokens[first_hyphen-1].start + tokens[first_hyphen-1].length != tokens[first_hyphen].start || 0 0 0
tokens[first_hyphen-1].start + tokens[first_hyphen-1].length != tokens[first_hyphen].start || 0 0 0
tokens[first_hyphen-1].start + tokens[first_hyphen-1].length != tokens[first_hyphen].start || 0 0 0
8065 0 ▶ chars[tokens[first_hyphen-1].start].cat & ~unicode::L)
Branch: 1 branch
BranchTrueFalseTotal
chars[tokens[first_hyphen-1].start].cat & ~unicode::L) 0 0 0
8066 0 break;
8067  
8068 0 ▶ if (m->analyze(string_piece(chars[tokens[first_hyphen-1].start].str, chars[tokens.back().start + tokens.back().length].str - chars[tokens[first_hyphen-1].start].str), morpho::NO_GUESSER, lemmas) >= 0)
Branch: 2 branches
BranchTrueFalseTotal
if (m->analyze(string_piece(chars[tokens[first_hyphen-1].start].str, chars[tokens.back().start + tokens.back().length].str - chars[tokens[first_hyphen-1].start].str), morpho::NO_GUESSER, lemmas) >= 0) 0 0 0
if (m->analyze(string_piece(chars[tokens[first_hyphen-1].start].str, chars[tokens.back().start + tokens.back().length].str - chars[tokens[first_hyphen-1].start].str), morpho::NO_GUESSER, lemmas) >= 0) 0 0 0
8069 0 matched_hyphens = hyphens;
8070 }
8071  
8072 0 ▶ if (matched_hyphens) {
Branch: 1 branch
BranchTrueFalseTotal
if (matched_hyphens) { 0 0 0
8073 0 unsigned first = tokens.size() - 2*matched_hyphens - 1;
8074 0 tokens[first].length = tokens.back().start + tokens.back().length - tokens[first].start;
8075 0 tokens.resize(first + 1);
8076 }
8077 }
8078  
8079 2 bool czech_tokenizer::next_sentence(vector<token_range>& tokens) {
8080 using namespace unilib;
8081  
8082 int cs, act;
8083 size_t ts, te;
8084 2 size_t whitespace = 0; // Suppress "may be uninitialized" warning
8085  
8086 2 ▶ while (tokenize_url_email(tokens))
Branch: 2 branches
BranchTrueFalseTotal
while (tokenize_url_email(tokens)) 2 0 2
while (tokenize_url_email(tokens)) 0 2 2
8087 0 ▶ if (emergency_sentence_split(tokens))
Branch: 1 branch
BranchTrueFalseTotal
if (emergency_sentence_split(tokens)) 0 0 0
8088 0 return true;
8089
8090 {
8091 2 cs = czech_tokenizer_start;
8092 2 ts = 0;
8093 2 te = 0;
8094 2 act = 0;
8095 }
8096  
8097 {
8098 int _klen;
8099 const short *_keys;
8100 int _trans;
8101 short _widec;
8102  
8103 2 ▶ if ( ( current) == ( (chars.size() - 1)) )
Branch: 1 branch
BranchTrueFalseTotal
if ( ( current) == ( (chars.size() - 1)) ) 0 2 2
8104 0 goto _test_eof;
8105 2 ▶ if ( cs == 0 )
Branch: 1 branch
BranchTrueFalseTotal
if ( cs == 0 ) 0 2 2
8106 0 goto _out;
8107 2 _resume:
8108 154 ▶ switch ( _czech_tokenizer_from_state_actions[cs] ) {
Branch: 1 branch
BranchTrueFalseTotal
switch ( _czech_tokenizer_from_state_actions[cs] ) { 43 111 154
8109 43 case 6:
8110 43 {ts = ( current);}
8111 43 break;
8112 }
8113  
8114 154 _widec = ( ragel_char(chars[current]));
8115 154 _klen = _czech_tokenizer_cond_lengths[cs];
8116 154 _keys = _czech_tokenizer_cond_keys + (_czech_tokenizer_cond_offsets[cs]*2);
8117 154 ▶ if ( _klen > 0 ) {
Branch: 1 branch
BranchTrueFalseTotal
if ( _klen > 0 ) { 43 111 154
8118 43 const short *_lower = _keys;
8119 const short *_mid;
8120 43 const short *_upper = _keys + (_klen<<1) - 2;
8121 while (1) {
8122 111 ▶ if ( _upper < _lower )
Branch: 1 branch
BranchTrueFalseTotal
if ( _upper < _lower ) 42 69 111
8123 42 break;
8124  
8125 69 _mid = _lower + (((_upper-_lower) >> 1) & ~1);
8126 69 ▶ if ( _widec < _mid[0] )
Branch: 1 branch
BranchTrueFalseTotal
if ( _widec < _mid[0] ) 17 52 69
8127 17 _upper = _mid - 2;
8128 52 ▶ else if ( _widec > _mid[1] )
Branch: 1 branch
BranchTrueFalseTotal
else if ( _widec > _mid[1] ) 51 1 52
8129 51 _lower = _mid + 2;
8130 else {
8131 1 switch ( _czech_tokenizer_cond_spaces[_czech_tokenizer_cond_offsets[cs] + ((_mid - _keys)>>1)] ) {
8132 1 case 0: {
8133 1 _widec = (short)(256u + (( ragel_char(chars[current])) - 0u));
8134 1 if (
8135 1 ▶ !current || (chars[current-1].cat & ~(unicode::L | unicode::M | unicode::N | unicode::Pd)) ) _widec += 256;
Branch: 3 branches
BranchTrueFalseTotal
!current || (chars[current-1].cat & ~(unicode::L | unicode::M | unicode::N | unicode::Pd)) ) _widec += 256; 1 0 1
!current || (chars[current-1].cat & ~(unicode::L | unicode::M | unicode::N | unicode::Pd)) ) _widec += 256; 0 1 1
!current || (chars[current-1].cat & ~(unicode::L | unicode::M | unicode::N | unicode::Pd)) ) _widec += 256; 0 1 1
8136 1 break;
8137 }
8138 0 case 1: {
8139 0 _widec = (short)(768u + (( ragel_char(chars[current])) - 0u));
8140 0 if (
8141 0 ▶ !current || ((chars[current-1].cat & ~(unicode::L | unicode::M | unicode::N)) && chars[current-1].chr != '+') ) _widec += 256;
Branch: 4 branches
BranchTrueFalseTotal
!current || ((chars[current-1].cat & ~(unicode::L | unicode::M | unicode::N)) && chars[current-1].chr != '+') ) _widec += 256; 0 0 0
!current || ((chars[current-1].cat & ~(unicode::L | unicode::M | unicode::N)) && chars[current-1].chr != '+') ) _widec += 256; 0 0 0
!current || ((chars[current-1].cat & ~(unicode::L | unicode::M | unicode::N)) && chars[current-1].chr != '+') ) _widec += 256; 0 0 0
!current || ((chars[current-1].cat & ~(unicode::L | unicode::M | unicode::N)) && chars[current-1].chr != '+') ) _widec += 256; 0 0 0
8142 0 break;
8143 }
8144 }
8145 1 break;
8146 }
8147 }
8148 }
8149  
8150 154 _keys = _czech_tokenizer_trans_keys + _czech_tokenizer_key_offsets[cs];
8151 154 _trans = _czech_tokenizer_index_offsets[cs];
8152  
8153 154 _klen = _czech_tokenizer_single_lengths[cs];
8154 154 ▶ if ( _klen > 0 ) {
Branch: 1 branch
BranchTrueFalseTotal
if ( _klen > 0 ) { 154 0 154
8155 154 const short *_lower = _keys;
8156 const short *_mid;
8157 154 const short *_upper = _keys + _klen - 1;
8158 while (1) {
8159 604 ▶ if ( _upper < _lower )
Branch: 1 branch
BranchTrueFalseTotal
if ( _upper < _lower ) 118 486 604
8160 118 break;
8161  
8162 486 _mid = _lower + ((_upper-_lower) >> 1);
8163 486 ▶ if ( _widec < *_mid )
Branch: 1 branch
BranchTrueFalseTotal
if ( _widec < *_mid ) 270 216 486
8164 270 _upper = _mid - 1;
8165 216 ▶ else if ( _widec > *_mid )
Branch: 1 branch
BranchTrueFalseTotal
else if ( _widec > *_mid ) 180 36 216
8166 180 _lower = _mid + 1;
8167 else {
8168 36 _trans += (unsigned int)(_mid - _keys);
8169 36 goto _match;
8170 }
8171 }
8172 118 _keys += _klen;
8173 118 _trans += _klen;
8174 }
8175  
8176 118 _klen = _czech_tokenizer_range_lengths[cs];
8177 118 ▶ if ( _klen > 0 ) {
Branch: 1 branch
BranchTrueFalseTotal
if ( _klen > 0 ) { 17 101 118
8178 101 const short *_lower = _keys;
8179 const short *_mid;
8180 101 const short *_upper = _keys + (_klen<<1) - 2;
8181 while (1) {
8182 153 ▶ if ( _upper < _lower )
Branch: 1 branch
BranchTrueFalseTotal
if ( _upper < _lower ) 20 133 153
8183 20 break;
8184  
8185 133 _mid = _lower + (((_upper-_lower) >> 1) & ~1);
8186 133 ▶ if ( _widec < _mid[0] )
Branch: 1 branch
BranchTrueFalseTotal
if ( _widec < _mid[0] ) 38 95 133
8187 38 _upper = _mid - 2;
8188 95 ▶ else if ( _widec > _mid[1] )
Branch: 1 branch
BranchTrueFalseTotal
else if ( _widec > _mid[1] ) 14 81 95
8189 14 _lower = _mid + 2;
8190 else {
8191 81 _trans += (unsigned int)((_mid - _keys)>>1);
8192 81 goto _match;
8193 }
8194 }
8195 20 _trans += _klen;
8196 }
8197  
8198 17 _match:
8199 154 _trans = _czech_tokenizer_indicies[_trans];
8200 155 _eof_trans:
8201 155 cs = _czech_tokenizer_trans_targs[_trans];
8202  
8203 155 ▶ if ( _czech_tokenizer_trans_actions[_trans] == 0 )
Branch: 1 branch
BranchTrueFalseTotal
if ( _czech_tokenizer_trans_actions[_trans] == 0 ) 85 70 155
8204 85 goto _again;
8205  
8206 70 switch ( _czech_tokenizer_trans_actions[_trans] ) {
8207 5 case 3:
8208 5 { whitespace = current; }
8209 5 break;
8210 22 case 4:
8211 22 {te = ( current)+1;}
8212 22 break;
8213 1 case 7:
8214 1 ▶ {te = ( current)+1;{ tokens.emplace_back(ts, te - ts);
Branch: 1 branch
BranchTrueFalseTotal
{te = ( current)+1;{ tokens.emplace_back(ts, te - ts); 1 0 1
8215 1 ▶ merge_hyphenated(tokens);
Branch: 1 branch
BranchTrueFalseTotal
merge_hyphenated(tokens); 1 0 1
8216 1 current = te;
8217 do
8218 1 ▶ if (emergency_sentence_split(tokens)) { ( current)--; {( current)++; goto _out; } }
Branch: 1 branch
BranchTrueFalseTotal
if (emergency_sentence_split(tokens)) { ( current)--; {( current)++; goto _out; } } 0 1 1
8219 1 ▶ while (tokenize_url_email(tokens));
Branch: 2 branches
BranchTrueFalseTotal
while (tokenize_url_email(tokens)); 1 0 1
while (tokenize_url_email(tokens)); 0 1 1
8220 1 ( current)--;
8221 }}
8222 1 break;
8223 4 case 2:
8224 4 {te = ( current)+1;{
8225 4 ▶ bool eos = is_eos(tokens, chars[ts].chr, abbreviations);
Branch: 1 branch
BranchTrueFalseTotal
bool eos = is_eos(tokens, chars[ts].chr, abbreviations); 4 0 4
8226 8 ▶ for (current = ts; current < whitespace; current++)
Branch: 1 branch
BranchTrueFalseTotal
for (current = ts; current < whitespace; current++) 4 4 8
8227 4 ▶ tokens.emplace_back(current, 1);
Branch: 1 branch
BranchTrueFalseTotal
tokens.emplace_back(current, 1); 4 0 4
8228 4 {( current) = (( whitespace))-1;}
8229 4 ▶ if (eos) {( current)++; goto _out; }
Branch: 1 branch
BranchTrueFalseTotal
if (eos) {( current)++; goto _out; } 1 3 4
8230 }}
8231 3 break;
8232 0 case 10:
8233 0 {te = ( current)+1;{
8234 0 ▶ if (!tokens.empty()) {( current)++; goto _out; }
Branch: 1 branch
BranchTrueFalseTotal
if (!tokens.empty()) {( current)++; goto _out; } 0 0 0
8235 0 current = te;
8236 do
8237 0 ▶ if (emergency_sentence_split(tokens)) { ( current)--; {( current)++; goto _out; } }
Branch: 1 branch
BranchTrueFalseTotal
if (emergency_sentence_split(tokens)) { ( current)--; {( current)++; goto _out; } } 0 0 0
8238 0 ▶ while (tokenize_url_email(tokens));
Branch: 2 branches
BranchTrueFalseTotal
while (tokenize_url_email(tokens)); 0 0 0
while (tokenize_url_email(tokens)); 0 0 0
8239 0 ( current)--;
8240 }}
8241 0 break;
8242 19 case 11:
8243 19 ▶ {te = ( current);( current)--;{ tokens.emplace_back(ts, te - ts);
Branch: 1 branch
BranchTrueFalseTotal
{te = ( current);( current)--;{ tokens.emplace_back(ts, te - ts); 19 0 19
8244 19 ▶ merge_hyphenated(tokens);
Branch: 1 branch
BranchTrueFalseTotal
merge_hyphenated(tokens); 19 0 19
8245 19 current = te;
8246 do
8247 19 ▶ if (emergency_sentence_split(tokens)) { ( current)--; {( current)++; goto _out; } }
Branch: 1 branch
BranchTrueFalseTotal
if (emergency_sentence_split(tokens)) { ( current)--; {( current)++; goto _out; } } 0 19 19
8248 19 ▶ while (tokenize_url_email(tokens));
Branch: 2 branches
BranchTrueFalseTotal
while (tokenize_url_email(tokens)); 19 0 19
while (tokenize_url_email(tokens)); 0 19 19
8249 19 ( current)--;
8250 }}
8251 19 break;
8252 17 case 8:
8253 17 {te = ( current);( current)--;{
8254 17 current = te;
8255 do
8256 17 ▶ if (emergency_sentence_split(tokens)) { ( current)--; {( current)++; goto _out; } }
Branch: 1 branch
BranchTrueFalseTotal
if (emergency_sentence_split(tokens)) { ( current)--; {( current)++; goto _out; } } 0 17 17
8257 17 ▶ while (tokenize_url_email(tokens));
Branch: 2 branches
BranchTrueFalseTotal
while (tokenize_url_email(tokens)); 17 0 17
while (tokenize_url_email(tokens)); 0 17 17
8258 17 ( current)--;
8259 }}
8260 17 break;
8261 0 case 9:
8262 0 {te = ( current);( current)--;{
8263 0 ▶ if (!tokens.empty()) {( current)++; goto _out; }
Branch: 1 branch
BranchTrueFalseTotal
if (!tokens.empty()) {( current)++; goto _out; } 0 0 0
8264 0 current = te;
8265 do
8266 0 ▶ if (emergency_sentence_split(tokens)) { ( current)--; {( current)++; goto _out; } }
Branch: 1 branch
BranchTrueFalseTotal
if (emergency_sentence_split(tokens)) { ( current)--; {( current)++; goto _out; } } 0 0 0
8267 0 ▶ while (tokenize_url_email(tokens));
Branch: 2 branches
BranchTrueFalseTotal
while (tokenize_url_email(tokens)); 0 0 0
while (tokenize_url_email(tokens)); 0 0 0
8268 0 ( current)--;
8269 }}
8270 0 break;
8271 2 case 1:
8272 2 ▶ {{( current) = ((te))-1;}{ tokens.emplace_back(ts, te - ts);
Branch: 1 branch
BranchTrueFalseTotal
{{( current) = ((te))-1;}{ tokens.emplace_back(ts, te - ts); 2 0 2
8273 2 ▶ merge_hyphenated(tokens);
Branch: 1 branch
BranchTrueFalseTotal
merge_hyphenated(tokens); 2 0 2
8274 2 current = te;
8275 do
8276 2 ▶ if (emergency_sentence_split(tokens)) { ( current)--; {( current)++; goto _out; } }
Branch: 1 branch
BranchTrueFalseTotal
if (emergency_sentence_split(tokens)) { ( current)--; {( current)++; goto _out; } } 0 2 2
8277 2 ▶ while (tokenize_url_email(tokens));
Branch: 2 branches
BranchTrueFalseTotal
while (tokenize_url_email(tokens)); 2 0 2
while (tokenize_url_email(tokens)); 0 2 2
8278 2 ( current)--;
8279 }}
8280 2 break;
8281 }
8282  
8283 154 _again:
8284 154 ▶ switch ( _czech_tokenizer_to_state_actions[cs] ) {
Branch: 1 branch
BranchTrueFalseTotal
switch ( _czech_tokenizer_to_state_actions[cs] ) { 42 112 154
8285 42 case 5:
8286 42 {ts = 0;}
8287 42 break;
8288 }
8289  
8290 154 ▶ if ( cs == 0 )
Branch: 1 branch
BranchTrueFalseTotal
if ( cs == 0 ) 0 154 154
8291 0 goto _out;
8292 154 ▶ if ( ++( current) != ( (chars.size() - 1)) )
Branch: 1 branch
BranchTrueFalseTotal
if ( ++( current) != ( (chars.size() - 1)) ) 152 2 154
8293 152 goto _resume;
8294 2 _test_eof: {}
8295 2 ▶ if ( ( current) == ( (chars.size() - 1)) )
Branch: 1 branch
BranchTrueFalseTotal
if ( ( current) == ( (chars.size() - 1)) ) 2 0 2
8296 {
8297 2 ▶ if ( _czech_tokenizer_eof_trans[cs] > 0 ) {
Branch: 1 branch
BranchTrueFalseTotal
if ( _czech_tokenizer_eof_trans[cs] > 0 ) { 1 1 2
8298 1 _trans = _czech_tokenizer_eof_trans[cs] - 1;
8299 1 goto _eof_trans;
8300 }
8301 }
8302  
8303 0 _out: {}
8304 }
8305  
8306 (void)act; // Suppress unused variable warning
8307  
8308 2 return !tokens.empty();
8309 }
8310  
8311 /////////
8312 // File: tokenizer/english_tokenizer.cpp
8313 /////////
8314  
8315 // This file is part of MorphoDiTa <http://github.com/ufal/morphodita/>.
8316 //
8317 // Copyright 2015 Institute of Formal and Applied Linguistics, Faculty of
8318 // Mathematics and Physics, Charles University in Prague, Czech Republic.
8319 //
8320 // This Source Code Form is subject to the terms of the Mozilla Public
8321 // License, v. 2.0. If a copy of the MPL was not distributed with this
8322 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
8323  
8324 // The list of lowercased words that when preceding eos do not end sentence.
8325 const unordered_set<string> english_tokenizer::abbreviations = {
8326 // Titles
8327 "adj", "adm", "adv", "assoc", "asst", "bart", "bldg", "brig", "bros", "capt",
8328 "cmdr", "col", "comdr", "con", "corp", "cpl", "d", "dr", "dr", "drs", "ens",
8329 "gen", "gov", "hon", "hosp", "hr", "insp", "lt", "mm", "mr", "mrs", "ms",
8330 "maj", "messrs", "mlle", "mme", "mr", "mrs", "ms", "msgr", "op", "ord",
8331 "pfc", "ph", "phd", "prof", "pvt", "rep", "reps", "res", "rev", "rt", "sen",
8332 "sens", "sfc", "sgt", "sr", "st", "supt", "surg", "univ",
8333 // Common abbrevs
8334 "addr", "approx", "apr", "aug", "calif", "co", "corp", "dec", "def", "e",
8335 "e.g", "eg", "feb", "fla", "ft", "gen", "gov", "hrs", "i.", "i.e", "ie",
8336 "inc", "jan", "jr", "ltd", "mar", "max", "min", "mph", "mt", "n", "nov",
8337 "oct", "ont", "pa", "pres", "rep", "rev", "s", "sec", "sen", "sep", "sept",
8338 "sgt", "sr", "tel", "un", "univ", "v", "va", "vs", "w", "yrs",
8339 };
8340  
8341 static const char _english_tokenizer_split_token_key_offsets[] = {
8342 0, 0, 16, 20, 22, 26, 28, 30,
8343 32, 34, 36, 44, 46, 50, 52, 54,
8344 56, 58, 60, 62, 64, 66, 68, 72,
8345 74, 76, 78, 80, 82, 82
8346 };
8347  
8348 static const unsigned char _english_tokenizer_split_token_trans_keys[] = {
8349 65u, 68u, 69u, 76u, 77u, 78u, 83u, 84u,
8350 97u, 100u, 101u, 108u, 109u, 110u, 115u, 116u,
8351 78u, 84u, 110u, 116u, 78u, 110u, 65u, 79u,
8352 97u, 111u, 87u, 119u, 71u, 103u, 84u, 116u,
8353 79u, 111u, 39u, 161u, 77u, 82u, 86u, 89u,
8354 109u, 114u, 118u, 121u, 77u, 109u, 69u, 73u,
8355 101u, 105u, 76u, 108u, 39u, 161u, 68u, 100u,
8356 76u, 108u, 39u, 161u, 69u, 101u, 82u, 114u,
8357 79u, 111u, 77u, 109u, 39u, 79u, 111u, 161u,
8358 78u, 110u, 78u, 110u, 78u, 110u, 65u, 97u,
8359 67u, 99u, 0
8360 };
8361  
8362 static const char _english_tokenizer_split_token_single_lengths[] = {
8363 0, 16, 4, 2, 4, 2, 2, 2,
8364 2, 2, 8, 2, 4, 2, 2, 2,
8365 2, 2, 2, 2, 2, 2, 4, 2,
8366 2, 2, 2, 2, 0, 0
8367 };
8368  
8369 static const char _english_tokenizer_split_token_range_lengths[] = {
8370 0, 0, 0, 0, 0, 0, 0, 0,
8371 0, 0, 0, 0, 0, 0, 0, 0,
8372 0, 0, 0, 0, 0, 0, 0, 0,
8373 0, 0, 0, 0, 0, 0
8374 };
8375  
8376 static const unsigned char _english_tokenizer_split_token_index_offsets[] = {
8377 0, 0, 17, 22, 25, 30, 33, 36,
8378 39, 42, 45, 54, 57, 62, 65, 68,
8379 71, 74, 77, 80, 83, 86, 89, 94,
8380 97, 100, 103, 106, 109, 110
8381 };
8382  
8383 static const char _english_tokenizer_split_token_indicies[] = {
8384 0, 2, 3, 4, 2, 5, 2, 6,
8385 0, 2, 3, 4, 2, 5, 2, 6,
8386 1, 7, 8, 7, 8, 1, 9, 9,
8387 1, 10, 11, 10, 11, 1, 12, 12,
8388 1, 12, 12, 1, 13, 13, 1, 11,
8389 11, 1, 14, 14, 1, 15, 2, 2,
8390 16, 15, 2, 2, 16, 1, 17, 17,
8391 1, 18, 11, 18, 11, 1, 12, 12,
8392 1, 19, 19, 1, 12, 12, 1, 2,
8393 2, 1, 20, 20, 1, 21, 21, 1,
8394 22, 22, 1, 23, 23, 1, 12, 12,
8395 1, 24, 25, 25, 24, 1, 14, 14,
8396 1, 26, 26, 1, 27, 27, 1, 28,
8397 28, 1, 12, 12, 1, 1, 1, 0
8398 };
8399  
8400 static const char _english_tokenizer_split_token_trans_targs[] = {
8401 2, 0, 9, 10, 16, 17, 22, 3,
8402 7, 4, 5, 6, 28, 8, 29, 11,
8403 14, 12, 13, 15, 18, 19, 20, 21,
8404 23, 24, 25, 26, 27
8405 };
8406  
8407 static const char _english_tokenizer_split_token_trans_actions[] = {
8408 0, 0, 0, 0, 0, 0, 0, 1,
8409 1, 0, 0, 0, 0, 0, 2, 1,
8410 1, 0, 0, 0, 1, 0, 0, 0,
8411 0, 0, 1, 0, 0
8412 };
8413  
8414 static const char _english_tokenizer_split_token_eof_actions[] = {
8415 0, 0, 0, 0, 0, 0, 0, 0,
8416 0, 0, 0, 0, 0, 0, 0, 0,
8417 0, 0, 0, 0, 0, 0, 0, 0,
8418 0, 0, 0, 0, 3, 0
8419 };
8420  
8421 static const int english_tokenizer_split_token_start = 1;
8422  
8423 0 void english_tokenizer::split_token(vector<token_range>& tokens) {
8424 0 ▶ if (tokens.empty() || chars[tokens.back().start].cat & ~unilib::unicode::L) return;
Branch: 3 branches
BranchTrueFalseTotal
if (tokens.empty() || chars[tokens.back().start].cat & ~unilib::unicode::L) return; 0 0 0
if (tokens.empty() || chars[tokens.back().start].cat & ~unilib::unicode::L) return; 0 0 0
if (tokens.empty() || chars[tokens.back().start].cat & ~unilib::unicode::L) return; 0 0 0
8425  
8426 0 size_t index = tokens.back().start, end = index + tokens.back().length;
8427 int cs;
8428 0 size_t split_mark = 0, split_len = 0;
8429
8430 {
8431 0 cs = english_tokenizer_split_token_start;
8432 }
8433  
8434 {
8435 int _klen;
8436 const unsigned char *_keys;
8437 int _trans;
8438  
8439 0 ▶ if ( ( index) == ( end) )
Branch: 1 branch
BranchTrueFalseTotal
if ( ( index) == ( end) ) 0 0 0
8440 0 goto _test_eof;
8441 0 ▶ if ( cs == 0 )
Branch: 1 branch
BranchTrueFalseTotal
if ( cs == 0 ) 0 0 0
8442 0 goto _out;
8443 0 _resume:
8444 0 _keys = _english_tokenizer_split_token_trans_keys + _english_tokenizer_split_token_key_offsets[cs];
8445 0 _trans = _english_tokenizer_split_token_index_offsets[cs];
8446  
8447 0 _klen = _english_tokenizer_split_token_single_lengths[cs];
8448 0 ▶ if ( _klen > 0 ) {
Branch: 1 branch
BranchTrueFalseTotal
if ( _klen > 0 ) { 0 0 0
8449 0 const unsigned char *_lower = _keys;
8450 const unsigned char *_mid;
8451 0 const unsigned char *_upper = _keys + _klen - 1;
8452 while (1) {
8453 0 ▶ if ( _upper < _lower )
Branch: 1 branch
BranchTrueFalseTotal
if ( _upper < _lower ) 0 0 0
8454 0 break;
8455  
8456 0 _mid = _lower + ((_upper-_lower) >> 1);
8457 0 ▶ if ( ( ragel_char(chars[tokens.back().start + end - index - 1])) < *_mid )
Branch: 1 branch
BranchTrueFalseTotal
if ( ( ragel_char(chars[tokens.back().start + end - index - 1])) < *_mid ) 0 0 0
8458 0 _upper = _mid - 1;
8459 0 ▶ else if ( ( ragel_char(chars[tokens.back().start + end - index - 1])) > *_mid )
Branch: 1 branch
BranchTrueFalseTotal
else if ( ( ragel_char(chars[tokens.back().start + end - index - 1])) > *_mid ) 0 0 0
8460 0 _lower = _mid + 1;
8461 else {
8462 0 _trans += (unsigned int)(_mid - _keys);
8463 0 goto _match;
8464 }
8465 }
8466 0 _keys += _klen;
8467 0 _trans += _klen;
8468 }
8469  
8470 0 _klen = _english_tokenizer_split_token_range_lengths[cs];
8471 0 ▶ if ( _klen > 0 ) {
Branch: 1 branch
BranchTrueFalseTotal
if ( _klen > 0 ) { 0 0 0
8472 0 const unsigned char *_lower = _keys;
8473 const unsigned char *_mid;
8474 0 const unsigned char *_upper = _keys + (_klen<<1) - 2;
8475 while (1) {
8476 0 ▶ if ( _upper < _lower )
Branch: 1 branch
BranchTrueFalseTotal
if ( _upper < _lower ) 0 0 0
8477 0 break;
8478  
8479 0 _mid = _lower + (((_upper-_lower) >> 1) & ~1);
8480 0 ▶ if ( ( ragel_char(chars[tokens.back().start + end - index - 1])) < _mid[0] )
Branch: 1 branch
BranchTrueFalseTotal
if ( ( ragel_char(chars[tokens.back().start + end - index - 1])) < _mid[0] ) 0 0 0
8481 0 _upper = _mid - 2;
8482 0 ▶ else if ( ( ragel_char(chars[tokens.back().start + end - index - 1])) > _mid[1] )
Branch: 1 branch
BranchTrueFalseTotal
else if ( ( ragel_char(chars[tokens.back().start + end - index - 1])) > _mid[1] ) 0 0 0
8483 0 _lower = _mid + 2;
8484 else {
8485 0 _trans += (unsigned int)((_mid - _keys)>>1);
8486 0 goto _match;
8487 }
8488 }
8489 0 _trans += _klen;
8490 }
8491  
8492 0 _match:
8493 0 _trans = _english_tokenizer_split_token_indicies[_trans];
8494 0 cs = _english_tokenizer_split_token_trans_targs[_trans];
8495  
8496 0 ▶ if ( _english_tokenizer_split_token_trans_actions[_trans] == 0 )
Branch: 1 branch
BranchTrueFalseTotal
if ( _english_tokenizer_split_token_trans_actions[_trans] == 0 ) 0 0 0
8497 0 goto _again;
8498  
8499 0 switch ( _english_tokenizer_split_token_trans_actions[_trans] ) {
8500 0 case 1:
8501 0 { split_mark = index - tokens.back().start + 1; }
8502 0 break;
8503 0 case 2:
8504 0 { split_mark = index - tokens.back().start + 1; }
8505 0 { split_len = split_mark; {( index)++; goto _out; } }
8506 break;
8507 }
8508  
8509 0 _again:
8510 0 ▶ if ( cs == 0 )
Branch: 1 branch
BranchTrueFalseTotal
if ( cs == 0 ) 0 0 0
8511 0 goto _out;
8512 0 ▶ if ( ++( index) != ( end) )
Branch: 1 branch
BranchTrueFalseTotal
if ( ++( index) != ( end) ) 0 0 0
8513 0 goto _resume;
8514 0 _test_eof: {}
8515 0 ▶ if ( ( index) == ( end) )
Branch: 1 branch
BranchTrueFalseTotal
if ( ( index) == ( end) ) 0 0 0
8516 {
8517 0 ▶ switch ( _english_tokenizer_split_token_eof_actions[cs] ) {
Branch: 1 branch
BranchTrueFalseTotal
switch ( _english_tokenizer_split_token_eof_actions[cs] ) { 0 0 0
8518 0 case 3:
8519 0 { split_len = split_mark; {( index)++; goto _out; } }
8520 break;
8521 }
8522 }
8523  
8524 0 _out: {}
8525 }
8526  
8527 0 ▶ if (split_len && split_len < end) {
Branch: 2 branches
BranchTrueFalseTotal
if (split_len && split_len < end) { 0 0 0
if (split_len && split_len < end) { 0 0 0
8528 0 tokens.back().length -= split_len;
8529 0 ▶ tokens.emplace_back(end - split_len, split_len);
Branch: 1 branch
BranchTrueFalseTotal
tokens.emplace_back(end - split_len, split_len); 0 0 0
8530 }
8531 }
8532  
8533 static const char _english_tokenizer_cond_offsets[] = {
8534 0, 0, 0, 0, 0, 0, 0, 0,
8535 0, 0, 0, 2, 2, 2, 2, 2,
8536 2, 2, 2, 2, 2, 2, 2, 2,
8537 2, 2
8538 };
8539  
8540 static const char _english_tokenizer_cond_lengths[] = {
8541 0, 0, 0, 0, 0, 0, 0, 0,
8542 0, 0, 2, 0, 0, 0, 0, 0,
8543 0, 0, 0, 0, 0, 0, 0, 0,
8544 0, 0
8545 };
8546  
8547 static const short _english_tokenizer_cond_keys[] = {
8548 43u, 43u, 45u, 45u, 0
8549 };
8550  
8551 static const char _english_tokenizer_cond_spaces[] = {
8552 1, 0, 0
8553 };
8554  
8555 static const unsigned char _english_tokenizer_key_offsets[] = {
8556 0, 0, 17, 29, 43, 46, 49, 52,
8557 55, 60, 63, 98, 103, 108, 109, 114,
8558 115, 120, 134, 141, 145, 150, 153, 168,
8559 181, 195
8560 };
8561  
8562 static const short _english_tokenizer_trans_keys[] = {
8563 13u, 32u, 34u, 40u, 91u, 96u, 123u, 129u,
8564 133u, 135u, 147u, 150u, 162u, 9u, 10u, 65u,
8565 90u, 34u, 40u, 91u, 96u, 123u, 129u, 133u,
8566 135u, 150u, 162u, 65u, 90u, 13u, 32u, 34u,
8567 39u, 41u, 59u, 93u, 125u, 139u, 141u, 147u,
8568 161u, 9u, 10u, 159u, 48u, 57u, 159u, 48u,
8569 57u, 159u, 48u, 57u, 159u, 48u, 57u, 43u,
8570 45u, 159u, 48u, 57u, 159u, 48u, 57u, 9u,
8571 10u, 13u, 32u, 33u, 44u, 46u, 47u, 63u,
8572 129u, 131u, 135u, 142u, 147u, 157u, 159u, 160u,
8573 301u, 557u, 811u, 1067u, 0u, 42u, 48u, 57u,
8574 58u, 64u, 65u, 90u, 91u, 96u, 97u, 122u,
8575 123u, 255u, 9u, 10u, 13u, 32u, 147u, 9u,
8576 10u, 13u, 32u, 147u, 13u, 9u, 10u, 13u,
8577 32u, 147u, 10u, 9u, 10u, 13u, 32u, 147u,
8578 13u, 32u, 34u, 39u, 41u, 59u, 93u, 125u,
8579 139u, 141u, 147u, 161u, 9u, 10u, 44u, 46u,
8580 69u, 101u, 159u, 48u, 57u, 44u, 46u, 69u,
8581 101u, 69u, 101u, 159u, 48u, 57u, 159u, 48u,
8582 57u, 39u, 45u, 129u, 131u, 135u, 151u, 155u,
8583 157u, 161u, 65u, 90u, 97u, 122u, 142u, 143u,
8584 45u, 129u, 131u, 135u, 151u, 155u, 157u, 65u,
8585 90u, 97u, 122u, 142u, 143u, 39u, 129u, 131u,
8586 135u, 151u, 155u, 157u, 161u, 65u, 90u, 97u,
8587 122u, 142u, 143u, 159u, 48u, 57u, 0
8588 };
8589  
8590 static const char _english_tokenizer_single_lengths[] = {
8591 0, 13, 10, 12, 1, 1, 1, 1,
8592 3, 1, 21, 5, 5, 1, 5, 1,
8593 5, 12, 5, 4, 3, 1, 9, 7,
8594 8, 1
8595 };
8596  
8597 static const char _english_tokenizer_range_lengths[] = {
8598 0, 2, 1, 1, 1, 1, 1, 1,
8599 1, 1, 7, 0, 0, 0, 0, 0,
8600 0, 1, 1, 0, 1, 1, 3, 3,
8601 3, 1
8602 };
8603  
8604 static const unsigned char _english_tokenizer_index_offsets[] = {
8605 0, 0, 16, 28, 42, 45, 48, 51,
8606 54, 59, 62, 91, 97, 103, 105, 111,
8607 113, 119, 133, 140, 145, 150, 153, 166,
8608 177, 189
8609 };
8610  
8611 static const char _english_tokenizer_indicies[] = {
8612 1, 1, 2, 2, 2, 2, 2, 3,
8613 2, 3, 1, 2, 2, 1, 3, 0,
8614 2, 2, 2, 2, 2, 3, 2, 3,
8615 2, 2, 3, 0, 4, 4, 5, 5,
8616 5, 5, 5, 5, 5, 5, 4, 5,
8617 4, 0, 6, 6, 0, 7, 7, 0,
8618 8, 8, 0, 9, 9, 0, 10, 10,
8619 11, 11, 0, 11, 11, 0, 13, 14,
8620 15, 13, 16, 12, 16, 12, 16, 19,
8621 19, 19, 19, 13, 19, 18, 16, 12,
8622 20, 12, 20, 12, 18, 12, 19, 12,
8623 19, 12, 17, 13, 14, 15, 13, 13,
8624 21, 13, 22, 23, 13, 13, 21, 25,
8625 24, 13, 22, 26, 13, 13, 21, 25,
8626 24, 13, 23, 26, 13, 13, 21, 4,
8627 4, 5, 5, 5, 5, 5, 5, 5,
8628 5, 4, 5, 4, 27, 28, 29, 30,
8629 30, 18, 18, 27, 28, 29, 30, 30,
8630 27, 30, 30, 9, 9, 27, 11, 11,
8631 27, 31, 32, 19, 19, 19, 19, 19,
8632 19, 31, 19, 19, 19, 27, 32, 19,
8633 19, 19, 19, 19, 19, 19, 19, 19,
8634 27, 31, 19, 19, 19, 19, 19, 19,
8635 31, 19, 19, 19, 27, 18, 18, 27,
8636 0
8637 };
8638  
8639 static const char _english_tokenizer_trans_targs[] = {
8640 10, 1, 2, 10, 1, 3, 5, 6,
8641 19, 20, 9, 21, 10, 11, 12, 16,
8642 17, 0, 18, 22, 25, 10, 13, 14,
8643 10, 10, 15, 10, 4, 7, 8, 23,
8644 24
8645 };
8646  
8647 static const char _english_tokenizer_trans_actions[] = {
8648 1, 0, 0, 2, 3, 0, 0, 0,
8649 4, 4, 0, 0, 7, 0, 0, 0,
8650 4, 0, 4, 0, 0, 8, 0, 0,
8651 9, 10, 0, 11, 0, 0, 0, 0,
8652 0
8653 };
8654  
8655 static const char _english_tokenizer_to_state_actions[] = {
8656 0, 0, 0, 0, 0, 0, 0, 0,
8657 0, 0, 5, 0, 0, 0, 0, 0,
8658 0, 0, 0, 0, 0, 0, 0, 0,
8659 0, 0
8660 };
8661  
8662 static const char _english_tokenizer_from_state_actions[] = {
8663 0, 0, 0, 0, 0, 0, 0, 0,
8664 0, 0, 6, 0, 0, 0, 0, 0,
8665 0, 0, 0, 0, 0, 0, 0, 0,
8666 0, 0
8667 };
8668  
8669 static const unsigned char _english_tokenizer_eof_trans[] = {
8670 0, 1, 1, 1, 1, 1, 1, 1,
8671 1, 1, 0, 22, 22, 25, 22, 25,
8672 22, 28, 28, 28, 28, 28, 28, 28,
8673 28, 28
8674 };
8675  
8676 static const int english_tokenizer_start = 10;
8677  
8678 0 ▶english_tokenizer::english_tokenizer(unsigned version) : ragel_tokenizer(version <= 1 ? 1 : 2) {}
Branch: 1 branch
BranchTrueFalseTotal
english_tokenizer::english_tokenizer(unsigned version) : ragel_tokenizer(version <= 1 ? 1 : 2) {} 0 0 0
8679  
8680 0 bool english_tokenizer::next_sentence(vector<token_range>& tokens) {
8681 using namespace unilib;
8682  
8683 int cs, act;
8684 size_t ts, te;
8685 0 size_t whitespace = 0; // Suppress "may be uninitialized" warning
8686  
8687 0 ▶ while (tokenize_url_email(tokens))
Branch: 2 branches
BranchTrueFalseTotal
while (tokenize_url_email(tokens)) 0 0 0
while (tokenize_url_email(tokens)) 0 0 0
8688 0 ▶ if (emergency_sentence_split(tokens))
Branch: 1 branch
BranchTrueFalseTotal
if (emergency_sentence_split(tokens)) 0 0 0
8689 0 return true;
8690
8691 {
8692 0 cs = english_tokenizer_start;
8693 0 ts = 0;
8694 0 te = 0;
8695 0 act = 0;
8696 }
8697  
8698 {
8699 int _klen;
8700 const short *_keys;
8701 int _trans;
8702 short _widec;
8703  
8704 0 ▶ if ( ( current) == ( (chars.size() - 1)) )
Branch: 1 branch
BranchTrueFalseTotal
if ( ( current) == ( (chars.size() - 1)) ) 0 0 0
8705 0 goto _test_eof;
8706 0 ▶ if ( cs == 0 )
Branch: 1 branch
BranchTrueFalseTotal
if ( cs == 0 ) 0 0 0
8707 0 goto _out;
8708 0 _resume:
8709 0 ▶ switch ( _english_tokenizer_from_state_actions[cs] ) {
Branch: 1 branch
BranchTrueFalseTotal
switch ( _english_tokenizer_from_state_actions[cs] ) { 0 0 0
8710 0 case 6:
8711 0 {ts = ( current);}
8712 0 break;
8713 }
8714  
8715 0 _widec = ( ragel_char(chars[current]));
8716 0 _klen = _english_tokenizer_cond_lengths[cs];
8717 0 _keys = _english_tokenizer_cond_keys + (_english_tokenizer_cond_offsets[cs]*2);
8718 0 ▶ if ( _klen > 0 ) {
Branch: 1 branch
BranchTrueFalseTotal
if ( _klen > 0 ) { 0 0 0
8719 0 const short *_lower = _keys;
8720 const short *_mid;
8721 0 const short *_upper = _keys + (_klen<<1) - 2;
8722 while (1) {
8723 0 ▶ if ( _upper < _lower )
Branch: 1 branch
BranchTrueFalseTotal
if ( _upper < _lower ) 0 0 0
8724 0 break;
8725  
8726 0 _mid = _lower + (((_upper-_lower) >> 1) & ~1);
8727 0 ▶ if ( _widec < _mid[0] )
Branch: 1 branch
BranchTrueFalseTotal
if ( _widec < _mid[0] ) 0 0 0
8728 0 _upper = _mid - 2;
8729 0 ▶ else if ( _widec > _mid[1] )
Branch: 1 branch
BranchTrueFalseTotal
else if ( _widec > _mid[1] ) 0 0 0
8730 0 _lower = _mid + 2;
8731 else {
8732 0 switch ( _english_tokenizer_cond_spaces[_english_tokenizer_cond_offsets[cs] + ((_mid - _keys)>>1)] ) {
8733 0 case 0: {
8734 0 _widec = (short)(256u + (( ragel_char(chars[current])) - 0u));
8735 0 if (
8736 0 ▶ !current || (chars[current-1].cat & ~(unicode::L | unicode::M | unicode::N | unicode::Pd)) ) _widec += 256;
Branch: 3 branches
BranchTrueFalseTotal
!current || (chars[current-1].cat & ~(unicode::L | unicode::M | unicode::N | unicode::Pd)) ) _widec += 256; 0 0 0
!current || (chars[current-1].cat & ~(unicode::L | unicode::M | unicode::N | unicode::Pd)) ) _widec += 256; 0 0 0
!current || (chars[current-1].cat & ~(unicode::L | unicode::M | unicode::N | unicode::Pd)) ) _widec += 256; 0 0 0
8737 0 break;
8738 }
8739 0 case 1: {
8740 0 _widec = (short)(768u + (( ragel_char(chars[current])) - 0u));
8741 0 if (
8742 0 ▶ !current || ((chars[current-1].cat & ~(unicode::L | unicode::M | unicode::N)) && chars[current-1].chr != '+') ) _widec += 256;
Branch: 4 branches
BranchTrueFalseTotal
!current || ((chars[current-1].cat & ~(unicode::L | unicode::M | unicode::N)) && chars[current-1].chr != '+') ) _widec += 256; 0 0 0
!current || ((chars[current-1].cat & ~(unicode::L | unicode::M | unicode::N)) && chars[current-1].chr != '+') ) _widec += 256; 0 0 0
!current || ((chars[current-1].cat & ~(unicode::L | unicode::M | unicode::N)) && chars[current-1].chr != '+') ) _widec += 256; 0 0 0
!current || ((chars[current-1].cat & ~(unicode::L | unicode::M | unicode::N)) && chars[current-1].chr != '+') ) _widec += 256; 0 0 0
8743 0 break;
8744 }
8745 }
8746 0 break;
8747 }
8748 }
8749 }
8750  
8751 0 _keys = _english_tokenizer_trans_keys + _english_tokenizer_key_offsets[cs];
8752 0 _trans = _english_tokenizer_index_offsets[cs];
8753  
8754 0 _klen = _english_tokenizer_single_lengths[cs];
8755 0 ▶ if ( _klen > 0 ) {
Branch: 1 branch
BranchTrueFalseTotal
if ( _klen > 0 ) { 0 0 0
8756 0 const short *_lower = _keys;
8757 const short *_mid;
8758 0 const short *_upper = _keys + _klen - 1;
8759 while (1) {
8760 0 ▶ if ( _upper < _lower )
Branch: 1 branch
BranchTrueFalseTotal
if ( _upper < _lower ) 0 0 0
8761 0 break;
8762  
8763 0 _mid = _lower + ((_upper-_lower) >> 1);
8764 0 ▶ if ( _widec < *_mid )
Branch: 1 branch
BranchTrueFalseTotal
if ( _widec < *_mid ) 0 0 0
8765 0 _upper = _mid - 1;
8766 0 ▶ else if ( _widec > *_mid )
Branch: 1 branch
BranchTrueFalseTotal
else if ( _widec > *_mid ) 0 0 0
8767 0 _lower = _mid + 1;
8768 else {
8769 0 _trans += (unsigned int)(_mid - _keys);
8770 0 goto _match;
8771 }
8772 }
8773 0 _keys += _klen;
8774 0 _trans += _klen;
8775 }
8776  
8777 0 _klen = _english_tokenizer_range_lengths[cs];
8778 0 ▶ if ( _klen > 0 ) {
Branch: 1 branch
BranchTrueFalseTotal
if ( _klen > 0 ) { 0 0 0
8779 0 const short *_lower = _keys;
8780 const short *_mid;
8781 0 const short *_upper = _keys + (_klen<<1) - 2;
8782 while (1) {
8783 0 ▶ if ( _upper < _lower )
Branch: 1 branch
BranchTrueFalseTotal
if ( _upper < _lower ) 0 0 0
8784 0 break;
8785  
8786 0 _mid = _lower + (((_upper-_lower) >> 1) & ~1);
8787 0 ▶ if ( _widec < _mid[0] )
Branch: 1 branch
BranchTrueFalseTotal
if ( _widec < _mid[0] ) 0 0 0
8788 0 _upper = _mid - 2;
8789 0 ▶ else if ( _widec > _mid[1] )
Branch: 1 branch
BranchTrueFalseTotal
else if ( _widec > _mid[1] ) 0 0 0
8790 0 _lower = _mid + 2;
8791 else {
8792 0 _trans += (unsigned int)((_mid - _keys)>>1);
8793 0 goto _match;
8794 }
8795 }
8796 0 _trans += _klen;
8797 }
8798  
8799 0 _match:
8800 0 _trans = _english_tokenizer_indicies[_trans];
8801 0 _eof_trans:
8802 0 cs = _english_tokenizer_trans_targs[_trans];
8803  
8804 0 ▶ if ( _english_tokenizer_trans_actions[_trans] == 0 )
Branch: 1 branch
BranchTrueFalseTotal
if ( _english_tokenizer_trans_actions[_trans] == 0 ) 0 0 0
8805 0 goto _again;
8806  
8807 0 switch ( _english_tokenizer_trans_actions[_trans] ) {
8808 0 case 3:
8809 0 { whitespace = current; }
8810 0 break;
8811 0 case 4:
8812 0 {te = ( current)+1;}
8813 0 break;
8814 0 case 7:
8815 0 ▶ {te = ( current)+1;{ tokens.emplace_back(ts, te - ts);
Branch: 1 branch
BranchTrueFalseTotal
{te = ( current)+1;{ tokens.emplace_back(ts, te - ts); 0 0 0
8816 0 ▶ split_token(tokens);
Branch: 1 branch
BranchTrueFalseTotal
split_token(tokens); 0 0 0
8817 0 current = te;
8818 do
8819 0 ▶ if (emergency_sentence_split(tokens)) { ( current)--; {( current)++; goto _out; } }
Branch: 1 branch
BranchTrueFalseTotal
if (emergency_sentence_split(tokens)) { ( current)--; {( current)++; goto _out; } } 0 0 0
8820 0 ▶ while (tokenize_url_email(tokens));
Branch: 2 branches
BranchTrueFalseTotal
while (tokenize_url_email(tokens)); 0 0 0
while (tokenize_url_email(tokens)); 0 0 0
8821 0 ( current)--;
8822 }}
8823 0 break;
8824 0 case 2:
8825 0 {te = ( current)+1;{
8826 0 ▶ bool eos = is_eos(tokens, chars[ts].chr, &abbreviations);
Branch: 1 branch
BranchTrueFalseTotal
bool eos = is_eos(tokens, chars[ts].chr, &abbreviations); 0 0 0
8827 0 ▶ for (current = ts; current < whitespace; current++)
Branch: 1 branch
BranchTrueFalseTotal
for (current = ts; current < whitespace; current++) 0 0 0
8828 0 ▶ tokens.emplace_back(current, 1);
Branch: 1 branch
BranchTrueFalseTotal
tokens.emplace_back(current, 1); 0 0 0
8829 0 {( current) = (( whitespace))-1;}
8830 0 ▶ if (eos) {( current)++; goto _out; }
Branch: 1 branch
BranchTrueFalseTotal
if (eos) {( current)++; goto _out; } 0 0 0
8831 }}
8832 0 break;
8833 0 case 10:
8834 0 {te = ( current)+1;{
8835 0 ▶ if (!tokens.empty()) {( current)++; goto _out; }
Branch: 1 branch
BranchTrueFalseTotal
if (!tokens.empty()) {( current)++; goto _out; } 0 0 0
8836 0 current = te;
8837 do
8838 0 ▶ if (emergency_sentence_split(tokens)) { ( current)--; {( current)++; goto _out; } }
Branch: 1 branch
BranchTrueFalseTotal
if (emergency_sentence_split(tokens)) { ( current)--; {( current)++; goto _out; } } 0 0 0
8839 0 ▶ while (tokenize_url_email(tokens));
Branch: 2 branches
BranchTrueFalseTotal
while (tokenize_url_email(tokens)); 0 0 0
while (tokenize_url_email(tokens)); 0 0 0
8840 0 ( current)--;
8841 }}
8842 0 break;
8843 0 case 11:
8844 0 ▶ {te = ( current);( current)--;{ tokens.emplace_back(ts, te - ts);
Branch: 1 branch
BranchTrueFalseTotal
{te = ( current);( current)--;{ tokens.emplace_back(ts, te - ts); 0 0 0
8845 0 ▶ split_token(tokens);
Branch: 1 branch
BranchTrueFalseTotal
split_token(tokens); 0 0 0
8846 0 current = te;
8847 do
8848 0 ▶ if (emergency_sentence_split(tokens)) { ( current)--; {( current)++; goto _out; } }
Branch: 1 branch
BranchTrueFalseTotal
if (emergency_sentence_split(tokens)) { ( current)--; {( current)++; goto _out; } } 0 0 0
8849 0 ▶ while (tokenize_url_email(tokens));
Branch: 2 branches
BranchTrueFalseTotal
while (tokenize_url_email(tokens)); 0 0 0
while (tokenize_url_email(tokens)); 0 0 0
8850 0 ( current)--;
8851 }}
8852 0 break;
8853 0 case 8:
8854 0 {te = ( current);( current)--;{
8855 0 current = te;
8856 do
8857 0 ▶ if (emergency_sentence_split(tokens)) { ( current)--; {( current)++; goto _out; } }
Branch: 1 branch
BranchTrueFalseTotal
if (emergency_sentence_split(tokens)) { ( current)--; {( current)++; goto _out; } } 0 0 0
8858 0 ▶ while (tokenize_url_email(tokens));
Branch: 2 branches
BranchTrueFalseTotal
while (tokenize_url_email(tokens)); 0 0 0
while (tokenize_url_email(tokens)); 0 0 0
8859 0 ( current)--;
8860 }}
8861 0 break;
8862 0 case 9:
8863 0 {te = ( current);( current)--;{
8864 0 ▶ if (!tokens.empty()) {( current)++; goto _out; }
Branch: 1 branch
BranchTrueFalseTotal
if (!tokens.empty()) {( current)++; goto _out; } 0 0 0
8865 0 current = te;
8866 do
8867 0 ▶ if (emergency_sentence_split(tokens)) { ( current)--; {( current)++; goto _out; } }
Branch: 1 branch
BranchTrueFalseTotal
if (emergency_sentence_split(tokens)) { ( current)--; {( current)++; goto _out; } } 0 0 0
8868 0 ▶ while (tokenize_url_email(tokens));
Branch: 2 branches
BranchTrueFalseTotal
while (tokenize_url_email(tokens)); 0 0 0
while (tokenize_url_email(tokens)); 0 0 0
8869 0 ( current)--;
8870 }}
8871 0 break;
8872 0 case 1:
8873 0 ▶ {{( current) = ((te))-1;}{ tokens.emplace_back(ts, te - ts);
Branch: 1 branch
BranchTrueFalseTotal
{{( current) = ((te))-1;}{ tokens.emplace_back(ts, te - ts); 0 0 0
8874 0 ▶ split_token(tokens);
Branch: 1 branch
BranchTrueFalseTotal
split_token(tokens); 0 0 0
8875 0 current = te;
8876 do
8877 0 ▶ if (emergency_sentence_split(tokens)) { ( current)--; {( current)++; goto _out; } }
Branch: 1 branch
BranchTrueFalseTotal
if (emergency_sentence_split(tokens)) { ( current)--; {( current)++; goto _out; } } 0 0 0
8878 0 ▶ while (tokenize_url_email(tokens));
Branch: 2 branches
BranchTrueFalseTotal
while (tokenize_url_email(tokens)); 0 0 0
while (tokenize_url_email(tokens)); 0 0 0
8879 0 ( current)--;
8880 }}
8881 0 break;
8882 }
8883  
8884 0 _again:
8885 0 ▶ switch ( _english_tokenizer_to_state_actions[cs] ) {
Branch: 1 branch
BranchTrueFalseTotal
switch ( _english_tokenizer_to_state_actions[cs] ) { 0 0 0
8886 0 case 5:
8887 0 {ts = 0;}
8888 0 break;
8889 }
8890  
8891 0 ▶ if ( cs == 0 )
Branch: 1 branch
BranchTrueFalseTotal
if ( cs == 0 ) 0 0 0
8892 0 goto _out;
8893 0 ▶ if ( ++( current) != ( (chars.size() - 1)) )
Branch: 1 branch
BranchTrueFalseTotal
if ( ++( current) != ( (chars.size() - 1)) ) 0 0 0
8894 0 goto _resume;
8895 0 _test_eof: {}
8896 0 ▶ if ( ( current) == ( (chars.size() - 1)) )
Branch: 1 branch
BranchTrueFalseTotal
if ( ( current) == ( (chars.size() - 1)) ) 0 0 0
8897 {
8898 0 ▶ if ( _english_tokenizer_eof_trans[cs] > 0 ) {
Branch: 1 branch
BranchTrueFalseTotal
if ( _english_tokenizer_eof_trans[cs] > 0 ) { 0 0 0
8899 0 _trans = _english_tokenizer_eof_trans[cs] - 1;
8900 0 goto _eof_trans;
8901 }
8902 }
8903  
8904 0 _out: {}
8905 }
8906  
8907 (void)act; // Suppress unused variable warning
8908  
8909 0 return !tokens.empty();
8910 }
8911  
8912 /////////
8913 // File: tokenizer/generic_tokenizer.cpp
8914 /////////
8915  
8916 // This file is part of MorphoDiTa <http://github.com/ufal/morphodita/>.
8917 //
8918 // Copyright 2015 Institute of Formal and Applied Linguistics, Faculty of
8919 // Mathematics and Physics, Charles University in Prague, Czech Republic.
8920 //
8921 // This Source Code Form is subject to the terms of the Mozilla Public
8922 // License, v. 2.0. If a copy of the MPL was not distributed with this
8923 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
8924  
8925 static const char _generic_tokenizer_cond_offsets[] = {
8926 0, 0, 0, 0, 0, 0, 0, 0,
8927 2, 2, 2, 2, 2, 2, 2, 2,
8928 2, 2, 2, 2
8929 };
8930  
8931 static const char _generic_tokenizer_cond_lengths[] = {
8932 0, 0, 0, 0, 0, 0, 0, 2,
8933 0, 0, 0, 0, 0, 0, 0, 0,
8934 0, 0, 0, 0
8935 };
8936  
8937 static const short _generic_tokenizer_cond_keys[] = {
8938 43u, 43u, 45u, 45u, 0
8939 };
8940  
8941 static const char _generic_tokenizer_cond_spaces[] = {
8942 1, 0, 0
8943 };
8944  
8945 static const unsigned char _generic_tokenizer_key_offsets[] = {
8946 0, 0, 17, 29, 43, 46, 51, 54,
8947 89, 94, 99, 100, 105, 106, 111, 125,
8948 131, 136, 139, 151
8949 };
8950  
8951 static const short _generic_tokenizer_trans_keys[] = {
8952 13u, 32u, 34u, 40u, 91u, 96u, 123u, 129u,
8953 133u, 135u, 147u, 150u, 162u, 9u, 10u, 65u,
8954 90u, 34u, 40u, 91u, 96u, 123u, 129u, 133u,
8955 135u, 150u, 162u, 65u, 90u, 13u, 32u, 34u,
8956 39u, 41u, 59u, 93u, 125u, 139u, 141u, 147u,
8957 161u, 9u, 10u, 159u, 48u, 57u, 43u, 45u,
8958 159u, 48u, 57u, 159u, 48u, 57u, 9u, 10u,
8959 13u, 32u, 33u, 44u, 46u, 47u, 63u, 129u,
8960 131u, 135u, 142u, 147u, 157u, 159u, 160u, 301u,
8961 557u, 811u, 1067u, 0u, 42u, 48u, 57u, 58u,
8962 64u, 65u, 90u, 91u, 96u, 97u, 122u, 123u,
8963 255u, 9u, 10u, 13u, 32u, 147u, 9u, 10u,
8964 13u, 32u, 147u, 13u, 9u, 10u, 13u, 32u,
8965 147u, 10u, 9u, 10u, 13u, 32u, 147u, 13u,
8966 32u, 34u, 39u, 41u, 59u, 93u, 125u, 139u,
8967 141u, 147u, 161u, 9u, 10u, 46u, 69u, 101u,
8968 159u, 48u, 57u, 69u, 101u, 159u, 48u, 57u,
8969 159u, 48u, 57u, 129u, 131u, 135u, 151u, 155u,
8970 157u, 65u, 90u, 97u, 122u, 142u, 143u, 159u,
8971 48u, 57u, 0
8972 };
8973  
8974 static const char _generic_tokenizer_single_lengths[] = {
8975 0, 13, 10, 12, 1, 3, 1, 21,
8976 5, 5, 1, 5, 1, 5, 12, 4,
8977 3, 1, 6, 1
8978 };
8979  
8980 static const char _generic_tokenizer_range_lengths[] = {
8981 0, 2, 1, 1, 1, 1, 1, 7,
8982 0, 0, 0, 0, 0, 0, 1, 1,
8983 1, 1, 3, 1
8984 };
8985  
8986 static const unsigned char _generic_tokenizer_index_offsets[] = {
8987 0, 0, 16, 28, 42, 45, 50, 53,
8988 82, 88, 94, 96, 102, 104, 110, 124,
8989 130, 135, 138, 148
8990 };
8991  
8992 static const char _generic_tokenizer_indicies[] = {
8993 1, 1, 2, 2, 2, 2, 2, 3,
8994 2, 3, 1, 2, 2, 1, 3, 0,
8995 2, 2, 2, 2, 2, 3, 2, 3,
8996 2, 2, 3, 0, 4, 4, 5, 5,
8997 5, 5, 5, 5, 5, 5, 4, 5,
8998 4, 0, 6, 6, 0, 7, 7, 8,
8999 8, 0, 8, 8, 0, 10, 11, 12,
9000 10, 13, 9, 13, 9, 13, 16, 16,
9001 16, 16, 10, 16, 15, 13, 9, 17,
9002 9, 17, 9, 15, 9, 16, 9, 16,
9003 9, 14, 10, 11, 12, 10, 10, 18,
9004 10, 19, 20, 10, 10, 18, 22, 21,
9005 10, 19, 23, 10, 10, 18, 22, 21,
9006 10, 20, 23, 10, 10, 18, 4, 4,
9007 5, 5, 5, 5, 5, 5, 5, 5,
9008 4, 5, 4, 24, 25, 26, 26, 15,
9009 15, 24, 26, 26, 6, 6, 24, 8,
9010 8, 24, 16, 16, 16, 16, 16, 16,
9011 16, 16, 16, 24, 15, 15, 24, 0
9012 };
9013  
9014 static const char _generic_tokenizer_trans_targs[] = {
9015 7, 1, 2, 7, 1, 3, 16, 6,
9016 17, 7, 8, 9, 13, 14, 0, 15,
9017 18, 19, 7, 10, 11, 7, 7, 12,
9018 7, 4, 5
9019 };
9020  
9021 static const char _generic_tokenizer_trans_actions[] = {
9022 1, 0, 0, 2, 3, 0, 4, 0,
9023 0, 7, 0, 0, 0, 4, 0, 4,
9024 0, 0, 8, 0, 0, 9, 10, 0,
9025 11, 0, 0
9026 };
9027  
9028 static const char _generic_tokenizer_to_state_actions[] = {
9029 0, 0, 0, 0, 0, 0, 0, 5,
9030 0, 0, 0, 0, 0, 0, 0, 0,
9031 0, 0, 0, 0
9032 };
9033  
9034 static const char _generic_tokenizer_from_state_actions[] = {
9035 0, 0, 0, 0, 0, 0, 0, 6,
9036 0, 0, 0, 0, 0, 0, 0, 0,
9037 0, 0, 0, 0
9038 };
9039  
9040 static const unsigned char _generic_tokenizer_eof_trans[] = {
9041 0, 1, 1, 1, 1, 1, 1, 0,
9042 19, 19, 22, 19, 22, 19, 25, 25,
9043 25, 25, 25, 25
9044 };
9045  
9046 static const int generic_tokenizer_start = 7;
9047  
9048 2 ▶generic_tokenizer::generic_tokenizer(unsigned version) : ragel_tokenizer(version <= 1 ? 1 : 2) {}
Branch: 1 branch
BranchTrueFalseTotal
generic_tokenizer::generic_tokenizer(unsigned version) : ragel_tokenizer(version <= 1 ? 1 : 2) {} 2 0 2
9049  
9050 2 bool generic_tokenizer::next_sentence(vector<token_range>& tokens) {
9051 using namespace unilib;
9052  
9053 int cs, act;
9054 size_t ts, te;
9055 2 size_t whitespace = 0; // Suppress "may be uninitialized" warning
9056  
9057 2 ▶ while (tokenize_url_email(tokens))
Branch: 2 branches
BranchTrueFalseTotal
while (tokenize_url_email(tokens)) 2 0 2
while (tokenize_url_email(tokens)) 0 2 2
9058 0 ▶ if (emergency_sentence_split(tokens))
Branch: 1 branch
BranchTrueFalseTotal
if (emergency_sentence_split(tokens)) 0 0 0
9059 0 return true;
9060
9061 {
9062 2 cs = generic_tokenizer_start;
9063 2 ts = 0;
9064 2 te = 0;
9065 2 act = 0;
9066 }
9067  
9068 {
9069 int _klen;
9070 const short *_keys;
9071 int _trans;
9072 short _widec;
9073  
9074 2 ▶ if ( ( current) == ( (chars.size() - 1)) )
Branch: 1 branch
BranchTrueFalseTotal
if ( ( current) == ( (chars.size() - 1)) ) 0 2 2
9075 0 goto _test_eof;
9076 2 ▶ if ( cs == 0 )
Branch: 1 branch
BranchTrueFalseTotal
if ( cs == 0 ) 0 2 2
9077 0 goto _out;
9078 2 _resume:
9079 29 ▶ switch ( _generic_tokenizer_from_state_actions[cs] ) {
Branch: 1 branch
BranchTrueFalseTotal
switch ( _generic_tokenizer_from_state_actions[cs] ) { 8 21 29
9080 8 case 6:
9081 8 {ts = ( current);}
9082 8 break;
9083 }
9084  
9085 29 _widec = ( ragel_char(chars[current]));
9086 29 _klen = _generic_tokenizer_cond_lengths[cs];
9087 29 _keys = _generic_tokenizer_cond_keys + (_generic_tokenizer_cond_offsets[cs]*2);
9088 29 ▶ if ( _klen > 0 ) {
Branch: 1 branch
BranchTrueFalseTotal
if ( _klen > 0 ) { 8 21 29
9089 8 const short *_lower = _keys;
9090 const short *_mid;
9091 8 const short *_upper = _keys + (_klen<<1) - 2;
9092 while (1) {
9093 22 ▶ if ( _upper < _lower )
Branch: 1 branch
BranchTrueFalseTotal
if ( _upper < _lower ) 8 14 22
9094 8 break;
9095  
9096 14 _mid = _lower + (((_upper-_lower) >> 1) & ~1);
9097 14 ▶ if ( _widec < _mid[0] )
Branch: 1 branch
BranchTrueFalseTotal
if ( _widec < _mid[0] ) 2 12 14
9098 2 _upper = _mid - 2;
9099 12 ▶ else if ( _widec > _mid[1] )
Branch: 1 branch
BranchTrueFalseTotal
else if ( _widec > _mid[1] ) 12 0 12
9100 12 _lower = _mid + 2;
9101 else {
9102 0 switch ( _generic_tokenizer_cond_spaces[_generic_tokenizer_cond_offsets[cs] + ((_mid - _keys)>>1)] ) {
9103 0 case 0: {
9104 0 _widec = (short)(256u + (( ragel_char(chars[current])) - 0u));
9105 0 if (
9106 0 ▶ !current || (chars[current-1].cat & ~(unicode::L | unicode::M | unicode::N | unicode::Pd)) ) _widec += 256;
Branch: 3 branches
BranchTrueFalseTotal
!current || (chars[current-1].cat & ~(unicode::L | unicode::M | unicode::N | unicode::Pd)) ) _widec += 256; 0 0 0
!current || (chars[current-1].cat & ~(unicode::L | unicode::M | unicode::N | unicode::Pd)) ) _widec += 256; 0 0 0
!current || (chars[current-1].cat & ~(unicode::L | unicode::M | unicode::N | unicode::Pd)) ) _widec += 256; 0 0 0
9107 0 break;
9108 }
9109 0 case 1: {
9110 0 _widec = (short)(768u + (( ragel_char(chars[current])) - 0u));
9111 0 if (
9112 0 ▶ !current || ((chars[current-1].cat & ~(unicode::L | unicode::M | unicode::N)) && chars[current-1].chr != '+') ) _widec += 256;
Branch: 4 branches
BranchTrueFalseTotal
!current || ((chars[current-1].cat & ~(unicode::L | unicode::M | unicode::N)) && chars[current-1].chr != '+') ) _widec += 256; 0 0 0
!current || ((chars[current-1].cat & ~(unicode::L | unicode::M | unicode::N)) && chars[current-1].chr != '+') ) _widec += 256; 0 0 0
!current || ((chars[current-1].cat & ~(unicode::L | unicode::M | unicode::N)) && chars[current-1].chr != '+') ) _widec += 256; 0 0 0
!current || ((chars[current-1].cat & ~(unicode::L | unicode::M | unicode::N)) && chars[current-1].chr != '+') ) _widec += 256; 0 0 0
9113 0 break;
9114 }
9115 }
9116 0 break;
9117 }
9118 }
9119 }
9120  
9121 29 _keys = _generic_tokenizer_trans_keys + _generic_tokenizer_key_offsets[cs];
9122 29 _trans = _generic_tokenizer_index_offsets[cs];
9123  
9124 29 _klen = _generic_tokenizer_single_lengths[cs];
9125 29 ▶ if ( _klen > 0 ) {
Branch: 1 branch
BranchTrueFalseTotal
if ( _klen > 0 ) { 29 0 29
9126 29 const short *_lower = _keys;
9127 const short *_mid;
9128 29 const short *_upper = _keys + _klen - 1;
9129 while (1) {
9130 109 ▶ if ( _upper < _lower )
Branch: 1 branch
BranchTrueFalseTotal
if ( _upper < _lower ) 21 88 109
9131 21 break;
9132  
9133 88 _mid = _lower + ((_upper-_lower) >> 1);
9134 88 ▶ if ( _widec < *_mid )
Branch: 1 branch
BranchTrueFalseTotal
if ( _widec < *_mid ) 52 36 88
9135 52 _upper = _mid - 1;
9136 36 ▶ else if ( _widec > *_mid )
Branch: 1 branch
BranchTrueFalseTotal
else if ( _widec > *_mid ) 28 8 36
9137 28 _lower = _mid + 1;
9138 else {
9139 8 _trans += (unsigned int)(_mid - _keys);
9140 8 goto _match;
9141 }
9142 }
9143 21 _keys += _klen;
9144 21 _trans += _klen;
9145 }
9146  
9147 21 _klen = _generic_tokenizer_range_lengths[cs];
9148 21 ▶ if ( _klen > 0 ) {
Branch: 1 branch
BranchTrueFalseTotal
if ( _klen > 0 ) { 2 19 21
9149 19 const short *_lower = _keys;
9150 const short *_mid;
9151 19 const short *_upper = _keys + (_klen<<1) - 2;
9152 while (1) {
9153 29 ▶ if ( _upper < _lower )
Branch: 1 branch
BranchTrueFalseTotal
if ( _upper < _lower ) 4 25 29
9154 4 break;
9155  
9156 25 _mid = _lower + (((_upper-_lower) >> 1) & ~1);
9157 25 ▶ if ( _widec < _mid[0] )
Branch: 1 branch
BranchTrueFalseTotal
if ( _widec < _mid[0] ) 8 17 25
9158 8 _upper = _mid - 2;
9159 17 ▶ else if ( _widec > _mid[1] )
Branch: 1 branch
BranchTrueFalseTotal
else if ( _widec > _mid[1] ) 2 15 17
9160 2 _lower = _mid + 2;
9161 else {
9162 15 _trans += (unsigned int)((_mid - _keys)>>1);
9163 15 goto _match;
9164 }
9165 }
9166 4 _trans += _klen;
9167 }
9168  
9169 2 _match:
9170 29 _trans = _generic_tokenizer_indicies[_trans];
9171 31 _eof_trans:
9172 31 cs = _generic_tokenizer_trans_targs[_trans];
9173  
9174 31 ▶ if ( _generic_tokenizer_trans_actions[_trans] == 0 )
Branch: 1 branch
BranchTrueFalseTotal
if ( _generic_tokenizer_trans_actions[_trans] == 0 ) 21 10 31
9175 21 goto _again;
9176  
9177 10 switch ( _generic_tokenizer_trans_actions[_trans] ) {
9178 0 case 3:
9179 0 { whitespace = current; }
9180 0 break;
9181 2 case 4:
9182 2 {te = ( current)+1;}
9183 2 break;
9184 0 case 7:
9185 0 ▶ {te = ( current)+1;{ tokens.emplace_back(ts, te - ts);
Branch: 1 branch
BranchTrueFalseTotal
{te = ( current)+1;{ tokens.emplace_back(ts, te - ts); 0 0 0
9186 0 current = te;
9187 do
9188 0 ▶ if (emergency_sentence_split(tokens)) { ( current)--; {( current)++; goto _out; } }
Branch: 1 branch
BranchTrueFalseTotal
if (emergency_sentence_split(tokens)) { ( current)--; {( current)++; goto _out; } } 0 0 0
9189 0 ▶ while (tokenize_url_email(tokens));
Branch: 2 branches
BranchTrueFalseTotal
while (tokenize_url_email(tokens)); 0 0 0
while (tokenize_url_email(tokens)); 0 0 0
9190 0 ( current)--;
9191 }}
9192 0 break;
9193 0 case 2:
9194 0 {te = ( current)+1;{
9195 0 ▶ bool eos = is_eos(tokens, chars[ts].chr, nullptr);
Branch: 1 branch
BranchTrueFalseTotal
bool eos = is_eos(tokens, chars[ts].chr, nullptr); 0 0 0
9196 0 ▶ for (current = ts; current < whitespace; current++)
Branch: 1 branch
BranchTrueFalseTotal
for (current = ts; current < whitespace; current++) 0 0 0
9197 0 ▶ tokens.emplace_back(current, 1);
Branch: 1 branch
BranchTrueFalseTotal
tokens.emplace_back(current, 1); 0 0 0
9198 0 {( current) = (( whitespace))-1;}
9199 0 ▶ if (eos) {( current)++; goto _out; }
Branch: 1 branch
BranchTrueFalseTotal
if (eos) {( current)++; goto _out; } 0 0 0
9200 }}
9201 0 break;
9202 0 case 10:
9203 0 {te = ( current)+1;{
9204 0 ▶ if (!tokens.empty()) {( current)++; goto _out; }
Branch: 1 branch
BranchTrueFalseTotal
if (!tokens.empty()) {( current)++; goto _out; } 0 0 0
9205 0 current = te;
9206 do
9207 0 ▶ if (emergency_sentence_split(tokens)) { ( current)--; {( current)++; goto _out; } }
Branch: 1 branch
BranchTrueFalseTotal
if (emergency_sentence_split(tokens)) { ( current)--; {( current)++; goto _out; } } 0 0 0
9208 0 ▶ while (tokenize_url_email(tokens));
Branch: 2 branches
BranchTrueFalseTotal
while (tokenize_url_email(tokens)); 0 0 0
while (tokenize_url_email(tokens)); 0 0 0
9209 0 ( current)--;
9210 }}
9211 0 break;
9212 6 case 11:
9213 6 ▶ {te = ( current);( current)--;{ tokens.emplace_back(ts, te - ts);
Branch: 1 branch
BranchTrueFalseTotal
{te = ( current);( current)--;{ tokens.emplace_back(ts, te - ts); 6 0 6
9214 6 current = te;
9215 do
9216 6 ▶ if (emergency_sentence_split(tokens)) { ( current)--; {( current)++; goto _out; } }
Branch: 1 branch
BranchTrueFalseTotal
if (emergency_sentence_split(tokens)) { ( current)--; {( current)++; goto _out; } } 0 6 6
9217 6 ▶ while (tokenize_url_email(tokens));
Branch: 2 branches
BranchTrueFalseTotal
while (tokenize_url_email(tokens)); 6 0 6
while (tokenize_url_email(tokens)); 0 6 6
9218 6 ( current)--;
9219 }}
9220 6 break;
9221 2 case 8:
9222 2 {te = ( current);( current)--;{
9223 2 current = te;
9224 do
9225 2 ▶ if (emergency_sentence_split(tokens)) { ( current)--; {( current)++; goto _out; } }
Branch: 1 branch
BranchTrueFalseTotal
if (emergency_sentence_split(tokens)) { ( current)--; {( current)++; goto _out; } } 0 2 2
9226 2 ▶ while (tokenize_url_email(tokens));
Branch: 2 branches
BranchTrueFalseTotal
while (tokenize_url_email(tokens)); 2 0 2
while (tokenize_url_email(tokens)); 0 2 2
9227 2 ( current)--;
9228 }}
9229 2 break;
9230 0 case 9:
9231 0 {te = ( current);( current)--;{
9232 0 ▶ if (!tokens.empty()) {( current)++; goto _out; }
Branch: 1 branch
BranchTrueFalseTotal
if (!tokens.empty()) {( current)++; goto _out; } 0 0 0
9233 0 current = te;
9234 do
9235 0 ▶ if (emergency_sentence_split(tokens)) { ( current)--; {( current)++; goto _out; } }
Branch: 1 branch
BranchTrueFalseTotal
if (emergency_sentence_split(tokens)) { ( current)--; {( current)++; goto _out; } } 0 0 0
9236 0 ▶ while (tokenize_url_email(tokens));
Branch: 2 branches
BranchTrueFalseTotal
while (tokenize_url_email(tokens)); 0 0 0
while (tokenize_url_email(tokens)); 0 0 0
9237 0 ( current)--;
9238 }}
9239 0 break;
9240 0 case 1:
9241 0 ▶ {{( current) = ((te))-1;}{ tokens.emplace_back(ts, te - ts);
Branch: 1 branch
BranchTrueFalseTotal
{{( current) = ((te))-1;}{ tokens.emplace_back(ts, te - ts); 0 0 0
9242 0 current = te;
9243 do
9244 0 ▶ if (emergency_sentence_split(tokens)) { ( current)--; {( current)++; goto _out; } }
Branch: 1 branch
BranchTrueFalseTotal
if (emergency_sentence_split(tokens)) { ( current)--; {( current)++; goto _out; } } 0 0 0
9245 0 ▶ while (tokenize_url_email(tokens));
Branch: 2 branches
BranchTrueFalseTotal
while (tokenize_url_email(tokens)); 0 0 0
while (tokenize_url_email(tokens)); 0 0 0
9246 0 ( current)--;
9247 }}
9248 0 break;
9249 }
9250  
9251 31 _again:
9252 31 ▶ switch ( _generic_tokenizer_to_state_actions[cs] ) {
Branch: 1 branch
BranchTrueFalseTotal
switch ( _generic_tokenizer_to_state_actions[cs] ) { 8 23 31
9253 8 case 5:
9254 8 {ts = 0;}
9255 8 break;
9256 }
9257  
9258 31 ▶ if ( cs == 0 )
Branch: 1 branch
BranchTrueFalseTotal
if ( cs == 0 ) 0 31 31
9259 0 goto _out;
9260 31 ▶ if ( ++( current) != ( (chars.size() - 1)) )
Branch: 1 branch
BranchTrueFalseTotal
if ( ++( current) != ( (chars.size() - 1)) ) 27 4 31
9261 27 goto _resume;
9262 4 _test_eof: {}
9263 4 ▶ if ( ( current) == ( (chars.size() - 1)) )
Branch: 1 branch
BranchTrueFalseTotal
if ( ( current) == ( (chars.size() - 1)) ) 4 0 4
9264 {
9265 4 ▶ if ( _generic_tokenizer_eof_trans[cs] > 0 ) {
Branch: 1 branch
BranchTrueFalseTotal
if ( _generic_tokenizer_eof_trans[cs] > 0 ) { 2 2 4
9266 2 _trans = _generic_tokenizer_eof_trans[cs] - 1;
9267 2 goto _eof_trans;
9268 }
9269 }
9270  
9271 0 _out: {}
9272 }
9273  
9274 (void)act; // Suppress unused variable warning
9275  
9276 2 return !tokens.empty();
9277 }
9278  
9279 /////////
9280 // File: tokenizer/ragel_tokenizer.cpp
9281 /////////
9282  
9283 // This file is part of MorphoDiTa <http://github.com/ufal/morphodita/>.
9284 //
9285 // Copyright 2015 Institute of Formal and Applied Linguistics, Faculty of
9286 // Mathematics and Physics, Charles University in Prague, Czech Republic.
9287 //
9288 // This Source Code Form is subject to the terms of the Mozilla Public
9289 // License, v. 2.0. If a copy of the MPL was not distributed with this
9290 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
9291  
9292 static const char _ragel_url_email_cond_offsets[] = {
9293 0, 0, 0, 0, 0, 0, 0, 0,
9294 0, 0, 0, 0, 0, 1, 1, 1,
9295 1, 1, 1, 1, 1, 1, 1, 1,
9296 1, 1, 1, 1, 1, 1, 1, 1,
9297 1, 1, 1, 1, 1, 1, 1, 1,
9298 1, 1, 1, 1, 1, 1, 1, 1,
9299 1, 1, 1, 1, 1, 1, 1, 1,
9300 1, 1, 1, 2, 3, 3, 4, 5,
9301 6, 7, 8, 9, 10, 11, 12, 13,
9302 14, 15, 16
9303 };
9304  
9305 static const char _ragel_url_email_cond_lengths[] = {
9306 0, 0, 0, 0, 0, 0, 0, 0,
9307 0, 0, 0, 0, 1, 0, 0, 0,
9308 0, 0, 0, 0, 0, 0, 0, 0,
9309 0, 0, 0, 0, 0, 0, 0, 0,
9310 0, 0, 0, 0, 0, 0, 0, 0,
9311 0, 0, 0, 0, 0, 0, 0, 0,
9312 0, 0, 0, 0, 0, 0, 0, 0,
9313 0, 0, 1, 1, 0, 1, 1, 1,
9314 1, 1, 1, 1, 1, 1, 1, 1,
9315 1, 1, 1
9316 };
9317  
9318 static const short _ragel_url_email_cond_keys[] = {
9319 41u, 41u, 47u, 47u, 47u, 47u, 41u, 41u,
9320 47u, 47u, 47u, 47u, 47u, 47u, 47u, 47u,
9321 47u, 47u, 47u, 47u, 47u, 47u, 47u, 47u,
9322 47u, 47u, 47u, 47u, 47u, 47u, 47u, 47u,
9323 47u, 47u, 0
9324 };
9325  
9326 static const char _ragel_url_email_cond_spaces[] = {
9327 1, 0, 0, 1, 0, 0, 0, 0,
9328 0, 0, 0, 0, 0, 0, 0, 0,
9329 0, 0
9330 };
9331  
9332 static const short _ragel_url_email_key_offsets[] = {
9333 0, 0, 15, 29, 41, 54, 63, 71,
9334 78, 86, 92, 100, 117, 145, 154, 162,
9335 171, 179, 188, 196, 204, 215, 225, 233,
9336 241, 252, 262, 270, 278, 289, 299, 315,
9337 330, 346, 360, 376, 393, 409, 426, 442,
9338 459, 475, 491, 510, 528, 544, 560, 579,
9339 597, 613, 629, 648, 666, 682, 698, 714,
9340 725, 726, 741, 752, 756, 773, 801, 812,
9341 823, 834, 848, 861, 879, 893, 908, 926,
9342 944, 962, 983
9343 };
9344  
9345 static const short _ragel_url_email_trans_keys[] = {
9346 33u, 48u, 49u, 50u, 95u, 36u, 37u, 39u,
9347 46u, 51u, 57u, 65u, 90u, 97u, 122u, 33u,
9348 58u, 64u, 95u, 36u, 37u, 39u, 46u, 48u,
9349 57u, 65u, 90u, 97u, 122u, 33u, 95u, 36u,
9350 37u, 39u, 46u, 48u, 57u, 65u, 90u, 97u,
9351 122u, 33u, 64u, 95u, 36u, 37u, 39u, 46u,
9352 48u, 57u, 65u, 90u, 97u, 122u, 48u, 49u,
9353 50u, 51u, 57u, 65u, 90u, 97u, 122u, 45u,
9354 46u, 48u, 57u, 65u, 90u, 97u, 122u, 45u,
9355 48u, 57u, 65u, 90u, 97u, 122u, 45u, 46u,
9356 48u, 57u, 65u, 90u, 97u, 122u, 48u, 57u,
9357 65u, 90u, 97u, 122u, 45u, 46u, 48u, 57u,
9358 65u, 90u, 97u, 122u, 33u, 39u, 41u, 61u,
9359 95u, 36u, 47u, 48u, 57u, 58u, 59u, 63u,
9360 64u, 65u, 90u, 97u, 122u, 33u, 39u, 40u,
9361 44u, 46u, 61u, 63u, 95u, 129u, 131u, 135u,
9362 151u, 809u, 1065u, 36u, 38u, 42u, 57u, 58u,
9363 59u, 64u, 90u, 97u, 122u, 142u, 143u, 155u,
9364 159u, 48u, 49u, 50u, 51u, 57u, 65u, 90u,
9365 97u, 122u, 45u, 46u, 48u, 57u, 65u, 90u,
9366 97u, 122u, 48u, 49u, 50u, 51u, 57u, 65u,
9367 90u, 97u, 122u, 45u, 46u, 48u, 57u, 65u,
9368 90u, 97u, 122u, 48u, 49u, 50u, 51u, 57u,
9369 65u, 90u, 97u, 122u, 45u, 46u, 48u, 57u,
9370 65u, 90u, 97u, 122u, 45u, 46u, 48u, 57u,
9371 65u, 90u, 97u, 122u, 45u, 46u, 53u, 48u,
9372 52u, 54u, 57u, 65u, 90u, 97u, 122u, 45u,
9373 46u, 48u, 53u, 54u, 57u, 65u, 90u, 97u,
9374 122u, 45u, 46u, 48u, 57u, 65u, 90u, 97u,
9375 122u, 45u, 46u, 48u, 57u, 65u, 90u, 97u,
9376 122u, 45u, 46u, 53u, 48u, 52u, 54u, 57u,
9377 65u, 90u, 97u, 122u, 45u, 46u, 48u, 53u,
9378 54u, 57u, 65u, 90u, 97u, 122u, 45u, 46u,
9379 48u, 57u, 65u, 90u, 97u, 122u, 45u, 46u,
9380 48u, 57u, 65u, 90u, 97u, 122u, 45u, 46u,
9381 53u, 48u, 52u, 54u, 57u, 65u, 90u, 97u,
9382 122u, 45u, 46u, 48u, 53u, 54u, 57u, 65u,
9383 90u, 97u, 122u, 33u, 45u, 46u, 58u, 64u,
9384 95u, 36u, 37u, 39u, 44u, 48u, 57u, 65u,
9385 90u, 97u, 122u, 33u, 45u, 58u, 64u, 95u,
9386 36u, 37u, 39u, 46u, 48u, 57u, 65u, 90u,
9387 97u, 122u, 33u, 45u, 46u, 58u, 64u, 95u,
9388 36u, 37u, 39u, 44u, 48u, 57u, 65u, 90u,
9389 97u, 122u, 33u, 58u, 64u, 95u, 36u, 37u,
9390 39u, 46u, 48u, 57u, 65u, 90u, 97u, 122u,
9391 33u, 45u, 46u, 58u, 64u, 95u, 36u, 37u,
9392 39u, 44u, 48u, 57u, 65u, 90u, 97u, 122u,
9393 33u, 48u, 49u, 50u, 58u, 64u, 95u, 36u,
9394 37u, 39u, 46u, 51u, 57u, 65u, 90u, 97u,
9395 122u, 33u, 45u, 46u, 58u, 64u, 95u, 36u,
9396 37u, 39u, 44u, 48u, 57u, 65u, 90u, 97u,
9397 122u, 33u, 48u, 49u, 50u, 58u, 64u, 95u,
9398 36u, 37u, 39u, 46u, 51u, 57u, 65u, 90u,
9399 97u, 122u, 33u, 45u, 46u, 58u, 64u, 95u,
9400 36u, 37u, 39u, 44u, 48u, 57u, 65u, 90u,
9401 97u, 122u, 33u, 48u, 49u, 50u, 58u, 64u,
9402 95u, 36u, 37u, 39u, 46u, 51u, 57u, 65u,
9403 90u, 97u, 122u, 33u, 45u, 46u, 58u, 64u,
9404 95u, 36u, 37u, 39u, 44u, 48u, 57u, 65u,
9405 90u, 97u, 122u, 33u, 45u, 46u, 58u, 64u,
9406 95u, 36u, 37u, 39u, 44u, 48u, 57u, 65u,
9407 90u, 97u, 122u, 33u, 45u, 46u, 53u, 58u,
9408 64u, 95u, 36u, 37u, 39u, 44u, 48u, 52u,
9409 54u, 57u, 65u, 90u, 97u, 122u, 33u, 45u,
9410 46u, 58u, 64u, 95u, 36u, 37u, 39u, 44u,
9411 48u, 53u, 54u, 57u, 65u, 90u, 97u, 122u,
9412 33u, 45u, 46u, 58u, 64u, 95u, 36u, 37u,
9413 39u, 44u, 48u, 57u, 65u, 90u, 97u, 122u,
9414 33u, 45u, 46u, 58u, 64u, 95u, 36u, 37u,
9415 39u, 44u, 48u, 57u, 65u, 90u, 97u, 122u,
9416 33u, 45u, 46u, 53u, 58u, 64u, 95u, 36u,
9417 37u, 39u, 44u, 48u, 52u, 54u, 57u, 65u,
9418 90u, 97u, 122u, 33u, 45u, 46u, 58u, 64u,
9419 95u, 36u, 37u, 39u, 44u, 48u, 53u, 54u,
9420 57u, 65u, 90u, 97u, 122u, 33u, 45u, 46u,
9421 58u, 64u, 95u, 36u, 37u, 39u, 44u, 48u,
9422 57u, 65u, 90u, 97u, 122u, 33u, 45u, 46u,
9423 58u, 64u, 95u, 36u, 37u, 39u, 44u, 48u,
9424 57u, 65u, 90u, 97u, 122u, 33u, 45u, 46u,
9425 53u, 58u, 64u, 95u, 36u, 37u, 39u, 44u,
9426 48u, 52u, 54u, 57u, 65u, 90u, 97u, 122u,
9427 33u, 45u, 46u, 58u, 64u, 95u, 36u, 37u,
9428 39u, 44u, 48u, 53u, 54u, 57u, 65u, 90u,
9429 97u, 122u, 33u, 45u, 46u, 58u, 64u, 95u,
9430 36u, 37u, 39u, 44u, 48u, 57u, 65u, 90u,
9431 97u, 122u, 33u, 45u, 46u, 58u, 64u, 95u,
9432 36u, 37u, 39u, 44u, 48u, 57u, 65u, 90u,
9433 97u, 122u, 33u, 45u, 46u, 58u, 64u, 95u,
9434 36u, 37u, 39u, 44u, 48u, 57u, 65u, 90u,
9435 97u, 122u, 33u, 47u, 95u, 36u, 37u, 39u,
9436 57u, 65u, 90u, 97u, 122u, 47u, 33u, 48u,
9437 49u, 50u, 95u, 36u, 37u, 39u, 46u, 51u,
9438 57u, 65u, 90u, 97u, 122u, 45u, 46u, 58u,
9439 303u, 559u, 48u, 57u, 65u, 90u, 97u, 122u,
9440 303u, 559u, 48u, 57u, 33u, 39u, 41u, 61u,
9441 95u, 36u, 47u, 48u, 57u, 58u, 59u, 63u,
9442 64u, 65u, 90u, 97u, 122u, 33u, 39u, 40u,
9443 44u, 46u, 61u, 63u, 95u, 129u, 131u, 135u,
9444 151u, 809u, 1065u, 36u, 38u, 42u, 57u, 58u,
9445 59u, 64u, 90u, 97u, 122u, 142u, 143u, 155u,
9446 159u, 45u, 46u, 58u, 303u, 559u, 48u, 57u,
9447 65u, 90u, 97u, 122u, 45u, 46u, 58u, 303u,
9448 559u, 48u, 57u, 65u, 90u, 97u, 122u, 45u,
9449 46u, 58u, 303u, 559u, 48u, 57u, 65u, 90u,
9450 97u, 122u, 45u, 46u, 53u, 58u, 303u, 559u,
9451 48u, 52u, 54u, 57u, 65u, 90u, 97u, 122u,
9452 45u, 46u, 58u, 303u, 559u, 48u, 53u, 54u,
9453 57u, 65u, 90u, 97u, 122u, 33u, 45u, 46u,
9454 58u, 64u, 95u, 303u, 559u, 36u, 37u, 39u,
9455 44u, 48u, 57u, 65u, 90u, 97u, 122u, 33u,
9456 95u, 303u, 559u, 36u, 37u, 39u, 46u, 48u,
9457 57u, 65u, 90u, 97u, 122u, 33u, 64u, 95u,
9458 303u, 559u, 36u, 37u, 39u, 46u, 48u, 57u,
9459 65u, 90u, 97u, 122u, 33u, 45u, 46u, 58u,
9460 64u, 95u, 303u, 559u, 36u, 37u, 39u, 44u,
9461 48u, 57u, 65u, 90u, 97u, 122u, 33u, 45u,
9462 46u, 58u, 64u, 95u, 303u, 559u, 36u, 37u,
9463 39u, 44u, 48u, 57u, 65u, 90u, 97u, 122u,
9464 33u, 45u, 46u, 58u, 64u, 95u, 303u, 559u,
9465 36u, 37u, 39u, 44u, 48u, 57u, 65u, 90u,
9466 97u, 122u, 33u, 45u, 46u, 53u, 58u, 64u,
9467 95u, 303u, 559u, 36u, 37u, 39u, 44u, 48u,
9468 52u, 54u, 57u, 65u, 90u, 97u, 122u, 33u,
9469 45u, 46u, 58u, 64u, 95u, 303u, 559u, 36u,
9470 37u, 39u, 44u, 48u, 53u, 54u, 57u, 65u,
9471 90u, 97u, 122u, 0
9472 };
9473  
9474 static const char _ragel_url_email_single_lengths[] = {
9475 0, 5, 4, 2, 3, 3, 2, 1,
9476 2, 0, 2, 5, 14, 3, 2, 3,
9477 2, 3, 2, 2, 3, 2, 2, 2,
9478 3, 2, 2, 2, 3, 2, 6, 5,
9479 6, 4, 6, 7, 6, 7, 6, 7,
9480 6, 6, 7, 6, 6, 6, 7, 6,
9481 6, 6, 7, 6, 6, 6, 6, 3,
9482 1, 5, 5, 2, 5, 14, 5, 5,
9483 5, 6, 5, 8, 4, 5, 8, 8,
9484 8, 9, 8
9485 };
9486  
9487 static const char _ragel_url_email_range_lengths[] = {
9488 0, 5, 5, 5, 5, 3, 3, 3,
9489 3, 3, 3, 6, 7, 3, 3, 3,
9490 3, 3, 3, 3, 4, 4, 3, 3,
9491 4, 4, 3, 3, 4, 4, 5, 5,
9492 5, 5, 5, 5, 5, 5, 5, 5,
9493 5, 5, 6, 6, 5, 5, 6, 6,
9494 5, 5, 6, 6, 5, 5, 5, 4,
9495 0, 5, 3, 1, 6, 7, 3, 3,
9496 3, 4, 4, 5, 5, 5, 5, 5,
9497 5, 6, 6
9498 };
9499  
9500 static const short _ragel_url_email_index_offsets[] = {
9501 0, 0, 11, 21, 29, 38, 45, 51,
9502 56, 62, 66, 72, 84, 106, 113, 119,
9503 126, 132, 139, 145, 151, 159, 166, 172,
9504 178, 186, 193, 199, 205, 213, 220, 232,
9505 243, 255, 265, 277, 290, 302, 315, 327,
9506 340, 352, 364, 378, 391, 403, 415, 429,
9507 442, 454, 466, 480, 493, 505, 517, 529,
9508 537, 539, 550, 559, 563, 575, 597, 606,
9509 615, 624, 635, 645, 659, 669, 680, 694,
9510 708, 722, 738
9511 };
9512  
9513 static const char _ragel_url_email_indicies[] = {
9514 0, 2, 3, 4, 0, 0, 0, 5,
9515 6, 6, 1, 0, 7, 8, 0, 0,
9516 0, 0, 0, 0, 1, 9, 9, 9,
9517 9, 9, 9, 9, 1, 9, 8, 9,
9518 9, 9, 9, 9, 9, 1, 10, 11,
9519 12, 13, 14, 14, 1, 15, 16, 14,
9520 14, 14, 1, 15, 14, 14, 14, 1,
9521 15, 17, 14, 14, 14, 1, 14, 18,
9522 18, 1, 15, 17, 14, 19, 19, 1,
9523 20, 21, 21, 20, 20, 20, 21, 20,
9524 20, 21, 21, 1, 22, 22, 24, 22,
9525 22, 23, 22, 23, 23, 23, 23, 23,
9526 25, 26, 23, 23, 22, 23, 23, 23,
9527 23, 1, 27, 28, 29, 30, 18, 18,
9528 1, 15, 31, 14, 14, 14, 1, 32,
9529 33, 34, 35, 18, 18, 1, 15, 36,
9530 14, 14, 14, 1, 37, 38, 39, 40,
9531 18, 18, 1, 15, 36, 35, 14, 14,
9532 1, 15, 36, 32, 14, 14, 1, 15,
9533 36, 41, 35, 32, 14, 14, 1, 15,
9534 36, 32, 14, 14, 14, 1, 15, 31,
9535 30, 14, 14, 1, 15, 31, 27, 14,
9536 14, 1, 15, 31, 42, 30, 27, 14,
9537 14, 1, 15, 31, 27, 14, 14, 14,
9538 1, 15, 16, 13, 14, 14, 1, 15,
9539 16, 10, 14, 14, 1, 15, 16, 43,
9540 13, 10, 14, 14, 1, 15, 16, 10,
9541 14, 14, 14, 1, 0, 44, 45, 7,
9542 8, 0, 0, 0, 46, 46, 46, 1,
9543 0, 44, 7, 8, 0, 0, 0, 46,
9544 46, 46, 1, 0, 44, 47, 7, 8,
9545 0, 0, 0, 46, 46, 46, 1, 0,
9546 7, 8, 0, 0, 0, 46, 48, 48,
9547 1, 0, 44, 47, 7, 8, 0, 0,
9548 0, 46, 49, 49, 1, 0, 50, 51,
9549 52, 7, 8, 0, 0, 0, 53, 48,
9550 48, 1, 0, 44, 54, 7, 8, 0,
9551 0, 0, 46, 46, 46, 1, 0, 55,
9552 56, 57, 7, 8, 0, 0, 0, 58,
9553 48, 48, 1, 0, 44, 59, 7, 8,
9554 0, 0, 0, 46, 46, 46, 1, 0,
9555 60, 61, 62, 7, 8, 0, 0, 0,
9556 63, 48, 48, 1, 0, 44, 59, 7,
9557 8, 0, 0, 0, 58, 46, 46, 1,
9558 0, 44, 59, 7, 8, 0, 0, 0,
9559 55, 46, 46, 1, 0, 44, 59, 64,
9560 7, 8, 0, 0, 0, 58, 55, 46,
9561 46, 1, 0, 44, 59, 7, 8, 0,
9562 0, 0, 55, 46, 46, 46, 1, 0,
9563 44, 54, 7, 8, 0, 0, 0, 53,
9564 46, 46, 1, 0, 44, 54, 7, 8,
9565 0, 0, 0, 50, 46, 46, 1, 0,
9566 44, 54, 65, 7, 8, 0, 0, 0,
9567 53, 50, 46, 46, 1, 0, 44, 54,
9568 7, 8, 0, 0, 0, 50, 46, 46,
9569 46, 1, 0, 44, 45, 7, 8, 0,
9570 0, 0, 5, 46, 46, 1, 0, 44,
9571 45, 7, 8, 0, 0, 0, 2, 46,
9572 46, 1, 0, 44, 45, 66, 7, 8,
9573 0, 0, 0, 5, 2, 46, 46, 1,
9574 0, 44, 45, 7, 8, 0, 0, 0,
9575 2, 46, 46, 46, 1, 0, 44, 47,
9576 7, 8, 0, 0, 0, 46, 67, 67,
9577 1, 0, 44, 47, 7, 8, 0, 0,
9578 0, 46, 68, 68, 1, 0, 44, 47,
9579 69, 8, 0, 0, 0, 46, 68, 68,
9580 1, 9, 70, 9, 9, 9, 9, 9,
9581 1, 71, 1, 0, 2, 3, 4, 0,
9582 0, 0, 5, 46, 46, 1, 15, 17,
9583 72, 21, 23, 14, 19, 19, 1, 21,
9584 23, 72, 1, 20, 21, 21, 20, 20,
9585 20, 21, 20, 20, 21, 21, 1, 22,
9586 22, 24, 22, 22, 23, 22, 23, 23,
9587 23, 23, 23, 25, 26, 23, 23, 22,
9588 23, 23, 23, 23, 1, 15, 17, 72,
9589 21, 23, 14, 14, 14, 1, 15, 17,
9590 72, 21, 23, 40, 14, 14, 1, 15,
9591 17, 72, 21, 23, 37, 14, 14, 1,
9592 15, 17, 73, 72, 21, 23, 40, 37,
9593 14, 14, 1, 15, 17, 72, 21, 23,
9594 37, 14, 14, 14, 1, 0, 44, 47,
9595 74, 8, 0, 21, 23, 0, 0, 46,
9596 49, 49, 1, 9, 9, 21, 23, 9,
9597 9, 75, 9, 9, 1, 9, 8, 9,
9598 21, 23, 9, 9, 75, 9, 9, 1,
9599 0, 44, 47, 74, 8, 0, 21, 23,
9600 0, 0, 46, 46, 46, 1, 0, 44,
9601 47, 74, 8, 0, 21, 23, 0, 0,
9602 63, 46, 46, 1, 0, 44, 47, 74,
9603 8, 0, 21, 23, 0, 0, 60, 46,
9604 46, 1, 0, 44, 47, 76, 74, 8,
9605 0, 21, 23, 0, 0, 63, 60, 46,
9606 46, 1, 0, 44, 47, 74, 8, 0,
9607 21, 23, 0, 0, 60, 46, 46, 46,
9608 1, 0
9609 };
9610  
9611 static const char _ragel_url_email_trans_targs[] = {
9612 2, 0, 30, 48, 50, 49, 52, 3,
9613 5, 4, 6, 26, 28, 27, 8, 7,
9614 13, 9, 10, 58, 11, 60, 12, 61,
9615 61, 12, 61, 14, 22, 24, 23, 15,
9616 16, 18, 20, 19, 17, 62, 63, 65,
9617 64, 21, 25, 29, 31, 35, 32, 33,
9618 34, 67, 36, 44, 46, 45, 37, 38,
9619 40, 42, 41, 39, 70, 71, 73, 72,
9620 43, 47, 51, 53, 54, 55, 56, 57,
9621 59, 66, 68, 69, 74
9622 };
9623  
9624 static const char _ragel_url_email_trans_actions[] = {
9625 0, 0, 0, 0, 0, 0, 0, 0,
9626 0, 0, 0, 0, 0, 0, 0, 0,
9627 0, 0, 0, 1, 0, 1, 0, 1,
9628 2, 3, 4, 0, 0, 0, 0, 0,
9629 0, 0, 0, 0, 0, 1, 1, 1,
9630 1, 0, 0, 0, 0, 0, 0, 0,
9631 0, 1, 0, 0, 0, 0, 0, 0,
9632 0, 0, 0, 0, 1, 1, 1, 1,
9633 0, 0, 0, 0, 0, 0, 0, 0,
9634 1, 1, 1, 1, 1
9635 };
9636  
9637 static const int ragel_url_email_start = 1;
9638  
9639 vector<uint8_t> ragel_tokenizer::ragel_map;
9640 atomic_flag ragel_tokenizer::ragel_map_flag = ATOMIC_FLAG_INIT;
9641  
9642 3 ragel_tokenizer::ragel_tokenizer(unsigned url_email_tokenizer) : unicode_tokenizer(url_email_tokenizer) {
9643 3 ▶ initialize_ragel_map();
Branch: 1 branch
BranchTrueFalseTotal
initialize_ragel_map(); 3 0 3
9644 3 }
9645  
9646 6 void ragel_tokenizer::initialize_ragel_map() {
9647 12 ▶ while (ragel_map_flag.test_and_set()) {}
Branch: 1 branch
BranchTrueFalseTotal
while (ragel_map_flag.test_and_set()) {} 0 6 6
9648 6 ▶ if (ragel_map.empty()) {
Branch: 1 branch
BranchTrueFalseTotal
if (ragel_map.empty()) { 2 4 6
9649 258 ▶ for (uint8_t ascii = 0; ascii < 128; ascii++)
Branch: 1 branch
BranchTrueFalseTotal
for (uint8_t ascii = 0; ascii < 128; ascii++) 256 2 258
9650 256 ▶ ragel_map.push_back(ascii);
Branch: 1 branch
BranchTrueFalseTotal
ragel_map.push_back(ascii); 256 0 256
9651  
9652 2 ragel_map_add(U'\u2026', 160); // horizontal ellipsis (TRIPLE DOT)
9653 2 ragel_map_add(U'\u2019', 161); // right single quotation mark
9654 2 ragel_map_add(U'\u2018', 162); // left single quotation mark
9655 2 ragel_map_add(U'\u2010', 163); // hyphen
9656 }
9657 ragel_map_flag.clear();
9658 6 }
9659  
9660 8 void ragel_tokenizer::ragel_map_add(char32_t chr, uint8_t mapping) {
9661 8 ▶ if (chr >= ragel_map.size())
Branch: 1 branch
BranchTrueFalseTotal
if (chr >= ragel_map.size()) 2 6 8
9662 2 ▶ ragel_map.resize(chr + 1, 128);
Branch: 1 branch
BranchTrueFalseTotal
ragel_map.resize(chr + 1, 128); 2 0 2
9663 8 ragel_map[chr] = mapping;
9664 8 }
9665  
9666 48 bool ragel_tokenizer::ragel_url_email(unsigned version, const vector<char_info>& chars, size_t& current, vector<token_range>& tokens) {
9667 int cs;
9668  
9669 48 size_t start = current, end = current, parens = 0;
9670
9671 {
9672 48 cs = ragel_url_email_start;
9673 }
9674  
9675 {
9676 int _klen;
9677 const short *_keys;
9678 int _trans;
9679 short _widec;
9680  
9681 48 ▶ if ( ( current) == ( (chars.size() - 1)) )
Branch: 1 branch
BranchTrueFalseTotal
if ( ( current) == ( (chars.size() - 1)) ) 0 48 48
9682 0 goto _test_eof;
9683 48 ▶ if ( cs == 0 )
Branch: 1 branch
BranchTrueFalseTotal
if ( cs == 0 ) 48 0 48
9684 0 goto _out;
9685 48 _resume:
9686 138 _widec = ( ragel_char(chars[current]));
9687 138 _klen = _ragel_url_email_cond_lengths[cs];
9688 138 _keys = _ragel_url_email_cond_keys + (_ragel_url_email_cond_offsets[cs]*2);
9689 138 ▶ if ( _klen > 0 ) {
Branch: 1 branch
BranchTrueFalseTotal
if ( _klen > 0 ) { 0 138 138
9690 0 const short *_lower = _keys;
9691 const short *_mid;
9692 0 const short *_upper = _keys + (_klen<<1) - 2;
9693 while (1) {
9694 0 ▶ if ( _upper < _lower )
Branch: 1 branch
BranchTrueFalseTotal
if ( _upper < _lower ) 0 0 0
9695 0 break;
9696  
9697 0 _mid = _lower + (((_upper-_lower) >> 1) & ~1);
9698 0 ▶ if ( _widec < _mid[0] )
Branch: 1 branch
BranchTrueFalseTotal
if ( _widec < _mid[0] ) 0 0 0
9699 0 _upper = _mid - 2;
9700 0 ▶ else if ( _widec > _mid[1] )
Branch: 1 branch
BranchTrueFalseTotal
else if ( _widec > _mid[1] ) 0 0 0
9701 0 _lower = _mid + 2;
9702 else {
9703 0 switch ( _ragel_url_email_cond_spaces[_ragel_url_email_cond_offsets[cs] + ((_mid - _keys)>>1)] ) {
9704 0 case 0: {
9705 0 _widec = (short)(256u + (( ragel_char(chars[current])) - 0u));
9706 0 ▶ if (
Branch: 1 branch
BranchTrueFalseTotal
if ( 0 0 0
9707 0 version >= 2 ) _widec += 256;
9708 0 break;
9709 }
9710 0 case 1: {
9711 0 _widec = (short)(768u + (( ragel_char(chars[current])) - 0u));
9712 0 ▶ if (
Branch: 1 branch
BranchTrueFalseTotal
if ( 0 0 0
9713 0 parens ) _widec += 256;
9714 0 break;
9715 }
9716 }
9717 0 break;
9718 }
9719 }
9720 }
9721  
9722 138 _keys = _ragel_url_email_trans_keys + _ragel_url_email_key_offsets[cs];
9723 138 _trans = _ragel_url_email_index_offsets[cs];
9724  
9725 138 _klen = _ragel_url_email_single_lengths[cs];
9726 138 ▶ if ( _klen > 0 ) {
Branch: 1 branch
BranchTrueFalseTotal
if ( _klen > 0 ) { 138 0 138
9727 138 const short *_lower = _keys;
9728 const short *_mid;
9729 138 const short *_upper = _keys + _klen - 1;
9730 while (1) {
9731 482 ▶ if ( _upper < _lower )
Branch: 1 branch
BranchTrueFalseTotal
if ( _upper < _lower ) 127 355 482
9732 127 break;
9733  
9734 355 _mid = _lower + ((_upper-_lower) >> 1);
9735 355 ▶ if ( _widec < *_mid )
Branch: 1 branch
BranchTrueFalseTotal
if ( _widec < *_mid ) 133 222 355
9736 133 _upper = _mid - 1;
9737 222 ▶ else if ( _widec > *_mid )
Branch: 1 branch
BranchTrueFalseTotal
else if ( _widec > *_mid ) 211 11 222
9738 211 _lower = _mid + 1;
9739 else {
9740 11 _trans += (unsigned int)(_mid - _keys);
9741 11 goto _match;
9742 }
9743 }
9744 127 _keys += _klen;
9745 127 _trans += _klen;
9746 }
9747  
9748 127 _klen = _ragel_url_email_range_lengths[cs];
9749 127 ▶ if ( _klen > 0 ) {
Branch: 1 branch
BranchTrueFalseTotal
if ( _klen > 0 ) { 0 127 127
9750 127 const short *_lower = _keys;
9751 const short *_mid;
9752 127 const short *_upper = _keys + (_klen<<1) - 2;
9753 while (1) {
9754 342 ▶ if ( _upper < _lower )
Branch: 1 branch
BranchTrueFalseTotal
if ( _upper < _lower ) 44 298 342
9755 44 break;
9756  
9757 298 _mid = _lower + (((_upper-_lower) >> 1) & ~1);
9758 298 ▶ if ( _widec < _mid[0] )
Branch: 1 branch
BranchTrueFalseTotal
if ( _widec < _mid[0] ) 81 217 298
9759 81 _upper = _mid - 2;
9760 217 ▶ else if ( _widec > _mid[1] )
Branch: 1 branch
BranchTrueFalseTotal
else if ( _widec > _mid[1] ) 134 83 217
9761 134 _lower = _mid + 2;
9762 else {
9763 83 _trans += (unsigned int)((_mid - _keys)>>1);
9764 83 goto _match;
9765 }
9766 }
9767 44 _trans += _klen;
9768 }
9769  
9770 0 _match:
9771 138 _trans = _ragel_url_email_indicies[_trans];
9772 138 cs = _ragel_url_email_trans_targs[_trans];
9773  
9774 138 ▶ if ( _ragel_url_email_trans_actions[_trans] == 0 )
Branch: 1 branch
BranchTrueFalseTotal
if ( _ragel_url_email_trans_actions[_trans] == 0 ) 138 0 138
9775 138 goto _again;
9776  
9777 0 switch ( _ragel_url_email_trans_actions[_trans] ) {
9778 0 case 3:
9779 0 {parens-=!!parens;}
9780 0 break;
9781 0 case 1:
9782 0 { end = current + 1; }
9783 0 break;
9784 0 case 2:
9785 0 {parens++;}
9786 0 { end = current + 1; }
9787 0 break;
9788 0 case 4:
9789 0 {parens-=!!parens;}
9790 0 { end = current + 1; }
9791 0 break;
9792 }
9793  
9794 138 _again:
9795 138 ▶ if ( cs == 0 )
Branch: 1 branch
BranchTrueFalseTotal
if ( cs == 0 ) 44 94 138
9796 44 goto _out;
9797 94 ▶ if ( ++( current) != ( (chars.size() - 1)) )
Branch: 1 branch
BranchTrueFalseTotal
if ( ++( current) != ( (chars.size() - 1)) ) 90 4 94
9798 90 goto _resume;
9799 4 _test_eof: {}
9800 48 _out: {}
9801 }
9802  
9803 48 ▶ if (end > start) {
Branch: 1 branch
BranchTrueFalseTotal
if (end > start) { 0 48 48
9804 0 ▶ tokens.emplace_back(start, end - start);
Branch: 1 branch
BranchTrueFalseTotal
tokens.emplace_back(start, end - start); 0 0 0
9805 0 current = end;
9806 0 return true;
9807 } else {
9808 48 current = start;
9809 48 return false;
9810 }
9811 }
9812  
9813 /////////
9814 // File: tokenizer/vertical_tokenizer.h
9815 /////////
9816  
9817 // This file is part of MorphoDiTa <http://github.com/ufal/morphodita/>.
9818 //
9819 // Copyright 2015 Institute of Formal and Applied Linguistics, Faculty of
9820 // Mathematics and Physics, Charles University in Prague, Czech Republic.
9821 //
9822 // This Source Code Form is subject to the terms of the Mozilla Public
9823 // License, v. 2.0. If a copy of the MPL was not distributed with this
9824 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
9825  
9826 class vertical_tokenizer : public unicode_tokenizer {
9827 public:
9828 0 vertical_tokenizer() : unicode_tokenizer(0) {}
9829  
9830 virtual bool next_sentence(vector<token_range>& tokens) override;
9831 };
9832  
9833 /////////
9834 // File: tokenizer/tokenizer.cpp
9835 /////////
9836  
9837 // This file is part of MorphoDiTa <http://github.com/ufal/morphodita/>.
9838 //
9839 // Copyright 2015 Institute of Formal and Applied Linguistics, Faculty of
9840 // Mathematics and Physics, Charles University in Prague, Czech Republic.
9841 //
9842 // This Source Code Form is subject to the terms of the Mozilla Public
9843 // License, v. 2.0. If a copy of the MPL was not distributed with this
9844 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
9845  
9846 0 tokenizer* tokenizer::new_vertical_tokenizer() {
9847 0 ▶ return new vertical_tokenizer();
Branch: 2 branches
BranchTrueFalseTotal
return new vertical_tokenizer(); 0 0 0
return new vertical_tokenizer(); 0 0 0
9848 }
9849  
9850 1 tokenizer* tokenizer::new_czech_tokenizer() {
9851 1 ▶ return new czech_tokenizer(czech_tokenizer::CZECH, czech_tokenizer::LATEST);
Branch: 2 branches
BranchTrueFalseTotal
return new czech_tokenizer(czech_tokenizer::CZECH, czech_tokenizer::LATEST); 1 0 1
return new czech_tokenizer(czech_tokenizer::CZECH, czech_tokenizer::LATEST); 0 0 0
9852 }
9853  
9854 0 tokenizer* tokenizer::new_english_tokenizer() {
9855 0 ▶ return new english_tokenizer(english_tokenizer::LATEST);
Branch: 2 branches
BranchTrueFalseTotal
return new english_tokenizer(english_tokenizer::LATEST); 0 0 0
return new english_tokenizer(english_tokenizer::LATEST); 0 0 0
9856 }
9857  
9858 0 tokenizer* tokenizer::new_generic_tokenizer() {
9859 0 ▶ return new generic_tokenizer(generic_tokenizer::LATEST);
Branch: 2 branches
BranchTrueFalseTotal
return new generic_tokenizer(generic_tokenizer::LATEST); 0 0 0
return new generic_tokenizer(generic_tokenizer::LATEST); 0 0 0
9860 }
9861  
9862 /////////
9863 // File: tokenizer/unicode_tokenizer.cpp
9864 /////////
9865  
9866 // This file is part of MorphoDiTa <http://github.com/ufal/morphodita/>.
9867 //
9868 // Copyright 2015 Institute of Formal and Applied Linguistics, Faculty of
9869 // Mathematics and Physics, Charles University in Prague, Czech Republic.
9870 //
9871 // This Source Code Form is subject to the terms of the Mozilla Public
9872 // License, v. 2.0. If a copy of the MPL was not distributed with this
9873 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
9874  
9875 3 unicode_tokenizer::unicode_tokenizer(unsigned url_email_tokenizer) : url_email_tokenizer(url_email_tokenizer) {
9876 3 ▶ ragel_tokenizer::initialize_ragel_map();
Branch: 1 branch
BranchTrueFalseTotal
ragel_tokenizer::initialize_ragel_map(); 3 0 3
9877  
9878 3 ▶ set_text(string_piece(nullptr, 0));
Branch: 1 branch
BranchTrueFalseTotal
set_text(string_piece(nullptr, 0)); 3 0 3
9879 3 }
9880  
9881 6 void unicode_tokenizer::set_text(string_piece text, bool make_copy /*= false*/) {
9882 using namespace unilib;
9883  
9884 6 ▶ if (make_copy && text.str) {
Branch: 2 branches
BranchTrueFalseTotal
if (make_copy && text.str) { 3 3 6
if (make_copy && text.str) { 3 0 3
9885 3 text_buffer.assign(text.str, text.len);
9886 3 text.str = text_buffer.c_str();
9887 }
9888 6 current = 0;
9889  
9890 6 chars.clear();
9891 136 ▶ for (const char* curr_str = text.str; text.len; curr_str = text.str)
Branch: 1 branch
BranchTrueFalseTotal
for (const char* curr_str = text.str; text.len; curr_str = text.str) 130 6 136
9892 130 ▶ chars.emplace_back(utf8::decode(text.str, text.len), curr_str);
Branch: 1 branch
BranchTrueFalseTotal
chars.emplace_back(utf8::decode(text.str, text.len), curr_str); 130 0 130
9893 6 ▶ chars.emplace_back(0, text.str);
Branch: 1 branch
BranchTrueFalseTotal
chars.emplace_back(0, text.str); 6 0 6
9894 6 }
9895  
9896 7 bool unicode_tokenizer::next_sentence(vector<string_piece>* forms, vector<token_range>* tokens_ptr) {
9897 7 ▶ vector<token_range>& tokens = tokens_ptr ? *tokens_ptr : tokens_buffer;
Branch: 1 branch
BranchTrueFalseTotal
vector<token_range>& tokens = tokens_ptr ? *tokens_ptr : tokens_buffer; 7 0 7
9898 7 tokens.clear();
9899 7 ▶ if (forms) forms->clear();
Branch: 1 branch
BranchTrueFalseTotal
if (forms) forms->clear(); 7 0 7
9900 7 ▶ if (current >= chars.size() - 1) return false;
Branch: 1 branch
BranchTrueFalseTotal
if (current >= chars.size() - 1) return false; 3 4 7
9901  
9902 4 bool result = next_sentence(tokens);
9903 4 ▶ if (forms)
Branch: 1 branch
BranchTrueFalseTotal
if (forms) 4 0 4
9904 36 ▶ for (auto&& token : tokens)
Branch: 1 branch
BranchTrueFalseTotal
for (auto&& token : tokens) 32 4 36
9905 32 ▶ forms->emplace_back(chars[token.start].str, chars[token.start + token.length].str - chars[token.start].str);
Branch: 1 branch
BranchTrueFalseTotal
forms->emplace_back(chars[token.start].str, chars[token.start + token.length].str - chars[token.start].str); 32 0 32
9906  
9907 4 return result;
9908 }
9909  
9910 51 bool unicode_tokenizer::tokenize_url_email(vector<token_range>& tokens) {
9911 51 ▶ if (current >= chars.size() - 1) return false;
Branch: 1 branch
BranchTrueFalseTotal
if (current >= chars.size() - 1) return false; 3 48 51
9912  
9913 48 ▶ return url_email_tokenizer ? ragel_tokenizer::ragel_url_email(url_email_tokenizer, chars, current, tokens) : false;
Branch: 2 branches
BranchTrueFalseTotal
return url_email_tokenizer ? ragel_tokenizer::ragel_url_email(url_email_tokenizer, chars, current, tokens) : false; 48 0 48
return url_email_tokenizer ? ragel_tokenizer::ragel_url_email(url_email_tokenizer, chars, current, tokens) : false; 0 48 48
9914 }
9915  
9916 47 bool unicode_tokenizer::emergency_sentence_split(const vector<token_range>& tokens) {
9917 using namespace unilib;
9918  
9919 // Implement emergency splitting for large sentences
9920 94 ▶ return tokens.size() >= 500 ||
Branch: 1 branch
BranchTrueFalseTotal
return tokens.size() >= 500 || 0 47 47
9921 94 ▶ (tokens.size() >= 450 && chars[tokens.back().start].cat & unicode::P) ||
Branch: 1 branch
BranchTrueFalseTotal
(tokens.size() >= 450 && chars[tokens.back().start].cat & unicode::P) || 47 0 47
9922 94 ▶ (tokens.size() >= 400 && chars[tokens.back().start].cat & unicode::Po);
Branch: 1 branch
BranchTrueFalseTotal
(tokens.size() >= 400 && chars[tokens.back().start].cat & unicode::Po); 0 0 0
9923 }
9924  
9925 4 bool unicode_tokenizer::is_eos(const vector<token_range>& tokens, char32_t eos_chr, const unordered_set<string>* abbreviations) {
9926 using namespace unilib;
9927  
9928 4 ▶ if (eos_chr == '.' && !tokens.empty()) {
Branch: 3 branches
BranchTrueFalseTotal
if (eos_chr == '.' && !tokens.empty()) { 4 0 4
if (eos_chr == '.' && !tokens.empty()) { 4 0 4
if (eos_chr == '.' && !tokens.empty()) { 4 0 4
9929 // Ignore one-letter capitals before dot
9930 4 ▶ if (tokens.back().length == 1 && chars[tokens.back().start].cat & unicode::Lut)
Branch: 3 branches
BranchTrueFalseTotal
if (tokens.back().length == 1 && chars[tokens.back().start].cat & unicode::Lut) 2 2 4
if (tokens.back().length == 1 && chars[tokens.back().start].cat & unicode::Lut) 2 0 2
if (tokens.back().length == 1 && chars[tokens.back().start].cat & unicode::Lut) 2 2 4
9931 2 return false;
9932  
9933 // Ignore specified abbreviations
9934 2 ▶ if (abbreviations) {
Branch: 1 branch
BranchTrueFalseTotal
if (abbreviations) { 2 0 2
9935 2 eos_buffer.clear();
9936 13 ▶ for (size_t i = 0; i < tokens.back().length; i++)
Branch: 1 branch
BranchTrueFalseTotal
for (size_t i = 0; i < tokens.back().length; i++) 11 2 13
9937 11 utf8::append(eos_buffer, unicode::lowercase(chars[tokens.back().start + i].chr));
9938 2 ▶ if (abbreviations->count(eos_buffer))
Branch: 1 branch
BranchTrueFalseTotal
if (abbreviations->count(eos_buffer)) 1 1 2
9939 1 return false;
9940 }
9941 }
9942 1 return true;
9943 }
9944  
9945 /////////
9946 // File: tokenizer/vertical_tokenizer.cpp
9947 /////////
9948  
9949 // This file is part of MorphoDiTa <http://github.com/ufal/morphodita/>.
9950 //
9951 // Copyright 2015 Institute of Formal and Applied Linguistics, Faculty of
9952 // Mathematics and Physics, Charles University in Prague, Czech Republic.
9953 //
9954 // This Source Code Form is subject to the terms of the Mozilla Public
9955 // License, v. 2.0. If a copy of the MPL was not distributed with this
9956 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
9957  
9958 0 bool vertical_tokenizer::next_sentence(vector<token_range>& tokens) {
9959 0 ▶ if (current >= chars.size() - 1) return false;
Branch: 1 branch
BranchTrueFalseTotal
if (current >= chars.size() - 1) return false; 0 0 0
9960  
9961 while (true) {
9962 0 size_t line_start = current;
9963 0 ▶ while (current < chars.size() - 1 && chars[current].chr != '\r' && chars[current].chr != '\n') current++;
Branch: 4 branches
BranchTrueFalseTotal
while (current < chars.size() - 1 && chars[current].chr != '\r' && chars[current].chr != '\n') current++; 0 0 0
while (current < chars.size() - 1 && chars[current].chr != '\r' && chars[current].chr != '\n') current++; 0 0 0
while (current < chars.size() - 1 && chars[current].chr != '\r' && chars[current].chr != '\n') current++; 0 0 0
while (current < chars.size() - 1 && chars[current].chr != '\r' && chars[current].chr != '\n') current++; 0 0 0
9964  
9965 0 size_t line_end = current;
9966 0 ▶ if (current < chars.size() - 1) {
Branch: 1 branch
BranchTrueFalseTotal
if (current < chars.size() - 1) { 0 0 0
9967 0 current++;
9968 0 ▶ if (current < chars.size() - 1 &&
Branch: 2 branches
BranchTrueFalseTotal
if (current < chars.size() - 1 && 0 0 0
if (current < chars.size() - 1 && 0 0 0
9969 0 ▶ ((chars[current-1].chr == '\r' && chars[current].chr == '\n') ||
Branch: 2 branches
BranchTrueFalseTotal
((chars[current-1].chr == '\r' && chars[current].chr == '\n') || 0 0 0
((chars[current-1].chr == '\r' && chars[current].chr == '\n') || 0 0 0
9970 0 ▶ (chars[current-1].chr == '\n' && chars[current].chr == '\r')))
Branch: 2 branches
BranchTrueFalseTotal
(chars[current-1].chr == '\n' && chars[current].chr == '\r'))) 0 0 0
(chars[current-1].chr == '\n' && chars[current].chr == '\r'))) 0 0 0
9971 0 current++;
9972 }
9973  
9974 0 ▶ if (line_start < line_end)
Branch: 1 branch
BranchTrueFalseTotal
if (line_start < line_end) 0 0 0
9975 0 ▶ tokens.emplace_back(line_start, line_end - line_start);
Branch: 1 branch
BranchTrueFalseTotal
tokens.emplace_back(line_start, line_end - line_start); 0 0 0
9976 else
9977 0 break;
9978 0 }
9979  
9980 0 return true;
9981 }
9982  
9983 /////////
9984 // File: unilib/unicode.cpp
9985 /////////
9986  
9987 // This file is part of UniLib <http://github.com/ufal/unilib/>.
9988 //
9989 // Copyright 2014 Institute of Formal and Applied Linguistics, Faculty of
9990 // Mathematics and Physics, Charles University in Prague, Czech Republic.
9991 //
9992 // This Source Code Form is subject to the terms of the Mozilla Public
9993 // License, v. 2.0. If a copy of the MPL was not distributed with this
9994 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
9995 //
9996 // UniLib version: 3.3.1
9997 // Unicode version: 15.0.0
9998  
9999 namespace unilib {
10000  
10001 const char32_t unicode::CHARS;
10002  
10003 const int32_t unicode::DEFAULT_CAT;
10004  
10005 const uint8_t unicode::category_index[unicode::CHARS >> 8] = {
10006 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,17,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,33,41,42,43,44,45,46,47,48,39,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,49,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,50,17,17,17,51,17,52,53,54,55,56,57,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,58,59,59,59,59,59,59,59,59,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,17,61,62,17,63,64,65,66,67,68,69,70,71,17,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,17,17,17,97,98,99,100,100,100,100,100,100,100,100,100,101,17,17,17,17,102,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,17,17,103,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,17,17,104,105,100,100,106,107,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,108,17,17,17,17,109,110,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,111,17,112,113,100,100,100,100,100,100,100,100,100,114,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,115,116,117,118,119,120,121,122,123,39,39,124,100,100,100,100,125,126,127,128,100,129,100,100,130,131,132,100,100,133,134,135,100,136,137,138,139,39,39,140,141,142,39,143,144,100,100,100,100,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,
10007 17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,145,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,146,147,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,148,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,149,100,100,100,100,100,100,100,100,100,100,100,100,17,17,150,100,100,100,100,100,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,151,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,152,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,
10008 100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,
10009 100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,
10010 100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,
10011 100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,
10012 100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,153,154,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,
10013 100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,155,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,
10014 60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,155
10015 };
10016  
10017 const uint8_t unicode::category_block[][256] = {
10018 {_Cc,_Cc,_Cc,_Cc,_Cc,_Cc,_Cc,_Cc,_Cc,_Cc,_Cc,_Cc,_Cc,_Cc,_Cc,_Cc,_Cc,_Cc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Sm,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_Sm,_Sm,_Sm,_Sm,_Sm,_Sm,_Sm,_Sm,_Sm,_Sm,_Sm,_Sm,_Sm,_Sm,_Sm,_Sm,_Sm,_Sm,_Sm,_Sm,_Sm,_Sm,_Sm,_Sm,_Sm,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_Sm,_Sm,_Sm,_Sm,_Sm,_Sm,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So},
10053 {_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_Cn,_Cn,_Cn,_Cn,_Cn,_Cn,_Cn,_Cn,_Cn,_Cn,_Cn,_Cn,_Cn,_Cn,_Cn,_Cn,_Cn,_Cn,_Cn,_Cn,_Cn,_Cn,_Cn,_Cn,_Cn,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_Cn,_Cn,_Cn,_Cn,_Cn,_Cn,_Cn,_Cn,_Cn,_Cn,_Cn,_Cn,_Cn,_Cn,_Cn,_Cn,_Cn,_Cn,_Cn,_Cn,_Cn,_No,_No,_No,_No,_No,_No,_No,_No,_No,_No,_No,_No,_No,_No,_No,_No,_No,_No,_No,_No,_No,_No,_No,_No,_No,_No,_No,_No,_No,_No,_No,_No,_No,_No,_No,_No,_No,_No,_No,_No,_No,_No,_No,_No,_No,_No,_No,_No,_No,_No,_No,_No,_No,_No,_No,_No,_No,_No,_No,_No,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_No,_No,_No,_No,_No,_No,_No,_No,_No,_No,_No,_No,_No,_No,_No,_No,_No,_No,_No,_No,_No,_No},
10054 {_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_Sm,_So,_So,_So,_So,_So,_So,_So,_So,_So,_Sm,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_Sm,_Sm,_Sm,_Sm,_Sm,_Sm,_Sm,_Sm},
10055 {_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_Sm,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So},
10056 {_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_Ps,_Pe,_Ps,_Pe,_Ps,_Pe,_Ps,_Pe,_Ps,_Pe,_Ps,_Pe,_Ps,_Pe,_No,_No,_No,_No,_No,_No,_No,_No,_No,_No,_No,_No,_No,_No,_No,_No,_No,_No,_No,_No,_No,_No,_No,_No,_No,_No,_No,_No,_No,_No,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_Sm,_Sm,_Sm,_Sm,_Sm,_Ps,_Pe,_Sm,_Sm,_Sm,_Sm,_Sm,_Sm,_Sm,_Sm,_Sm,_Sm,_Sm,_Sm,_Sm,_Sm,_Sm,_Sm,_Sm,_Sm,_Sm,_Sm,_Sm,_Sm,_Sm,_Sm,_Sm,_Sm,_Sm,_Sm,_Sm,_Sm,_Sm,_Ps,_Pe,_Ps,_Pe,_Ps,_Pe,_Ps,_Pe,_Ps,_Pe,_Sm,_Sm,_Sm,_Sm,_Sm,_Sm,_Sm,_Sm,_Sm,_Sm,_Sm,_Sm,_Sm,_Sm,_Sm,_Sm},
10057 {_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,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,_Cn,_Cn,_Cn},
10063 {_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_Cn,_Cn,_Cn,_Cn,_Cn,_Cn,_Cn,_Cn,_Cn,_Cn,_Cn,_Cn,_Cn,_Cn,_Cn,_Cn,_Cn,_Cn,_Cn,_Cn,_Cn,_Cn,_Cn,_Cn,_Cn,_Cn,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_Cn,_Cn,_Cn,_Cn},
10064 {_Zs,_Po,_Po,_Po,_So,_Lm,_Lo,_Nl,_Ps,_Pe,_Ps,_Pe,_Ps,_Pe,_Ps,_Pe,_Ps,_Pe,_So,_So,_Ps,_Pe,_Ps,_Pe,_Ps,_Pe,_Ps,_Pe,_Pd,_Ps,_Pe,_Pe,_So,_Nl,_Nl,_Nl,_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,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_Cn,_Cn,_Cn,_Cn,_Cn,_Cn,_Cn,_Cn,_Cn,_Cn,_Cn,_Cn,_Lo,_Lo,_Lo,_Lo,_Lo,_Lo,_Lo,_Lo,_Lo,_Lo,_Lo,_Lo,_Lo,_Lo,_Lo,_Lo},
10066 {_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_Cn,_No,_No,_No,_No,_No,_No,_No,_No,_No,_No,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_No,_No,_No,_No,_No,_No,_No,_No,_So,_No,_No,_No,_No,_No,_No,_No,_No,_No,_No,_No,_No,_No,_No,_No,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_No,_No,_No,_No,_No,_No,_No,_No,_No,_No,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_No,_No,_No,_No,_No,_No,_No,_No,_No,_No,_No,_No,_No,_No,_No,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So},
10067 {_Lo,_Lo,_Lo,_Lo,_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_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_Cn,_Cn,_Cn,_Cn,_Cn,_Cn,_Cn,_Cn,_Cn,_Cn},
10135 {_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_Cn,_Cn,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So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So,_So,_So,_So,_So,_Cn,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_Cn,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_Cn,_Cn,_Cn,_Cn,_Cn,_Cn,_Cn,_Cn,_Cn,_Cn},
10155 {_No,_No,_No,_No,_No,_No,_No,_No,_No,_No,_No,_No,_No,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_Cn,_Cn,_Cn,_Cn,_Cn,_Cn,_Cn,_Cn,_Cn,_Cn,_Cn,_Cn,_Cn,_Cn,_Cn,_Cn,_Cn,_Cn,_Cn,_Cn,_Cn,_Cn,_Cn,_Cn,_Cn,_Cn,_Cn,_Cn,_Cn,_Cn,_Cn,_Cn,_Cn,_Cn,_Cn,_Cn,_Cn,_Cn,_Cn,_Cn,_Cn,_Cn,_Cn,_Cn,_Cn,_Cn,_Cn,_Cn,_Cn,_Cn,_Cn,_Cn,_Cn,_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Cn,_Cn,_Cn,_Cn,_Cn,_Cn,_Cn,_Cn,_Cn,_Cn,_Cn,_Cn,_Cn,_Cn,_Cn,_Cn,_Cn,_Cn,_Cn,_Cn,_Cn,_Cn,_Cn,_Cn,_Cn,_Cn,_Cn,_Cn,_Cn,_Cn,_Cn,_Cn,_Cn,_Cn,_Cn,_Cn,_Cn,_Cn,_Cn,_Cn,_Cn,_Cn,_Cn,_Cn,_Cn},
10157 {_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_Sk,_Sk,_Sk,_Sk,_Sk},
10158 {_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_Cn,_Cn,_Cn,_Cn,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_Cn,_Cn,_Cn,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_Cn,_Cn,_Cn},
10159 {_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_Cn,_Cn,_Cn,_Cn,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_Cn,_Cn,_Cn,_Cn,_Cn,_Cn,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_Cn,_Cn,_Cn,_Cn,_So,_Cn,_Cn,_Cn,_Cn,_Cn,_Cn,_Cn,_Cn,_Cn,_Cn,_Cn,_Cn,_Cn,_Cn,_Cn},
10160 {_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_Cn,_Cn,_Cn,_Cn,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_Cn,_Cn,_Cn,_Cn,_Cn,_Cn,_Cn,_Cn,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_Cn,_Cn,_Cn,_Cn,_Cn,_Cn,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_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_Cn,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_Cn,_So,_So,_So,_So,_So,_So,_So,_Cn,_Cn,_Cn,_Cn,_Cn,_Cn,_Cn,_Cn,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_Cn,_Cn,_Cn,_Cn,_So,_So,_So,_So,_So,_So,_So,_So,_So,_Cn,_Cn,_Cn,_Cn,_Cn,_Cn,_Cn,_So,_So,_So,_So,_So,_So,_So,_So,_So,_Cn,_Cn,_Cn,_Cn,_Cn,_Cn,_Cn},
10162 {_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_Cn,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_So,_Cn,_Cn,_C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,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6
10182 };
10183  
10184 const char32_t unicode::othercase_block[][256] = {
10185 {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24833,25089,25345,25601,25857,26113,26369,26625,26881,27137,27393,27649,27905,28161,28417,28673,28929,29185,29441,29697,29953,30209,30465,30721,30977,31233,0,0,0,0,0,0,16642,16898,17154,17410,17666,17922,18178,18434,18690,18946,19202,19458,19714,19970,20226,20482,20738,20994,21250,21506,21762,22018,22274,22530,22786,23042,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,236546,0,0,0,0,0,0,0,0,0,0,57345,57601,57857,58113,58369,58625,58881,59137,59393,59649,59905,60161,60417,60673,60929,61185,61441,61697,61953,62209,62465,62721,62977,0,63489,63745,64001,64257,64513,64769,65025,0,49154,49410,49666,49922,50178,50434,50690,50946,51202,51458,51714,51970,52226,52482,52738,52994,53250,53506,53762,54018,54274,54530,54786,0,55298,55554,55810,56066,56322,56578,56834,96258},
10186 {65793,65538,66305,66050,66817,66562,67329,67074,67841,67586,68353,68098,68865,68610,69377,69122,69889,69634,70401,70146,70913,70658,71425,71170,71937,71682,72449,72194,72961,72706,73473,73218,73985,73730,74497,74242,75009,74754,75521,75266,76033,75778,76545,76290,77057,76802,77569,77314,26881,18690,78593,78338,79105,78850,79617,79362,0,80385,80130,80897,80642,81409,81154,81921,81666,82433,82178,82945,82690,83457,83202,83969,83714,0,84737,84482,85249,84994,85761,85506,86273,86018,86785,86530,87297,87042,87809,87554,88321,88066,88833,88578,89345,89090,89857,89602,90369,90114,90881,90626,91393,91138,91905,91650,92417,92162,92929,92674,93441,93186,93953,93698,94465,94210,94977,94722,95489,95234,96001,95746,65281,96769,96514,97281,97026,97793,97538,21250,148226,152321,99073,98818,99585,99330,152577,100353,100098,153089,153345,101377,101122,0,122113,153857,154369,102913,102658,155649,156417,128514,157953,157697,104705,104450,146690,0,159489,160257,139266,161025,106753,106498,107265,107010,107777,107522,163841,108545,108290,164609,0,0,109825,109570,165889,110593,110338,166401,166657,111617,111362,112129,111874,168449,112897,112642,0,0,113921,113666,0,128770,0,0,0,0,115974,116228,115717,116742,116996,116485,117510,117764,117253,118273,118018,118785,118530,119297,119042,119809,119554,120321,120066,120833,120578,121345,121090,121857,121602,101890,122625,122370,123137,122882,123649,123394,124161,123906,124673,124418,125185,124930,125697,125442,126209,125954,126721,126466,0,127494,127748,127237,128257,128002,103681,114433,129281,129026,129793,129538,130305,130050,130817,130562},
10187 {131329,131074,131841,131586,132353,132098,132865,132610,133377,133122,133889,133634,134401,134146,134913,134658,135425,135170,135937,135682,136449,136194,136961,136706,137473,137218,137985,137730,138497,138242,139009,138754,105985,0,140033,139778,140545,140290,141057,140802,141569,141314,142081,141826,142593,142338,143105,142850,143617,143362,144129,143874,0,0,0,0,0,0,2909441,146433,146178,104961,2909697,2915842,2916098,147969,147714,98305,166145,166913,149249,148994,149761,149506,150273,150018,150785,150530,151297,151042,2912002,2911490,2912258,98562,99842,0,100610,100866,0,102146,0,102402,10988290,0,0,0,103170,10988546,0,103426,0,10980610,10988034,0,104194,103938,10989058,2908674,10988802,0,0,105474,0,2911746,105730,0,0,106242,0,0,0,0,0,0,0,2909186,0,0,108034,0,10994946,108802,0,0,0,10989826,110082,148482,110850,111106,148738,0,0,0,0,0,112386,0,0,0,0,0,0,0,0,0,0,10990082,10989570,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
10188 {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,235778,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,225537,225282,226049,225794,0,0,227073,226818,0,0,0,261378,261634,261890,0,258817,0,0,0,0,0,0,240641,0,240897,241153,241409,0,248833,0,249089,249345,0,241921,242177,242433,242689,242945,243201,243457,243713,243969,244225,244481,244737,244993,245249,245505,245761,246017,0,246529,246785,247041,247297,247553,247809,248065,248321,248577,230914,231426,231682,231938,0,233730,233986,234242,234498,234754,235010,235266,235522,235778,236034,236290,236546,236802,237058,237314,237570,237826,238338,238338,238594,238850,239106,239362,239618,239874,240130,240386,232450,232962,233218,251649,233986,235522,0,0,0,239106,237570,249602,252161,251906,252673,252418,253185,252930,253697,253442,254209,253954,254721,254466,255233,254978,255745,255490,256257,256002,256769,256514,257281,257026,257793,257538,236034,237826,260354,229122,243713,234754,0,260097,259842,258561,260865,260610,0,228097,228353,228609},
10189 {282625,282881,283137,283393,283649,283905,284161,284417,284673,284929,285185,285441,285697,285953,286209,286465,274433,274689,274945,275201,275457,275713,275969,276225,276481,276737,276993,277249,277505,277761,278017,278273,278529,278785,279041,279297,279553,279809,280065,280321,280577,280833,281089,281345,281601,281857,282113,282369,266242,266498,266754,267010,267266,267522,267778,268034,268290,268546,268802,269058,269314,269570,269826,270082,270338,270594,270850,271106,271362,271618,271874,272130,272386,272642,272898,273154,273410,273666,273922,274178,262146,262402,262658,262914,263170,263426,263682,263938,264194,264450,264706,264962,265218,265474,265730,265986,286977,286722,287489,287234,288001,287746,288513,288258,289025,288770,289537,289282,290049,289794,290561,290306,291073,290818,291585,291330,292097,291842,292609,292354,293121,292866,293633,293378,294145,293890,294657,294402,295169,294914,0,0,0,0,0,0,0,0,297729,297474,298241,297986,298753,298498,299265,299010,299777,299522,300289,300034,300801,300546,301313,301058,301825,301570,302337,302082,302849,302594,303361,303106,303873,303618,304385,304130,304897,304642,305409,305154,305921,305666,306433,306178,306945,306690,307457,307202,307969,307714,308481,308226,308993,308738,309505,309250,310017,309762,310529,310274,311041,310786,315137,311809,311554,312321,312066,312833,312578,313345,313090,313857,313602,314369,314114,314881,314626,311298,315649,315394,316161,315906,316673,316418,317185,316930,317697,317442,318209,317954,318721,318466,319233,318978,319745,319490,320257,320002,320769,320514,321281,321026,321793,321538,322305,322050,322817,322562,323329,323074,323841,323586,324353,324098,324865,324610,325377,325122,325889,325634,326401,326146,326913,326658,327425,327170},
10190 {327937,327682,328449,328194,328961,328706,329473,329218,329985,329730,330497,330242,331009,330754,331521,331266,332033,331778,332545,332290,333057,332802,333569,333314,334081,333826,334593,334338,335105,334850,335617,335362,336129,335874,336641,336386,337153,336898,337665,337410,338177,337922,338689,338434,339201,338946,339713,339458,0,352513,352769,353025,353281,353537,353793,354049,354305,354561,354817,355073,355329,355585,355841,356097,356353,356609,356865,357121,357377,357633,357889,358145,358401,358657,358913,359169,359425,359681,359937,360193,360449,360705,360961,361217,361473,361729,361985,0,0,0,0,0,0,0,0,0,0,340226,340482,340738,340994,341250,341506,341762,342018,342274,342530,342786,343042,343298,343554,343810,344066,344322,344578,344834,345090,345346,345602,345858,346114,346370,346626,346882,347138,347394,347650,347906,348162,348418,348674,348930,349186,349442,349698,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
10191 {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
10192 {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2949121,2949377,2949633,2949889,2950145,2950401,2950657,2950913,2951169,2951425,2951681,2951937,2952193,2952449,2952705,2952961,2953217,2953473,2953729,2953985,2954241,2954497,2954753,2955009,2955265,2955521,2955777,2956033,2956289,2956545,2956801,2957057,2957313,2957569,2957825,2958081,2958337,2958593,0,2959105,0,0,0,0,0,2960641,0,0,1871875,1872131,1872387,1872643,1872899,1873155,1873411,1873667,1873923,1874179,1874435,1874691,1874947,1875203,1875459,1875715,1875971,1876227,1876483,1876739,1876995,1877251,1877507,1877763,1878019,1878275,1878531,1878787,1879043,1879299,1879555,1879811,1880067,1880323,1880579,1880835,1881091,1881347,1881603,1881859,1882115,1882371,1882627,0,0,1883395,1883651,1883907},
10193 {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11235329,11235585,11235841,11236097,11236353,11236609,11236865,11237121,11237377,11237633,11237889,11238145,11238401,11238657,11238913,11239169,11239425,11239681,11239937,11240193,11240449,11240705,11240961,11241217,11241473,11241729,11241985,11242241,11242497,11242753,11243009,11243265,11243521,11243777,11244033,11244289,11244545,11244801,11245057,11245313,11245569,11245825,11246081,11246337,11246593,11246849,11247105,11247361,11247617,11247873,11248129,11248385,11248641,11248897,11249153,11249409,11249665,11249921,11250177,11250433,11250689,11250945,11251201,11251457,11251713,11251969,11252225,11252481,11252737,11252993,11253249,11253505,11253761,11254017,11254273,11254529,11254785,11255041,11255297,11255553,1308673,1308929,1309185,1309441,1309697,1309953,0,0,1306626,1306882,1307138,1307394,1307650,1307906,0,0},
10194 {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,266754,267266,269826,270594,270850,270850,272898,287234,10897922,0,0,0,0,0,0,0,1101825,1102081,1102337,1102593,1102849,1103105,1103361,1103617,1103873,1104129,1104385,1104641,1104897,1105153,1105409,1105665,1105921,1106177,1106433,1106689,1106945,1107201,1107457,1107713,1107969,1108225,1108481,1108737,1108993,1109249,1109505,1109761,1110017,1110273,1110529,1110785,1111041,1111297,1111553,1111809,1112065,1112321,1112577,0,0,1113345,1113601,1113857,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
10195 {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,10976514,0,0,0,2908930,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,10995202,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
10196 {1966337,1966082,1966849,1966594,1967361,1967106,1967873,1967618,1968385,1968130,1968897,1968642,1969409,1969154,1969921,1969666,1970433,1970178,1970945,1970690,1971457,1971202,1971969,1971714,1972481,1972226,1972993,1972738,1973505,1973250,1974017,1973762,1974529,1974274,1975041,1974786,1975553,1975298,1976065,1975810,1976577,1976322,1977089,1976834,1977601,1977346,1978113,1977858,1978625,1978370,1979137,1978882,1979649,1979394,1980161,1979906,1980673,1980418,1981185,1980930,1981697,1981442,1982209,1981954,1982721,1982466,1983233,1982978,1983745,1983490,1984257,1984002,1984769,1984514,1985281,1985026,1985793,1985538,1986305,1986050,1986817,1986562,1987329,1987074,1987841,1987586,1988353,1988098,1988865,1988610,1989377,1989122,1989889,1989634,1990401,1990146,1990913,1990658,1991425,1991170,1991937,1991682,1992449,1992194,1992961,1992706,1993473,1993218,1993985,1993730,1994497,1994242,1995009,1994754,1995521,1995266,1996033,1995778,1996545,1996290,1997057,1996802,1997569,1997314,1998081,1997826,1998593,1998338,1999105,1998850,1999617,1999362,2000129,1999874,2000641,2000386,2001153,2000898,2001665,2001410,2002177,2001922,2002689,2002434,2003201,2002946,2003713,2003458,2004225,2003970,0,0,0,0,0,1990658,0,0,57089,0,2007297,2007042,2007809,2007554,2008321,2008066,2008833,2008578,2009345,2009090,2009857,2009602,2010369,2010114,2010881,2010626,2011393,2011138,2011905,2011650,2012417,2012162,2012929,2012674,2013441,2013186,2013953,2013698,2014465,2014210,2014977,2014722,2015489,2015234,2016001,2015746,2016513,2016258,2017025,2016770,2017537,2017282,2018049,2017794,2018561,2018306,2019073,2018818,2019585,2019330,2020097,2019842,2020609,2020354,2021121,2020866,2021633,2021378,2022145,2021890,2022657,2022402,2023169,2022914,2023681,2023426,2024193,2023938,2024705,2024450,2025217,2024962,2025729,2025474,2026241,2025986,2026753,2026498,2027265,2027010,2027777,2027522,2028289,2028034,2028801,2028546,2029313,2029058,2029825,2029570,2030337,2030082,2030849,2030594,2031361,
10197 2031106},
10198 {2033666,2033922,2034178,2034434,2034690,2034946,2035202,2035458,2031617,2031873,2032129,2032385,2032641,2032897,2033153,2033409,2037762,2038018,2038274,2038530,2038786,2039042,0,0,2035713,2035969,2036225,2036481,2036737,2036993,0,0,2041858,2042114,2042370,2042626,2042882,2043138,2043394,2043650,2039809,2040065,2040321,2040577,2040833,2041089,2041345,2041601,2045954,2046210,2046466,2046722,2046978,2047234,2047490,2047746,2043905,2044161,2044417,2044673,2044929,2045185,2045441,2045697,2050050,2050306,2050562,2050818,2051074,2051330,0,0,2048001,2048257,2048513,2048769,2049025,2049281,0,0,0,2054402,0,2054914,0,2055426,0,2055938,0,2052353,0,2052865,0,2053377,0,2053889,2058242,2058498,2058754,2059010,2059266,2059522,2059778,2060034,2056193,2056449,2056705,2056961,2057217,2057473,2057729,2057985,2079234,2079490,2082818,2083074,2083330,2083586,2087426,2087682,2095106,2095362,2091522,2091778,2095618,2095874,0,0,2066434,2066690,2066946,2067202,2067458,2067714,2067970,2068226,2064385,2064641,2064897,2065153,2065409,2065665,2065921,2066177,2070530,2070786,2071042,2071298,2071554,2071810,2072066,2072322,2068481,2068737,2068993,2069249,2069505,2069761,2070017,2070273,2074626,2074882,2075138,2075394,2075650,2075906,2076162,2076418,2072577,2072833,2073089,2073345,2073601,2073857,2074113,2074369,2078722,2078978,0,2079746,0,0,0,0,2076673,2076929,2060289,2060545,2077441,0,235778,0,0,0,0,2083842,0,0,0,0,2060801,2061057,2061313,2061569,2081537,0,0,0,2086914,2087170,0,0,0,0,0,0,2084865,2085121,2061825,2062081,0,0,0,0,2091010,2091266,0,0,0,2092034,0,0,2088961,2089217,2062849,2063105,2090241,0,0,0,0,0,0,2096130,0,0,0,0,2062337,2062593,2063361,2063617,2093825,0,0,0},
10199 {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,248065,0,0,0,27393,58625,0,0,0,0,0,0,2182657,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2175490,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2191361,2191617,2191873,2192129,2192385,2192641,2192897,2193153,2193409,2193665,2193921,2194177,2194433,2194689,2194945,2195201,2187266,2187522,2187778,2188034,2188290,2188546,2188802,2189058,2189314,2189570,2189826,2190082,2190338,2190594,2190850,2191106,0,0,0,2196481,2196226,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
10200 {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2412545,2412801,2413057,2413313,2413569,2413825,2414081,2414337,2414593,2414849,2415105,2415361,2415617,2415873,2416129,2416385,2416641,2416897,2417153,2417409,2417665,2417921,2418177,2418433,2418689,2418945,2405890,2406146,2406402,2406658,2406914,2407170,2407426,2407682,2407938,2408194,2408450,2408706,2408962,2409218,2409474,2409730,2409986,2410242,2410498,2410754,2411010,2411266,2411522,2411778,2412034,2412290,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
10201 {2895873,2896129,2896385,2896641,2896897,2897153,2897409,2897665,2897921,2898177,2898433,2898689,2898945,2899201,2899457,2899713,2899969,2900225,2900481,2900737,2900993,2901249,2901505,2901761,2902017,2902273,2902529,2902785,2903041,2903297,2903553,2903809,2904065,2904321,2904577,2904833,2905089,2905345,2905601,2905857,2906113,2906369,2906625,2906881,2907137,2907393,2907649,2907905,2883586,2883842,2884098,2884354,2884610,2884866,2885122,2885378,2885634,2885890,2886146,2886402,2886658,2886914,2887170,2887426,2887682,2887938,2888194,2888450,2888706,2888962,2889218,2889474,2889730,2889986,2890242,2890498,2890754,2891010,2891266,2891522,2891778,2892034,2892290,2892546,2892802,2893058,2893314,2893570,2893826,2894082,2894338,2894594,2894850,2895106,2895362,2895618,2908417,2908162,158465,1932545,163073,145922,146946,2910209,2909954,2910721,2910466,2911233,2910978,151809,160001,151553,152065,0,2913025,2912770,0,2913793,2913538,0,0,0,0,0,0,0,147201,147457,2916609,2916354,2917121,2916866,2917633,2917378,2918145,2917890,2918657,2918402,2919169,2918914,2919681,2919426,2920193,2919938,2920705,2920450,2921217,2920962,2921729,2921474,2922241,2921986,2922753,2922498,2923265,2923010,2923777,2923522,2924289,2924034,2924801,2924546,2925313,2925058,2925825,2925570,2926337,2926082,2926849,2926594,2927361,2927106,2927873,2927618,2928385,2928130,2928897,2928642,2929409,2929154,2929921,2929666,2930433,2930178,2930945,2930690,2931457,2931202,2931969,2931714,2932481,2932226,2932993,2932738,2933505,2933250,2934017,2933762,2934529,2934274,2935041,2934786,2935553,2935298,2936065,2935810,2936577,2936322,2937089,2936834,2937601,2937346,2938113,2937858,2938625,2938370,2939137,2938882,2939649,2939394,2940161,2939906,2940673,2940418,2941185,2940930,2941697,2941442,0,0,0,0,0,0,0,2944001,2943746,2944513,2944258,0,0,0,2945793,2945538,0,0,0,0,0,0,0,0,0,0,0,0},
10202 {1089538,1089794,1090050,1090306,1090562,1090818,1091074,1091330,1091586,1091842,1092098,1092354,1092610,1092866,1093122,1093378,1093634,1093890,1094146,1094402,1094658,1094914,1095170,1095426,1095682,1095938,1096194,1096450,1096706,1096962,1097218,1097474,1097730,1097986,1098242,1098498,1098754,1099010,0,1099522,0,0,0,0,0,1101058,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
10203 {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,10895617,10895362,10896129,10895874,10896641,10896386,10897153,10896898,10897665,10897410,10898177,10897922,10898689,10898434,10899201,10898946,10899713,10899458,10900225,10899970,10900737,10900482,10901249,10900994,10901761,10901506,10902273,10902018,10902785,10902530,10903297,10903042,10903809,10903554,10904321,10904066,10904833,10904578,10905345,10905090,10905857,10905602,10906369,10906114,10906881,10906626,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,10912001,10911746,10912513,10912258,10913025,10912770,10913537,10913282,10914049,10913794,10914561,10914306,10915073,10914818,10915585,10915330,10916097,10915842,10916609,10916354,10917121,10916866,10917633,10917378,10918145,10917890,10918657,10918402,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
10204 {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,10953473,10953218,10953985,10953730,10954497,10954242,10955009,10954754,10955521,10955266,10956033,10955778,10956545,10956290,0,0,10957569,10957314,10958081,10957826,10958593,10958338,10959105,10958850,10959617,10959362,10960129,10959874,10960641,10960386,10961153,10960898,10961665,10961410,10962177,10961922,10962689,10962434,10963201,10962946,10963713,10963458,10964225,10963970,10964737,10964482,10965249,10964994,10965761,10965506,10966273,10966018,10966785,10966530,10967297,10967042,10967809,10967554,10968321,10968066,10968833,10968578,10969345,10969090,10969857,10969602,10970369,10970114,10970881,10970626,10971393,10971138,10971905,10971650,10972417,10972162,10972929,10972674,0,0,0,0,0,0,0,0,0,10975745,10975490,10976257,10976002,1931521,10977025,10976770,10977537,10977282,10978049,10977794,10978561,10978306,10979073,10978818,0,0,0,10980353,10980098,156929,0,0,10981633,10981378,10982145,10981890,10994690,0,10983169,10982914,10983681,10983426,10984193,10983938,10984705,10984450,10985217,10984962,10985729,10985474,10986241,10985986,10986753,10986498,10987265,10987010,10987777,10987522,157185,154625,155905,158721,158209,0,171521,165633,171265,11227905,10990849,10990594,10991361,10991106,10991873,10991618,10992385,10992130,10992897,10992642,10993409,10993154,10993921,10993666,10994433,10994178,10982401,164353,1936897,10995713,10995458,10996225,10995970,0,0,0,0,0,10998017,10997762,0,0,0,0,10999553,10999298,11000065,10999810,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11007489,11007234,0,0,0,0,0,0,0,0,0},
10205 {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,10990338,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1286146,1286402,1286658,1286914,1287170,1287426,1287682,1287938,1288194,1288450,1288706,1288962,1289218,1289474,1289730,1289986,1290242,1290498,1290754,1291010,1291266,1291522,1291778,1292034,1292290,1292546,1292802,1293058,1293314,1293570,1293826,1294082,1294338,1294594,1294850,1295106,1295362,1295618,1295874,1296130,1296386,1296642,1296898,1297154,1297410,1297666,1297922,1298178,1298434,1298690,1298946,1299202,1299458,1299714,1299970,1300226,1300482,1300738,1300994,1301250,1301506,1301762,1302018,1302274,1302530,1302786,1303042,1303298,1303554,1303810,1304066,1304322,1304578,1304834,1305090,1305346,1305602,1305858,1306114,1306370,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
10206 {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16728321,16728577,16728833,16729089,16729345,16729601,16729857,16730113,16730369,16730625,16730881,16731137,16731393,16731649,16731905,16732161,16732417,16732673,16732929,16733185,16733441,16733697,16733953,16734209,16734465,16734721,0,0,0,0,0,0,16720130,16720386,16720642,16720898,16721154,16721410,16721666,16721922,16722178,16722434,16722690,16722946,16723202,16723458,16723714,16723970,16724226,16724482,16724738,16724994,16725250,16725506,16725762,16726018,16726274,16726530,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
10207 {17049601,17049857,17050113,17050369,17050625,17050881,17051137,17051393,17051649,17051905,17052161,17052417,17052673,17052929,17053185,17053441,17053697,17053953,17054209,17054465,17054721,17054977,17055233,17055489,17055745,17056001,17056257,17056513,17056769,17057025,17057281,17057537,17057793,17058049,17058305,17058561,17058817,17059073,17059329,17059585,17039362,17039618,17039874,17040130,17040386,17040642,17040898,17041154,17041410,17041666,17041922,17042178,17042434,17042690,17042946,17043202,17043458,17043714,17043970,17044226,17044482,17044738,17044994,17045250,17045506,17045762,17046018,17046274,17046530,17046786,17047042,17047298,17047554,17047810,17048066,17048322,17048578,17048834,17049090,17049346,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,17094657,17094913,17095169,17095425,17095681,17095937,17096193,17096449,17096705,17096961,17097217,17097473,17097729,17097985,17098241,17098497,17098753,17099009,17099265,17099521,17099777,17100033,17100289,17100545,17100801,17101057,17101313,17101569,17101825,17102081,17102337,17102593,17102849,17103105,17103361,17103617,0,0,0,0,17084418,17084674,17084930,17085186,17085442,17085698,17085954,17086210,17086466,17086722,17086978,17087234,17087490,17087746,17088002,17088258,17088514,17088770,17089026,17089282,17089538,17089794,17090050,17090306,17090562,17090818,17091074,17091330,17091586,17091842,17092098,17092354,17092610,17092866,17093122,17093378,0,0,0,0},
10208 {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,17143553,17143809,17144065,17144321,17144577,17144833,17145089,17145345,17145601,17145857,17146113,0,17146625,17146881,17147137,17147393,17147649,17147905,17148161,17148417,17148673,17148929,17149185,17149441,17149697,17149953,17150209,0,17150721,17150977,17151233,17151489,17151745,17152001,17152257,0,17152769,17153025,0,17133570,17133826,17134082,17134338,17134594,17134850,17135106,17135362,17135618,17135874,17136130,0,17136642,17136898,17137154,17137410,17137666,17137922,17138178,17138434,17138690,17138946,17139202,17139458,17139714,17139970,17140226,0,17140738,17140994,17141250,17141506,17141762,17142018,17142274,0,17142786,17143042,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
10209 {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,17612801,17613057,17613313,17613569,17613825,17614081,17614337,17614593,17614849,17615105,17615361,17615617,17615873,17616129,17616385,17616641,17616897,17617153,17617409,17617665,17617921,17618177,17618433,17618689,17618945,17619201,17619457,17619713,17619969,17620225,17620481,17620737,17620993,17621249,17621505,17621761,17622017,17622273,17622529,17622785,17623041,17623297,17623553,17623809,17624065,17624321,17624577,17624833,17625089,17625345,17625601,0,0,0,0,0,0,0,0,0,0,0,0,0,17596418,17596674,17596930,17597186,17597442,17597698,17597954,17598210,17598466,17598722,17598978,17599234,17599490,17599746,17600002,17600258,17600514,17600770,17601026,17601282,17601538,17601794,17602050,17602306,17602562,17602818,17603074,17603330,17603586,17603842,17604098,17604354,17604610,17604866,17605122,17605378,17605634,17605890,17606146,17606402,17606658,17606914,17607170,17607426,17607682,17607938,17608194,17608450,17608706,17608962,17609218,0,0,0,0,0,0,0,0,0,0,0,0,0},
10210 {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,18399233,18399489,18399745,18400001,18400257,18400513,18400769,18401025,18401281,18401537,18401793,18402049,18402305,18402561,18402817,18403073,18403329,18403585,18403841,18404097,18404353,18404609,18404865,18405121,18405377,18405633,18405889,18406145,18406401,18406657,18406913,18407169,18391042,18391298,18391554,18391810,18392066,18392322,18392578,18392834,18393090,18393346,18393602,18393858,18394114,18394370,18394626,18394882,18395138,18395394,18395650,18395906,18396162,18396418,18396674,18396930,18397186,18397442,18397698,18397954,18398210,18398466,18398722,18398978,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
10211 {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24010753,24011009,24011265,24011521,24011777,24012033,24012289,24012545,24012801,24013057,24013313,24013569,24013825,24014081,24014337,24014593,24014849,24015105,24015361,24015617,24015873,24016129,24016385,24016641,24016897,24017153,24017409,24017665,24017921,24018177,24018433,24018689,24002562,24002818,24003074,24003330,24003586,24003842,24004098,24004354,24004610,24004866,24005122,24005378,24005634,24005890,24006146,24006402,24006658,24006914,24007170,24007426,24007682,24007938,24008194,24008450,24008706,24008962,24009218,24009474,24009730,24009986,24010242,24010498,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
10212 {32055809,32056065,32056321,32056577,32056833,32057089,32057345,32057601,32057857,32058113,32058369,32058625,32058881,32059137,32059393,32059649,32059905,32060161,32060417,32060673,32060929,32061185,32061441,32061697,32061953,32062209,32062465,32062721,32062977,32063233,32063489,32063745,32064001,32064257,32047106,32047362,32047618,32047874,32048130,32048386,32048642,32048898,32049154,32049410,32049666,32049922,32050178,32050434,32050690,32050946,32051202,32051458,32051714,32051970,32052226,32052482,32052738,32052994,32053250,32053506,32053762,32054018,32054274,32054530,32054786,32055042,32055298,32055554,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}
10213 };
10214  
10215 } // namespace unilib
10216  
10217 /////////
10218 // File: unilib/utf8.cpp
10219 /////////
10220  
10221 // This file is part of UniLib <http://github.com/ufal/unilib/>.
10222 //
10223 // Copyright 2014 Institute of Formal and Applied Linguistics, Faculty of
10224 // Mathematics and Physics, Charles University in Prague, Czech Republic.
10225 //
10226 // This Source Code Form is subject to the terms of the Mozilla Public
10227 // License, v. 2.0. If a copy of the MPL was not distributed with this
10228 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
10229 //
10230 // UniLib version: 3.3.1
10231 // Unicode version: 15.0.0
10232  
10233 namespace unilib {
10234  
10235 0 bool utf8::valid(const char* str) {
10236 0 ▶ for (; *str; str++)
Branch: 1 branch
BranchTrueFalseTotal
for (; *str; str++) 0 0 0
10237 0 ▶ if (((unsigned char)*str) >= 0x80) {
Branch: 1 branch
BranchTrueFalseTotal
if (((unsigned char)*str) >= 0x80) { 0 0 0
10238 0 ▶ if (((unsigned char)*str) < 0xC0) return false;
Branch: 1 branch
BranchTrueFalseTotal
if (((unsigned char)*str) < 0xC0) return false; 0 0 0
10239 0 ▶ else if (((unsigned char)*str) < 0xE0) {
Branch: 1 branch
BranchTrueFalseTotal
else if (((unsigned char)*str) < 0xE0) { 0 0 0
10240 0 ▶ str++; if (((unsigned char)*str) < 0x80 || ((unsigned char)*str) >= 0xC0) return false;
Branch: 2 branches
BranchTrueFalseTotal
str++; if (((unsigned char)*str) < 0x80 || ((unsigned char)*str) >= 0xC0) return false; 0 0 0
str++; if (((unsigned char)*str) < 0x80 || ((unsigned char)*str) >= 0xC0) return false; 0 0 0
10241 0 ▶ } else if (((unsigned char)*str) < 0xF0) {
Branch: 1 branch
BranchTrueFalseTotal
} else if (((unsigned char)*str) < 0xF0) { 0 0 0
10242 0 ▶ str++; if (((unsigned char)*str) < 0x80 || ((unsigned char)*str) >= 0xC0) return false;
Branch: 2 branches
BranchTrueFalseTotal
str++; if (((unsigned char)*str) < 0x80 || ((unsigned char)*str) >= 0xC0) return false; 0 0 0
str++; if (((unsigned char)*str) < 0x80 || ((unsigned char)*str) >= 0xC0) return false; 0 0 0
10243 0 ▶ str++; if (((unsigned char)*str) < 0x80 || ((unsigned char)*str) >= 0xC0) return false;
Branch: 2 branches
BranchTrueFalseTotal
str++; if (((unsigned char)*str) < 0x80 || ((unsigned char)*str) >= 0xC0) return false; 0 0 0
str++; if (((unsigned char)*str) < 0x80 || ((unsigned char)*str) >= 0xC0) return false; 0 0 0
10244 0 ▶ } else if (((unsigned char)*str) < 0xF8) {
Branch: 1 branch
BranchTrueFalseTotal
} else if (((unsigned char)*str) < 0xF8) { 0 0 0
10245 0 ▶ str++; if (((unsigned char)*str) < 0x80 || ((unsigned char)*str) >= 0xC0) return false;
Branch: 2 branches
BranchTrueFalseTotal
str++; if (((unsigned char)*str) < 0x80 || ((unsigned char)*str) >= 0xC0) return false; 0 0 0
str++; if (((unsigned char)*str) < 0x80 || ((unsigned char)*str) >= 0xC0) return false; 0 0 0
10246 0 ▶ str++; if (((unsigned char)*str) < 0x80 || ((unsigned char)*str) >= 0xC0) return false;
Branch: 2 branches
BranchTrueFalseTotal
str++; if (((unsigned char)*str) < 0x80 || ((unsigned char)*str) >= 0xC0) return false; 0 0 0
str++; if (((unsigned char)*str) < 0x80 || ((unsigned char)*str) >= 0xC0) return false; 0 0 0
10247 0 ▶ str++; if (((unsigned char)*str) < 0x80 || ((unsigned char)*str) >= 0xC0) return false;
Branch: 2 branches
BranchTrueFalseTotal
str++; if (((unsigned char)*str) < 0x80 || ((unsigned char)*str) >= 0xC0) return false; 0 0 0
str++; if (((unsigned char)*str) < 0x80 || ((unsigned char)*str) >= 0xC0) return false; 0 0 0
10248 0 } else return false;
10249 }
10250 0 return true;
10251 }
10252  
10253 0 bool utf8::valid(const char* str, size_t len) {
10254 0 ▶ for (; len > 0; str++, len--)
Branch: 1 branch
BranchTrueFalseTotal
for (; len > 0; str++, len--) 0 0 0
10255 0 ▶ if (((unsigned char)*str) >= 0x80) {
Branch: 1 branch
BranchTrueFalseTotal
if (((unsigned char)*str) >= 0x80) { 0 0 0
10256 0 ▶ if (((unsigned char)*str) < 0xC0) return false;
Branch: 1 branch
BranchTrueFalseTotal
if (((unsigned char)*str) < 0xC0) return false; 0 0 0
10257 0 ▶ else if (((unsigned char)*str) < 0xE0) {
Branch: 1 branch
BranchTrueFalseTotal
else if (((unsigned char)*str) < 0xE0) { 0 0 0
10258 0 ▶ str++; if (!--len || ((unsigned char)*str) < 0x80 || ((unsigned char)*str) >= 0xC0) return false;
Branch: 4 branches
BranchTrueFalseTotal
str++; if (!--len || ((unsigned char)*str) < 0x80 || ((unsigned char)*str) >= 0xC0) return false; 0 0 0
str++; if (!--len || ((unsigned char)*str) < 0x80 || ((unsigned char)*str) >= 0xC0) return false; 0 0 0
str++; if (!--len || ((unsigned char)*str) < 0x80 || ((unsigned char)*str) >= 0xC0) return false; 0 0 0
str++; if (!--len || ((unsigned char)*str) < 0x80 || ((unsigned char)*str) >= 0xC0) return false; 0 0 0
10259 0 ▶ } else if (((unsigned char)*str) < 0xF0) {
Branch: 1 branch
BranchTrueFalseTotal
} else if (((unsigned char)*str) < 0xF0) { 0 0 0
10260 0 ▶ str++; if (!--len || ((unsigned char)*str) < 0x80 || ((unsigned char)*str) >= 0xC0) return false;
Branch: 4 branches
BranchTrueFalseTotal
str++; if (!--len || ((unsigned char)*str) < 0x80 || ((unsigned char)*str) >= 0xC0) return false; 0 0 0
str++; if (!--len || ((unsigned char)*str) < 0x80 || ((unsigned char)*str) >= 0xC0) return false; 0 0 0
str++; if (!--len || ((unsigned char)*str) < 0x80 || ((unsigned char)*str) >= 0xC0) return false; 0 0 0
str++; if (!--len || ((unsigned char)*str) < 0x80 || ((unsigned char)*str) >= 0xC0) return false; 0 0 0
10261 0 ▶ str++; if (!--len || ((unsigned char)*str) < 0x80 || ((unsigned char)*str) >= 0xC0) return false;
Branch: 4 branches
BranchTrueFalseTotal
str++; if (!--len || ((unsigned char)*str) < 0x80 || ((unsigned char)*str) >= 0xC0) return false; 0 0 0
str++; if (!--len || ((unsigned char)*str) < 0x80 || ((unsigned char)*str) >= 0xC0) return false; 0 0 0
str++; if (!--len || ((unsigned char)*str) < 0x80 || ((unsigned char)*str) >= 0xC0) return false; 0 0 0
str++; if (!--len || ((unsigned char)*str) < 0x80 || ((unsigned char)*str) >= 0xC0) return false; 0 0 0
10262 0 ▶ } else if (((unsigned char)*str) < 0xF8) {
Branch: 1 branch
BranchTrueFalseTotal
} else if (((unsigned char)*str) < 0xF8) { 0 0 0
10263 0 ▶ str++; if (!--len || ((unsigned char)*str) < 0x80 || ((unsigned char)*str) >= 0xC0) return false;
Branch: 4 branches
BranchTrueFalseTotal
str++; if (!--len || ((unsigned char)*str) < 0x80 || ((unsigned char)*str) >= 0xC0) return false; 0 0 0
str++; if (!--len || ((unsigned char)*str) < 0x80 || ((unsigned char)*str) >= 0xC0) return false; 0 0 0
str++; if (!--len || ((unsigned char)*str) < 0x80 || ((unsigned char)*str) >= 0xC0) return false; 0 0 0
str++; if (!--len || ((unsigned char)*str) < 0x80 || ((unsigned char)*str) >= 0xC0) return false; 0 0 0
10264 0 ▶ str++; if (!--len || ((unsigned char)*str) < 0x80 || ((unsigned char)*str) >= 0xC0) return false;
Branch: 4 branches
BranchTrueFalseTotal
str++; if (!--len || ((unsigned char)*str) < 0x80 || ((unsigned char)*str) >= 0xC0) return false; 0 0 0
str++; if (!--len || ((unsigned char)*str) < 0x80 || ((unsigned char)*str) >= 0xC0) return false; 0 0 0
str++; if (!--len || ((unsigned char)*str) < 0x80 || ((unsigned char)*str) >= 0xC0) return false; 0 0 0
str++; if (!--len || ((unsigned char)*str) < 0x80 || ((unsigned char)*str) >= 0xC0) return false; 0 0 0
10265 0 ▶ str++; if (!--len || ((unsigned char)*str) < 0x80 || ((unsigned char)*str) >= 0xC0) return false;
Branch: 4 branches
BranchTrueFalseTotal
str++; if (!--len || ((unsigned char)*str) < 0x80 || ((unsigned char)*str) >= 0xC0) return false; 0 0 0
str++; if (!--len || ((unsigned char)*str) < 0x80 || ((unsigned char)*str) >= 0xC0) return false; 0 0 0
str++; if (!--len || ((unsigned char)*str) < 0x80 || ((unsigned char)*str) >= 0xC0) return false; 0 0 0
str++; if (!--len || ((unsigned char)*str) < 0x80 || ((unsigned char)*str) >= 0xC0) return false; 0 0 0
10266 0 } else return false;
10267 }
10268 0 return true;
10269 }
10270  
10271 0 void utf8::decode(const char* str, std::u32string& decoded) {
10272 0 decoded.clear();
10273  
10274 0 ▶ for (char32_t chr; (chr = decode(str)); )
Branch: 1 branch
BranchTrueFalseTotal
for (char32_t chr; (chr = decode(str)); ) 0 0 0
10275 0 decoded.push_back(chr);
10276 0 }
10277  
10278 0 void utf8::decode(const char* str, size_t len, std::u32string& decoded) {
10279 0 decoded.clear();
10280  
10281 0 ▶ while (len)
Branch: 1 branch
BranchTrueFalseTotal
while (len) 0 0 0
10282 0 decoded.push_back(decode(str, len));
10283 0 }
10284  
10285 0 void utf8::encode(const std::u32string& str, std::string& encoded) {
10286 0 encoded.clear();
10287  
10288 0 ▶ for (auto&& chr : str)
Branch: 1 branch
BranchTrueFalseTotal
for (auto&& chr : str) 0 0 0
10289 0 ▶ append(encoded, chr);
Branch: 1 branch
BranchTrueFalseTotal
append(encoded, chr); 0 0 0
10290 0 }
10291  
10292 const char utf8::REPLACEMENT_CHAR;
10293  
10294 } // namespace unilib
10295  
10296 /////////
10297 // File: unilib/version.h
10298 /////////
10299  
10300 // This file is part of UniLib <http://github.com/ufal/unilib/>.
10301 //
10302 // Copyright 2014 Institute of Formal and Applied Linguistics, Faculty of
10303 // Mathematics and Physics, Charles University in Prague, Czech Republic.
10304 //
10305 // This Source Code Form is subject to the terms of the Mozilla Public
10306 // License, v. 2.0. If a copy of the MPL was not distributed with this
10307 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
10308 //
10309 // UniLib version: 3.3.1
10310 // Unicode version: 15.0.0
10311  
10312 namespace unilib {
10313  
10314 struct version {
10315 unsigned major;
10316 unsigned minor;
10317 unsigned patch;
10318 std::string prerelease;
10319  
10320 // Returns current version.
10321 static version current();
10322 };
10323  
10324 } // namespace unilib
10325  
10326 /////////
10327 // File: unilib/version.cpp
10328 /////////
10329  
10330 // This file is part of UniLib <http://github.com/ufal/unilib/>.
10331 //
10332 // Copyright 2014 Institute of Formal and Applied Linguistics, Faculty of
10333 // Mathematics and Physics, Charles University in Prague, Czech Republic.
10334 //
10335 // This Source Code Form is subject to the terms of the Mozilla Public
10336 // License, v. 2.0. If a copy of the MPL was not distributed with this
10337 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
10338 //
10339 // UniLib version: 3.3.1
10340 // Unicode version: 15.0.0
10341  
10342 namespace unilib {
10343  
10344 // Returns current version.
10345 0 version version::current() {
10346 0 return {3, 3, 1, ""};
10347 0 ▶}
Branch: 1 branch
BranchTrueFalseTotal
} 0 0 0
10348  
10349 } // namespace unilib
10350  
10351 /////////
10352 // File: utils/compressor_load.cpp
10353 /////////
10354  
10355 // This file is part of UFAL C++ Utils <http://github.com/ufal/cpp_utils/>.
10356 //
10357 // Copyright 2015 Institute of Formal and Applied Linguistics, Faculty of
10358 // Mathematics and Physics, Charles University in Prague, Czech Republic.
10359 //
10360 // This Source Code Form is subject to the terms of the Mozilla Public
10361 // License, v. 2.0. If a copy of the MPL was not distributed with this
10362 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
10363  
10364 namespace utils {
10365  
10366 // Start of LZMA compression library by Igor Pavlov
10367 namespace lzma {
10368  
10369 // Types.h -- Basic types
10370 // 2010-10-09 : Igor Pavlov : Public domain
10371 #ifndef UFAL_CPPUTILS_COMPRESSOR_LZMA_TYPES_H
10372 #define UFAL_CPPUTILS_COMPRESSOR_LZMA_TYPES_H
10373  
10374 #define SZ_OK 0
10375  
10376 #define SZ_ERROR_DATA 1
10377 #define SZ_ERROR_MEM 2
10378 #define SZ_ERROR_CRC 3
10379 #define SZ_ERROR_UNSUPPORTED 4
10380 #define SZ_ERROR_PARAM 5
10381 #define SZ_ERROR_INPUT_EOF 6
10382 #define SZ_ERROR_OUTPUT_EOF 7
10383 #define SZ_ERROR_READ 8
10384 #define SZ_ERROR_WRITE 9
10385 #define SZ_ERROR_PROGRESS 10
10386 #define SZ_ERROR_FAIL 11
10387 #define SZ_ERROR_THREAD 12
10388  
10389 #define SZ_ERROR_ARCHIVE 16
10390 #define SZ_ERROR_NO_ARCHIVE 17
10391  
10392 typedef int SRes;
10393  
10394 #ifndef RINOK
10395 #define RINOK(x) { int __result__ = (x); if (__result__ != 0) return __result__; }
10396 #endif
10397  
10398 /* The following interfaces use first parameter as pointer to structure */
10399  
10400 struct IByteIn
10401 {
10402 uint8_t (*Read)(void *p); /* reads one byte, returns 0 in case of EOF or error */
10403 };
10404  
10405 struct IByteOut
10406 {
10407 void (*Write)(void *p, uint8_t b);
10408 };
10409  
10410 struct ISeqInStream
10411 {
10412 SRes (*Read)(void *p, void *buf, size_t *size);
10413 /* if (input(*size) != 0 && output(*size) == 0) means end_of_stream.
10414 (output(*size) < input(*size)) is allowed */
10415 };
10416  
10417 /* it can return SZ_ERROR_INPUT_EOF */
10418 SRes SeqInStream_Read(ISeqInStream *stream, void *buf, size_t size);
10419 SRes SeqInStream_Read2(ISeqInStream *stream, void *buf, size_t size, SRes errorType);
10420 SRes SeqInStream_ReadByte(ISeqInStream *stream, uint8_t *buf);
10421  
10422 struct ISeqOutStream
10423 {
10424 size_t (*Write)(void *p, const void *buf, size_t size);
10425 /* Returns: result - the number of actually written bytes.
10426 (result < size) means error */
10427 };
10428  
10429 enum ESzSeek
10430 {
10431 SZ_SEEK_SET = 0,
10432 SZ_SEEK_CUR = 1,
10433 SZ_SEEK_END = 2
10434 };
10435  
10436 struct ISeekInStream
10437 {
10438 SRes (*Read)(void *p, void *buf, size_t *size); /* same as ISeqInStream::Read */
10439 SRes (*Seek)(void *p, int64_t *pos, ESzSeek origin);
10440 };
10441  
10442 struct ILookInStream
10443 {
10444 SRes (*Look)(void *p, const void **buf, size_t *size);
10445 /* if (input(*size) != 0 && output(*size) == 0) means end_of_stream.
10446 (output(*size) > input(*size)) is not allowed
10447 (output(*size) < input(*size)) is allowed */
10448 SRes (*Skip)(void *p, size_t offset);
10449 /* offset must be <= output(*size) of Look */
10450  
10451 SRes (*Read)(void *p, void *buf, size_t *size);
10452 /* reads directly (without buffer). It's same as ISeqInStream::Read */
10453 SRes (*Seek)(void *p, int64_t *pos, ESzSeek origin);
10454 };
10455  
10456 SRes LookInStream_LookRead(ILookInStream *stream, void *buf, size_t *size);
10457 SRes LookInStream_SeekTo(ILookInStream *stream, uint64_t offset);
10458  
10459 /* reads via ILookInStream::Read */
10460 SRes LookInStream_Read2(ILookInStream *stream, void *buf, size_t size, SRes errorType);
10461 SRes LookInStream_Read(ILookInStream *stream, void *buf, size_t size);
10462  
10463 #define LookToRead_BUF_SIZE (1 << 14)
10464  
10465 struct CLookToRead
10466 {
10467 ILookInStream s;
10468 ISeekInStream *realStream;
10469 size_t pos;
10470 size_t size;
10471 uint8_t buf[LookToRead_BUF_SIZE];
10472 };
10473  
10474 void LookToRead_CreateVTable(CLookToRead *p, int lookahead);
10475 void LookToRead_Init(CLookToRead *p);
10476  
10477 struct CSecToLook
10478 {
10479 ISeqInStream s;
10480 ILookInStream *realStream;
10481 };
10482  
10483 void SecToLook_CreateVTable(CSecToLook *p);
10484  
10485 struct CSecToRead
10486 {
10487 ISeqInStream s;
10488 ILookInStream *realStream;
10489 };
10490  
10491 void SecToRead_CreateVTable(CSecToRead *p);
10492  
10493 struct ICompressProgress
10494 {
10495 SRes (*Progress)(void *p, uint64_t inSize, uint64_t outSize);
10496 /* Returns: result. (result != SZ_OK) means break.
10497 Value (uint64_t)(int64_t)-1 for size means unknown value. */
10498 };
10499  
10500 struct ISzAlloc
10501 {
10502 void *(*Alloc)(void *p, size_t size);
10503 void (*Free)(void *p, void *address); /* address can be 0 */
10504 };
10505  
10506 #define IAlloc_Alloc(p, size) (p)->Alloc((p), size)
10507 #define IAlloc_Free(p, a) (p)->Free((p), a)
10508  
10509 #endif // UFAL_CPPUTILS_COMPRESSOR_LZMA_TYPES_H
10510  
10511 // LzmaDec.h -- LZMA Decoder
10512 // 2009-02-07 : Igor Pavlov : Public domain
10513  
10514 /* #define _LZMA_PROB32 */
10515 /* _LZMA_PROB32 can increase the speed on some CPUs,
10516 but memory usage for CLzmaDec::probs will be doubled in that case */
10517  
10518 #ifdef _LZMA_PROB32
10519 #define CLzmaProb uint32_t
10520 #else
10521 #define CLzmaProb uint16_t
10522 #endif
10523  
10524 /* ---------- LZMA Properties ---------- */
10525  
10526 #define LZMA_PROPS_SIZE 5
10527  
10528 struct CLzmaProps
10529 {
10530 unsigned lc, lp, pb;
10531 uint32_t dicSize;
10532 };
10533  
10534 /* LzmaProps_Decode - decodes properties
10535 Returns:
10536 SZ_OK
10537 SZ_ERROR_UNSUPPORTED - Unsupported properties
10538 */
10539  
10540 SRes LzmaProps_Decode(CLzmaProps *p, const uint8_t *data, unsigned size);
10541  
10542 /* ---------- LZMA Decoder state ---------- */
10543  
10544 /* LZMA_REQUIRED_INPUT_MAX = number of required input bytes for worst case.
10545 Num bits = log2((2^11 / 31) ^ 22) + 26 < 134 + 26 = 160; */
10546  
10547 #define LZMA_REQUIRED_INPUT_MAX 20
10548  
10549 struct CLzmaDec
10550 {
10551 CLzmaProps prop;
10552 CLzmaProb *probs;
10553 uint8_t *dic;
10554 const uint8_t *buf;
10555 uint32_t range, code;
10556 size_t dicPos;
10557 size_t dicBufSize;
10558 uint32_t processedPos;
10559 uint32_t checkDicSize;
10560 unsigned state;
10561 uint32_t reps[4];
10562 unsigned remainLen;
10563 int needFlush;
10564 int needInitState;
10565 uint32_t numProbs;
10566 unsigned tempBufSize;
10567 uint8_t tempBuf[LZMA_REQUIRED_INPUT_MAX];
10568 };
10569  
10570 #define LzmaDec_Construct(p) { (p)->dic = 0; (p)->probs = 0; }
10571  
10572 void LzmaDec_Init(CLzmaDec *p);
10573  
10574 /* There are two types of LZMA streams:
10575 0) Stream with end mark. That end mark adds about 6 bytes to compressed size.
10576 1) Stream without end mark. You must know exact uncompressed size to decompress such stream. */
10577  
10578 enum ELzmaFinishMode
10579 {
10580 LZMA_FINISH_ANY, /* finish at any point */
10581 LZMA_FINISH_END /* block must be finished at the end */
10582 };
10583  
10584 /* ELzmaFinishMode has meaning only if the decoding reaches output limit !!!
10585  
10586 You must use LZMA_FINISH_END, when you know that current output buffer
10587 covers last bytes of block. In other cases you must use LZMA_FINISH_ANY.
10588  
10589 If LZMA decoder sees end marker before reaching output limit, it returns SZ_OK,
10590 and output value of destLen will be less than output buffer size limit.
10591 You can check status result also.
10592  
10593 You can use multiple checks to test data integrity after full decompression:
10594 1) Check Result and "status" variable.
10595 2) Check that output(destLen) = uncompressedSize, if you know real uncompressedSize.
10596 3) Check that output(srcLen) = compressedSize, if you know real compressedSize.
10597 You must use correct finish mode in that case. */
10598  
10599 enum ELzmaStatus
10600 {
10601 LZMA_STATUS_NOT_SPECIFIED, /* use main error code instead */
10602 LZMA_STATUS_FINISHED_WITH_MARK, /* stream was finished with end mark. */
10603 LZMA_STATUS_NOT_FINISHED, /* stream was not finished */
10604 LZMA_STATUS_NEEDS_MORE_INPUT, /* you must provide more input bytes */
10605 LZMA_STATUS_MAYBE_FINISHED_WITHOUT_MARK /* there is probability that stream was finished without end mark */
10606 };
10607  
10608 /* ELzmaStatus is used only as output value for function call */
10609  
10610 /* ---------- Interfaces ---------- */
10611  
10612 /* There are 3 levels of interfaces:
10613 1) Dictionary Interface
10614 2) Buffer Interface
10615 3) One Call Interface
10616 You can select any of these interfaces, but don't mix functions from different
10617 groups for same object. */
10618  
10619 /* There are two variants to allocate state for Dictionary Interface:
10620 1) LzmaDec_Allocate / LzmaDec_Free
10621 2) LzmaDec_AllocateProbs / LzmaDec_FreeProbs
10622 You can use variant 2, if you set dictionary buffer manually.
10623 For Buffer Interface you must always use variant 1.
10624  
10625 LzmaDec_Allocate* can return:
10626 SZ_OK
10627 SZ_ERROR_MEM - Memory allocation error
10628 SZ_ERROR_UNSUPPORTED - Unsupported properties
10629 */
10630
10631 SRes LzmaDec_AllocateProbs(CLzmaDec *p, const uint8_t *props, unsigned propsSize, ISzAlloc *alloc);
10632 void LzmaDec_FreeProbs(CLzmaDec *p, ISzAlloc *alloc);
10633  
10634 SRes LzmaDec_Allocate(CLzmaDec *state, const uint8_t *prop, unsigned propsSize, ISzAlloc *alloc);
10635 void LzmaDec_Free(CLzmaDec *state, ISzAlloc *alloc);
10636  
10637 /* ---------- Dictionary Interface ---------- */
10638  
10639 /* You can use it, if you want to eliminate the overhead for data copying from
10640 dictionary to some other external buffer.
10641 You must work with CLzmaDec variables directly in this interface.
10642  
10643 STEPS:
10644 LzmaDec_Constr()
10645 LzmaDec_Allocate()
10646 for (each new stream)
10647 {
10648 LzmaDec_Init()
10649 while (it needs more decompression)
10650 {
10651 LzmaDec_DecodeToDic()
10652 use data from CLzmaDec::dic and update CLzmaDec::dicPos
10653 }
10654 }
10655 LzmaDec_Free()
10656 */
10657  
10658 /* LzmaDec_DecodeToDic
10659
10660 The decoding to internal dictionary buffer (CLzmaDec::dic).
10661 You must manually update CLzmaDec::dicPos, if it reaches CLzmaDec::dicBufSize !!!
10662  
10663 finishMode:
10664 It has meaning only if the decoding reaches output limit (dicLimit).
10665 LZMA_FINISH_ANY - Decode just dicLimit bytes.
10666 LZMA_FINISH_END - Stream must be finished after dicLimit.
10667  
10668 Returns:
10669 SZ_OK
10670 status:
10671 LZMA_STATUS_FINISHED_WITH_MARK
10672 LZMA_STATUS_NOT_FINISHED
10673 LZMA_STATUS_NEEDS_MORE_INPUT
10674 LZMA_STATUS_MAYBE_FINISHED_WITHOUT_MARK
10675 SZ_ERROR_DATA - Data error
10676 */
10677  
10678 SRes LzmaDec_DecodeToDic(CLzmaDec *p, size_t dicLimit,
10679 const uint8_t *src, size_t *srcLen, ELzmaFinishMode finishMode, ELzmaStatus *status);
10680  
10681 /* ---------- Buffer Interface ---------- */
10682  
10683 /* It's zlib-like interface.
10684 See LzmaDec_DecodeToDic description for information about STEPS and return results,
10685 but you must use LzmaDec_DecodeToBuf instead of LzmaDec_DecodeToDic and you don't need
10686 to work with CLzmaDec variables manually.
10687  
10688 finishMode:
10689 It has meaning only if the decoding reaches output limit (*destLen).
10690 LZMA_FINISH_ANY - Decode just destLen bytes.
10691 LZMA_FINISH_END - Stream must be finished after (*destLen).
10692 */
10693  
10694 SRes LzmaDec_DecodeToBuf(CLzmaDec *p, uint8_t *dest, size_t *destLen,
10695 const uint8_t *src, size_t *srcLen, ELzmaFinishMode finishMode, ELzmaStatus *status);
10696  
10697 /* ---------- One Call Interface ---------- */
10698  
10699 /* LzmaDecode
10700  
10701 finishMode:
10702 It has meaning only if the decoding reaches output limit (*destLen).
10703 LZMA_FINISH_ANY - Decode just destLen bytes.
10704 LZMA_FINISH_END - Stream must be finished after (*destLen).
10705  
10706 Returns:
10707 SZ_OK
10708 status:
10709 LZMA_STATUS_FINISHED_WITH_MARK
10710 LZMA_STATUS_NOT_FINISHED
10711 LZMA_STATUS_MAYBE_FINISHED_WITHOUT_MARK
10712 SZ_ERROR_DATA - Data error
10713 SZ_ERROR_MEM - Memory allocation error
10714 SZ_ERROR_UNSUPPORTED - Unsupported properties
10715 SZ_ERROR_INPUT_EOF - It needs more bytes in input buffer (src).
10716 */
10717  
10718 SRes LzmaDecode(uint8_t *dest, size_t *destLen, const uint8_t *src, size_t *srcLen,
10719 const uint8_t *propData, unsigned propSize, ELzmaFinishMode finishMode,
10720 ELzmaStatus *status, ISzAlloc *alloc);
10721  
10722 // LzmaDec.c -- LZMA Decoder
10723 // 2009-09-20 : Igor Pavlov : Public domain
10724  
10725 #define kNumTopBits 24
10726 #define kTopValue ((uint32_t)1 << kNumTopBits)
10727  
10728 #define kNumBitModelTotalBits 11
10729 #define kBitModelTotal (1 << kNumBitModelTotalBits)
10730 #define kNumMoveBits 5
10731  
10732 #define RC_INIT_SIZE 5
10733  
10734 #define NORMALIZE if (range < kTopValue) { range <<= 8; code = (code << 8) | (*buf++); }
10735  
10736 #define IF_BIT_0(p) ttt = *(p); NORMALIZE; bound = (range >> kNumBitModelTotalBits) * ttt; if (code < bound)
10737 #define UPDATE_0(p) range = bound; *(p) = (CLzmaProb)(ttt + ((kBitModelTotal - ttt) >> kNumMoveBits));
10738 #define UPDATE_1(p) range -= bound; code -= bound; *(p) = (CLzmaProb)(ttt - (ttt >> kNumMoveBits));
10739 #define GET_BIT2(p, i, A0, A1) IF_BIT_0(p) \
10740 { UPDATE_0(p); i = (i + i); A0; } else \
10741 { UPDATE_1(p); i = (i + i) + 1; A1; }
10742 #define GET_BIT(p, i) GET_BIT2(p, i, ; , ;)
10743  
10744 #define TREE_GET_BIT(probs, i) { GET_BIT((probs + i), i); }
10745 #define TREE_DECODE(probs, limit, i) \
10746 { i = 1; do { TREE_GET_BIT(probs, i); } while (i < limit); i -= limit; }
10747  
10748 /* #define _LZMA_SIZE_OPT */
10749  
10750 #ifdef _LZMA_SIZE_OPT
10751 #define TREE_6_DECODE(probs, i) TREE_DECODE(probs, (1 << 6), i)
10752 #else
10753 #define TREE_6_DECODE(probs, i) \
10754 { i = 1; \
10755 TREE_GET_BIT(probs, i); \
10756 TREE_GET_BIT(probs, i); \
10757 TREE_GET_BIT(probs, i); \
10758 TREE_GET_BIT(probs, i); \
10759 TREE_GET_BIT(probs, i); \
10760 TREE_GET_BIT(probs, i); \
10761 i -= 0x40; }
10762 #endif
10763  
10764 #define NORMALIZE_CHECK if (range < kTopValue) { if (buf >= bufLimit) return DUMMY_ERROR; range <<= 8; code = (code << 8) | (*buf++); }
10765  
10766 #define IF_BIT_0_CHECK(p) ttt = *(p); NORMALIZE_CHECK; bound = (range >> kNumBitModelTotalBits) * ttt; if (code < bound)
10767 #define UPDATE_0_CHECK range = bound;
10768 #define UPDATE_1_CHECK range -= bound; code -= bound;
10769 #define GET_BIT2_CHECK(p, i, A0, A1) IF_BIT_0_CHECK(p) \
10770 { UPDATE_0_CHECK; i = (i + i); A0; } else \
10771 { UPDATE_1_CHECK; i = (i + i) + 1; A1; }
10772 #define GET_BIT_CHECK(p, i) GET_BIT2_CHECK(p, i, ; , ;)
10773 #define TREE_DECODE_CHECK(probs, limit, i) \
10774 { i = 1; do { GET_BIT_CHECK(probs + i, i) } while (i < limit); i -= limit; }
10775  
10776 #define kNumPosBitsMax 4
10777 #define kNumPosStatesMax (1 << kNumPosBitsMax)
10778  
10779 #define kLenNumLowBits 3
10780 #define kLenNumLowSymbols (1 << kLenNumLowBits)
10781 #define kLenNumMidBits 3
10782 #define kLenNumMidSymbols (1 << kLenNumMidBits)
10783 #define kLenNumHighBits 8
10784 #define kLenNumHighSymbols (1 << kLenNumHighBits)
10785  
10786 #define LenChoice 0
10787 #define LenChoice2 (LenChoice + 1)
10788 #define LenLow (LenChoice2 + 1)
10789 #define LenMid (LenLow + (kNumPosStatesMax << kLenNumLowBits))
10790 #define LenHigh (LenMid + (kNumPosStatesMax << kLenNumMidBits))
10791 #define kNumLenProbs (LenHigh + kLenNumHighSymbols)
10792  
10793 #define kNumStates 12
10794 #define kNumLitStates 7
10795  
10796 #define kStartPosModelIndex 4
10797 #define kEndPosModelIndex 14
10798 #define kNumFullDistances (1 << (kEndPosModelIndex >> 1))
10799  
10800 #define kNumPosSlotBits 6
10801 #define kNumLenToPosStates 4
10802  
10803 #define kNumAlignBits 4
10804 #define kAlignTableSize (1 << kNumAlignBits)
10805  
10806 #define kMatchMinLen 2
10807 #define kMatchSpecLenStart (kMatchMinLen + kLenNumLowSymbols + kLenNumMidSymbols + kLenNumHighSymbols)
10808  
10809 #define IsMatch 0
10810 #define IsRep (IsMatch + (kNumStates << kNumPosBitsMax))
10811 #define IsRepG0 (IsRep + kNumStates)
10812 #define IsRepG1 (IsRepG0 + kNumStates)
10813 #define IsRepG2 (IsRepG1 + kNumStates)
10814 #define IsRep0Long (IsRepG2 + kNumStates)
10815 #define PosSlot (IsRep0Long + (kNumStates << kNumPosBitsMax))
10816 #define SpecPos (PosSlot + (kNumLenToPosStates << kNumPosSlotBits))
10817 #define Align (SpecPos + kNumFullDistances - kEndPosModelIndex)
10818 #define LenCoder (Align + kAlignTableSize)
10819 #define RepLenCoder (LenCoder + kNumLenProbs)
10820 #define Literal (RepLenCoder + kNumLenProbs)
10821  
10822 #define LZMA_BASE_SIZE 1846
10823 #define LZMA_LIT_SIZE 768
10824  
10825 #define LzmaProps_GetNumProbs(p) ((uint32_t)LZMA_BASE_SIZE + (LZMA_LIT_SIZE << ((p)->lc + (p)->lp)))
10826  
10827 #if Literal != LZMA_BASE_SIZE
10828 StopCompilingDueBUG
10829 #endif
10830  
10831 #define LZMA_DIC_MIN (1 << 12)
10832  
10833 /* First LZMA-symbol is always decoded.
10834 And it decodes new LZMA-symbols while (buf < bufLimit), but "buf" is without last normalization
10835 Out:
10836 Result:
10837 SZ_OK - OK
10838 SZ_ERROR_DATA - Error
10839 p->remainLen:
10840 < kMatchSpecLenStart : normal remain
10841 = kMatchSpecLenStart : finished
10842 = kMatchSpecLenStart + 1 : Flush marker
10843 = kMatchSpecLenStart + 2 : State Init Marker
10844 */
10845  
10846 76 static int LzmaDec_DecodeReal(CLzmaDec *p, size_t limit, const uint8_t *bufLimit)
10847 {
10848 76 CLzmaProb *probs = p->probs;
10849  
10850 76 unsigned state = p->state;
10851 76 uint32_t rep0 = p->reps[0], rep1 = p->reps[1], rep2 = p->reps[2], rep3 = p->reps[3];
10852 76 unsigned pbMask = ((unsigned)1 << (p->prop.pb)) - 1;
10853 76 unsigned lpMask = ((unsigned)1 << (p->prop.lp)) - 1;
10854 76 unsigned lc = p->prop.lc;
10855  
10856 76 uint8_t *dic = p->dic;
10857 76 size_t dicBufSize = p->dicBufSize;
10858 76 size_t dicPos = p->dicPos;
10859
10860 76 uint32_t processedPos = p->processedPos;
10861 76 uint32_t checkDicSize = p->checkDicSize;
10862 76 unsigned len = 0;
10863  
10864 76 const uint8_t *buf = p->buf;
10865 76 uint32_t range = p->range;
10866 76 uint32_t code = p->code;
10867  
10868 do
10869 {
10870 CLzmaProb *prob;
10871 uint32_t bound;
10872 unsigned ttt;
10873 32788 unsigned posState = processedPos & pbMask;
10874  
10875 32788 prob = probs + IsMatch + (state << kNumPosBitsMax) + posState;
10876 32788 ▶ IF_BIT_0(prob)
Branch: 2 branches
BranchTrueFalseTotal
IF_BIT_0(prob) 214 32574 32788
IF_BIT_0(prob) 563 32225 32788
10877 {
10878 unsigned symbol;
10879 563 UPDATE_0(prob);
10880 563 prob = probs + Literal;
10881 563 ▶ if (checkDicSize != 0 || processedPos != 0)
Branch: 2 branches
BranchTrueFalseTotal
if (checkDicSize != 0 || processedPos != 0) 563 0 563
if (checkDicSize != 0 || processedPos != 0) 559 4 563
10882 1118 prob += (LZMA_LIT_SIZE * (((processedPos & lpMask) << lc) +
10883 559 ▶ (dic[(dicPos == 0 ? dicBufSize : dicPos) - 1] >> (8 - lc))));
Branch: 1 branch
BranchTrueFalseTotal
(dic[(dicPos == 0 ? dicBufSize : dicPos) - 1] >> (8 - lc)))); 0 559 559
10884  
10885 563 ▶ if (state < kNumLitStates)
Branch: 1 branch
BranchTrueFalseTotal
if (state < kNumLitStates) 237 326 563
10886 {
10887 237 state -= (state < 4) ? state : 3;
10888 237 symbol = 1;
10889 1896 ▶ do { GET_BIT(prob + symbol, symbol) } while (symbol < 0x100);
Branch: 3 branches
BranchTrueFalseTotal
do { GET_BIT(prob + symbol, symbol) } while (symbol < 0x100); 203 1693 1896
do { GET_BIT(prob + symbol, symbol) } while (symbol < 0x100); 1297 599 1896
do { GET_BIT(prob + symbol, symbol) } while (symbol < 0x100); 1659 237 1896
10890 }
10891 else
10892 {
10893 326 ▶ unsigned matchByte = p->dic[(dicPos - rep0) + ((dicPos < rep0) ? dicBufSize : 0)];
Branch: 1 branch
BranchTrueFalseTotal
unsigned matchByte = p->dic[(dicPos - rep0) + ((dicPos < rep0) ? dicBufSize : 0)]; 0 326 326
10894 326 unsigned offs = 0x100;
10895 326 ▶ state -= (state < 10) ? 3 : 6;
Branch: 1 branch
BranchTrueFalseTotal
state -= (state < 10) ? 3 : 6; 238 88 326
10896 326 symbol = 1;
10897 do
10898 {
10899 unsigned bit;
10900 CLzmaProb *probLit;
10901 2608 matchByte <<= 1;
10902 2608 bit = (matchByte & offs);
10903 2608 probLit = prob + offs + bit + symbol;
10904 2608 ▶ GET_BIT2(probLit, symbol, offs &= ~bit, offs &= bit)
Branch: 2 branches
BranchTrueFalseTotal
GET_BIT2(probLit, symbol, offs &= ~bit, offs &= bit) 287 2321 2608
GET_BIT2(probLit, symbol, offs &= ~bit, offs &= bit) 1780 828 2608
10905 }
10906 2608 ▶ while (symbol < 0x100);
Branch: 1 branch
BranchTrueFalseTotal
while (symbol < 0x100); 2282 326 2608
10907 }
10908 563 dic[dicPos++] = (uint8_t)symbol;
10909 563 processedPos++;
10910 563 continue;
10911 563 }
10912 else
10913 {
10914 32225 UPDATE_1(prob);
10915 32225 prob = probs + IsRep + state;
10916 32225 ▶ IF_BIT_0(prob)
Branch: 2 branches
BranchTrueFalseTotal
IF_BIT_0(prob) 210 32015 32225
IF_BIT_0(prob) 206 32019 32225
10917 {
10918 206 UPDATE_0(prob);
10919 206 state += kNumStates;
10920 206 prob = probs + LenCoder;
10921 }
10922 else
10923 {
10924 32019 UPDATE_1(prob);
10925 32019 ▶ if (checkDicSize == 0 && processedPos == 0)
Branch: 2 branches
BranchTrueFalseTotal
if (checkDicSize == 0 && processedPos == 0) 32019 0 32019
if (checkDicSize == 0 && processedPos == 0) 0 32019 32019
10926 0 return SZ_ERROR_DATA;
10927 32019 prob = probs + IsRepG0 + state;
10928 32019 ▶ IF_BIT_0(prob)
Branch: 2 branches
BranchTrueFalseTotal
IF_BIT_0(prob) 116 31903 32019
IF_BIT_0(prob) 31929 90 32019
10929 {
10930 31929 UPDATE_0(prob);
10931 31929 prob = probs + IsRep0Long + (state << kNumPosBitsMax) + posState;
10932 31929 ▶ IF_BIT_0(prob)
Branch: 2 branches
BranchTrueFalseTotal
IF_BIT_0(prob) 132 31797 31929
IF_BIT_0(prob) 78 31851 31929
10933 {
10934 78 UPDATE_0(prob);
10935 78 ▶ dic[dicPos] = dic[(dicPos - rep0) + ((dicPos < rep0) ? dicBufSize : 0)];
Branch: 1 branch
BranchTrueFalseTotal
dic[dicPos] = dic[(dicPos - rep0) + ((dicPos < rep0) ? dicBufSize : 0)]; 0 78 78
10936 78 dicPos++;
10937 78 processedPos++;
10938 78 ▶ state = state < kNumLitStates ? 9 : 11;
Branch: 1 branch
BranchTrueFalseTotal
state = state < kNumLitStates ? 9 : 11; 75 3 78
10939 78 continue;
10940 }
10941 31851 UPDATE_1(prob);
10942 }
10943 else
10944 {
10945 uint32_t distance;
10946 90 UPDATE_1(prob);
10947 90 prob = probs + IsRepG1 + state;
10948 90 ▶ IF_BIT_0(prob)
Branch: 2 branches
BranchTrueFalseTotal
IF_BIT_0(prob) 21 69 90
IF_BIT_0(prob) 51 39 90
10949 {
10950 51 UPDATE_0(prob);
10951 51 distance = rep1;
10952 }
10953 else
10954 {
10955 39 UPDATE_1(prob);
10956 39 prob = probs + IsRepG2 + state;
10957 39 ▶ IF_BIT_0(prob)
Branch: 2 branches
BranchTrueFalseTotal
IF_BIT_0(prob) 5 34 39
IF_BIT_0(prob) 25 14 39
10958 {
10959 25 UPDATE_0(prob);
10960 25 distance = rep2;
10961 }
10962 else
10963 {
10964 14 UPDATE_1(prob);
10965 14 distance = rep3;
10966 14 rep3 = rep2;
10967 }
10968 39 rep2 = rep1;
10969 }
10970 90 rep1 = rep0;
10971 90 rep0 = distance;
10972 }
10973 31941 ▶ state = state < kNumLitStates ? 8 : 11;
Branch: 1 branch
BranchTrueFalseTotal
state = state < kNumLitStates ? 8 : 11; 132 31809 31941
10974 31941 prob = probs + RepLenCoder;
10975 }
10976 {
10977 unsigned limit, offset;
10978 32147 CLzmaProb *probLen = prob + LenChoice;
10979 32147 ▶ IF_BIT_0(probLen)
Branch: 2 branches
BranchTrueFalseTotal
IF_BIT_0(probLen) 203 31944 32147
IF_BIT_0(probLen) 211 31936 32147
10980 {
10981 211 UPDATE_0(probLen);
10982 211 probLen = prob + LenLow + (posState << kLenNumLowBits);
10983 211 offset = 0;
10984 211 limit = (1 << kLenNumLowBits);
10985 }
10986 else
10987 {
10988 31936 UPDATE_1(probLen);
10989 31936 probLen = prob + LenChoice2;
10990 31936 ▶ IF_BIT_0(probLen)
Branch: 2 branches
BranchTrueFalseTotal
IF_BIT_0(probLen) 110 31826 31936
IF_BIT_0(probLen) 29 31907 31936
10991 {
10992 29 UPDATE_0(probLen);
10993 29 probLen = prob + LenMid + (posState << kLenNumMidBits);
10994 29 offset = kLenNumLowSymbols;
10995 29 limit = (1 << kLenNumMidBits);
10996 }
10997 else
10998 {
10999 31907 UPDATE_1(probLen);
11000 31907 probLen = prob + LenHigh;
11001 31907 offset = kLenNumLowSymbols + kLenNumMidSymbols;
11002 31907 limit = (1 << kLenNumHighBits);
11003 }
11004 }
11005 255976 ▶ TREE_DECODE(probLen, limit, len);
Branch: 3 branches
BranchTrueFalseTotal
TREE_DECODE(probLen, limit, len); 1131 254845 255976
TREE_DECODE(probLen, limit, len); 972 255004 255976
TREE_DECODE(probLen, limit, len); 223829 32147 255976
11006 32147 len += offset;
11007 }
11008  
11009 32147 ▶ if (state >= kNumStates)
Branch: 1 branch
BranchTrueFalseTotal
if (state >= kNumStates) 206 31941 32147
11010 {
11011 uint32_t distance;
11012 206 prob = probs + PosSlot +
11013 206 ((len < kNumLenToPosStates ? len : kNumLenToPosStates - 1) << kNumPosSlotBits);
11014 206 ▶ TREE_6_DECODE(prob, distance);
Branch: 12 branches
BranchTrueFalseTotal
TREE_6_DECODE(prob, distance); 18 188 206
TREE_6_DECODE(prob, distance); 132 74 206
TREE_6_DECODE(prob, distance); 39 167 206
TREE_6_DECODE(prob, distance); 189 17 206
TREE_6_DECODE(prob, distance); 22 184 206
TREE_6_DECODE(prob, distance); 152 54 206
TREE_6_DECODE(prob, distance); 20 186 206
TREE_6_DECODE(prob, distance); 83 123 206
TREE_6_DECODE(prob, distance); 12 194 206
TREE_6_DECODE(prob, distance); 115 91 206
TREE_6_DECODE(prob, distance); 29 177 206
TREE_6_DECODE(prob, distance); 133 73 206
11015 206 ▶ if (distance >= kStartPosModelIndex)
Branch: 1 branch
BranchTrueFalseTotal
if (distance >= kStartPosModelIndex) 173 33 206
11016 {
11017 173 unsigned posSlot = (unsigned)distance;
11018 173 int numDirectBits = (int)(((distance >> 1) - 1));
11019 173 distance = (2 | (distance & 1));
11020 173 ▶ if (posSlot < kEndPosModelIndex)
Branch: 1 branch
BranchTrueFalseTotal
if (posSlot < kEndPosModelIndex) 80 93 173
11021 {
11022 80 distance <<= numDirectBits;
11023 80 prob = probs + SpecPos + distance - posSlot - 1;
11024 {
11025 80 uint32_t mask = 1;
11026 80 unsigned i = 1;
11027 do
11028 {
11029 192 ▶ GET_BIT2(prob + i, i, ; , distance |= mask);
Branch: 2 branches
BranchTrueFalseTotal
GET_BIT2(prob + i, i, ; , distance |= mask); 24 168 192
GET_BIT2(prob + i, i, ; , distance |= mask); 89 103 192
11030 192 mask <<= 1;
11031 }
11032 192 ▶ while (--numDirectBits != 0);
Branch: 1 branch
BranchTrueFalseTotal
while (--numDirectBits != 0); 112 80 192
11033 }
11034 }
11035 else
11036 {
11037 93 numDirectBits -= kNumAlignBits;
11038 do
11039 {
11040 1110 ▶ NORMALIZE
Branch: 1 branch
BranchTrueFalseTotal
NORMALIZE 134 976 1110
11041 1110 range >>= 1;
11042
11043 {
11044 uint32_t t;
11045 1110 code -= range;
11046 1110 t = (0 - ((uint32_t)code >> 31)); /* (uint32_t)((int32_t)code >> 31) */
11047 1110 distance = (distance << 1) + (t + 1);
11048 1110 code += range & t;
11049 }
11050 /*
11051 distance <<= 1;
11052 if (code >= range)
11053 {
11054 code -= range;
11055 distance |= 1;
11056 }
11057 */
11058 }
11059 1110 ▶ while (--numDirectBits != 0);
Branch: 1 branch
BranchTrueFalseTotal
while (--numDirectBits != 0); 1017 93 1110
11060 93 prob = probs + Align;
11061 93 distance <<= kNumAlignBits;
11062 {
11063 93 unsigned i = 1;
11064 93 ▶ GET_BIT2(prob + i, i, ; , distance |= 1);
Branch: 2 branches
BranchTrueFalseTotal
GET_BIT2(prob + i, i, ; , distance |= 1); 12 81 93
GET_BIT2(prob + i, i, ; , distance |= 1); 55 38 93
11065 93 ▶ GET_BIT2(prob + i, i, ; , distance |= 2);
Branch: 2 branches
BranchTrueFalseTotal
GET_BIT2(prob + i, i, ; , distance |= 2); 16 77 93
GET_BIT2(prob + i, i, ; , distance |= 2); 52 41 93
11066 93 ▶ GET_BIT2(prob + i, i, ; , distance |= 4);
Branch: 2 branches
BranchTrueFalseTotal
GET_BIT2(prob + i, i, ; , distance |= 4); 9 84 93
GET_BIT2(prob + i, i, ; , distance |= 4); 53 40 93
11067 93 ▶ GET_BIT2(prob + i, i, ; , distance |= 8);
Branch: 2 branches
BranchTrueFalseTotal
GET_BIT2(prob + i, i, ; , distance |= 8); 13 80 93
GET_BIT2(prob + i, i, ; , distance |= 8); 58 35 93
11068 }
11069 93 ▶ if (distance == (uint32_t)0xFFFFFFFF)
Branch: 1 branch
BranchTrueFalseTotal
if (distance == (uint32_t)0xFFFFFFFF) 0 93 93
11070 {
11071 0 len += kMatchSpecLenStart;
11072 0 state -= kNumStates;
11073 0 break;
11074 }
11075 }
11076 }
11077 206 rep3 = rep2;
11078 206 rep2 = rep1;
11079 206 rep1 = rep0;
11080 206 rep0 = distance + 1;
11081 206 ▶ if (checkDicSize == 0)
Branch: 1 branch
BranchTrueFalseTotal
if (checkDicSize == 0) 206 0 206
11082 {
11083 206 ▶ if (distance >= processedPos)
Branch: 1 branch
BranchTrueFalseTotal
if (distance >= processedPos) 0 206 206
11084 0 return SZ_ERROR_DATA;
11085 }
11086 0 ▶ else if (distance >= checkDicSize)
Branch: 1 branch
BranchTrueFalseTotal
else if (distance >= checkDicSize) 0 0 0
11087 0 return SZ_ERROR_DATA;
11088 206 ▶ state = (state < kNumStates + kNumLitStates) ? kNumLitStates : kNumLitStates + 3;
Branch: 1 branch
BranchTrueFalseTotal
state = (state < kNumStates + kNumLitStates) ? kNumLitStates : kNumLitStates + 3; 121 85 206
11089 }
11090  
11091 32147 len += kMatchMinLen;
11092  
11093 32147 ▶ if (limit == dicPos)
Branch: 1 branch
BranchTrueFalseTotal
if (limit == dicPos) 0 32147 32147
11094 0 return SZ_ERROR_DATA;
11095 {
11096 32147 size_t rem = limit - dicPos;
11097 32147 ▶ unsigned curLen = ((rem < len) ? (unsigned)rem : len);
Branch: 1 branch
BranchTrueFalseTotal
unsigned curLen = ((rem < len) ? (unsigned)rem : len); 0 32147 32147
11098 32147 ▶ size_t pos = (dicPos - rep0) + ((dicPos < rep0) ? dicBufSize : 0);
Branch: 1 branch
BranchTrueFalseTotal
size_t pos = (dicPos - rep0) + ((dicPos < rep0) ? dicBufSize : 0); 0 32147 32147
11099  
11100 32147 processedPos += curLen;
11101  
11102 32147 len -= curLen;
11103 32147 ▶ if (pos + curLen <= dicBufSize)
Branch: 1 branch
BranchTrueFalseTotal
if (pos + curLen <= dicBufSize) 32147 0 32147
11104 {
11105 32147 uint8_t *dest = dic + dicPos;
11106 32147 ptrdiff_t src = (ptrdiff_t)pos - (ptrdiff_t)dicPos;
11107 32147 const uint8_t *lim = dest + curLen;
11108 32147 dicPos += curLen;
11109 do
11110 8689457 *(dest) = (uint8_t)*(dest + src);
11111 8689457 ▶ while (++dest != lim);
Branch: 1 branch
BranchTrueFalseTotal
while (++dest != lim); 8657310 32147 8689457
11112 }
11113 else
11114 {
11115 do
11116 {
11117 0 dic[dicPos++] = dic[pos];
11118 0 ▶ if (++pos == dicBufSize)
Branch: 1 branch
BranchTrueFalseTotal
if (++pos == dicBufSize) 0 0 0
11119 0 pos = 0;
11120 }
11121 0 ▶ while (--curLen != 0);
Branch: 1 branch
BranchTrueFalseTotal
while (--curLen != 0); 0 0 0
11122 }
11123 }
11124 }
11125 }
11126 32788 ▶ while (dicPos < limit && buf < bufLimit);
Branch: 2 branches
BranchTrueFalseTotal
while (dicPos < limit && buf < bufLimit); 32784 4 32788
while (dicPos < limit && buf < bufLimit); 32712 72 32784
11127 76 ▶ NORMALIZE;
Branch: 1 branch
BranchTrueFalseTotal
NORMALIZE; 18 58 76
11128 76 p->buf = buf;
11129 76 p->range = range;
11130 76 p->code = code;
11131 76 p->remainLen = len;
11132 76 p->dicPos = dicPos;
11133 76 p->processedPos = processedPos;
11134 76 p->reps[0] = rep0;
11135 76 p->reps[1] = rep1;
11136 76 p->reps[2] = rep2;
11137 76 p->reps[3] = rep3;
11138 76 p->state = state;
11139  
11140 76 return SZ_OK;
11141 }
11142  
11143 80 static void LzmaDec_WriteRem(CLzmaDec *p, size_t limit)
11144 {
11145 80 ▶ if (p->remainLen != 0 && p->remainLen < kMatchSpecLenStart)
Branch: 2 branches
BranchTrueFalseTotal
if (p->remainLen != 0 && p->remainLen < kMatchSpecLenStart) 0 80 80
if (p->remainLen != 0 && p->remainLen < kMatchSpecLenStart) 0 0 0
11146 {
11147 0 uint8_t *dic = p->dic;
11148 0 size_t dicPos = p->dicPos;
11149 0 size_t dicBufSize = p->dicBufSize;
11150 0 unsigned len = p->remainLen;
11151 0 uint32_t rep0 = p->reps[0];
11152 0 ▶ if (limit - dicPos < len)
Branch: 1 branch
BranchTrueFalseTotal
if (limit - dicPos < len) 0 0 0
11153 0 len = (unsigned)(limit - dicPos);
11154  
11155 0 ▶ if (p->checkDicSize == 0 && p->prop.dicSize - p->processedPos <= len)
Branch: 2 branches
BranchTrueFalseTotal
if (p->checkDicSize == 0 && p->prop.dicSize - p->processedPos <= len) 0 0 0
if (p->checkDicSize == 0 && p->prop.dicSize - p->processedPos <= len) 0 0 0
11156 0 p->checkDicSize = p->prop.dicSize;
11157  
11158 0 p->processedPos += len;
11159 0 p->remainLen -= len;
11160 0 ▶ while (len-- != 0)
Branch: 1 branch
BranchTrueFalseTotal
while (len-- != 0) 0 0 0
11161 {
11162 0 ▶ dic[dicPos] = dic[(dicPos - rep0) + ((dicPos < rep0) ? dicBufSize : 0)];
Branch: 1 branch
BranchTrueFalseTotal
dic[dicPos] = dic[(dicPos - rep0) + ((dicPos < rep0) ? dicBufSize : 0)]; 0 0 0
11163 0 dicPos++;
11164 }
11165 0 p->dicPos = dicPos;
11166 }
11167 80 }
11168  
11169 76 static int LzmaDec_DecodeReal2(CLzmaDec *p, size_t limit, const uint8_t *bufLimit)
11170 {
11171 do
11172 {
11173 76 size_t limit2 = limit;
11174 76 ▶ if (p->checkDicSize == 0)
Branch: 1 branch
BranchTrueFalseTotal
if (p->checkDicSize == 0) 76 0 76
11175 {
11176 76 uint32_t rem = p->prop.dicSize - p->processedPos;
11177 76 ▶ if (limit - p->dicPos > rem)
Branch: 1 branch
BranchTrueFalseTotal
if (limit - p->dicPos > rem) 0 76 76
11178 0 limit2 = p->dicPos + rem;
11179 }
11180 76 ▶ RINOK(LzmaDec_DecodeReal(p, limit2, bufLimit));
Branch: 1 branch
BranchTrueFalseTotal
RINOK(LzmaDec_DecodeReal(p, limit2, bufLimit)); 0 76 76
11181 76 ▶ if (p->processedPos >= p->prop.dicSize)
Branch: 1 branch
BranchTrueFalseTotal
if (p->processedPos >= p->prop.dicSize) 0 76 76
11182 0 p->checkDicSize = p->prop.dicSize;
11183 76 LzmaDec_WriteRem(p, limit);
11184 }
11185 76 ▶ while (p->dicPos < limit && p->buf < bufLimit && p->remainLen < kMatchSpecLenStart);
Branch: 3 branches
BranchTrueFalseTotal
while (p->dicPos < limit && p->buf < bufLimit && p->remainLen < kMatchSpecLenStart); 72 4 76
while (p->dicPos < limit && p->buf < bufLimit && p->remainLen < kMatchSpecLenStart); 0 72 72
while (p->dicPos < limit && p->buf < bufLimit && p->remainLen < kMatchSpecLenStart); 0 0 0
11186  
11187 76 ▶ if (p->remainLen > kMatchSpecLenStart)
Branch: 1 branch
BranchTrueFalseTotal
if (p->remainLen > kMatchSpecLenStart) 0 76 76
11188 {
11189 0 p->remainLen = kMatchSpecLenStart;
11190 }
11191 76 return 0;
11192 }
11193  
11194 enum ELzmaDummy
11195 {
11196 DUMMY_ERROR, /* unexpected end of input stream */
11197 DUMMY_LIT,
11198 DUMMY_MATCH,
11199 DUMMY_REP
11200 };
11201  
11202 71 static ELzmaDummy LzmaDec_TryDummy(const CLzmaDec *p, const uint8_t *buf, size_t inSize)
11203 {
11204 71 uint32_t range = p->range;
11205 71 uint32_t code = p->code;
11206 71 const uint8_t *bufLimit = buf + inSize;
11207 71 CLzmaProb *probs = p->probs;
11208 71 unsigned state = p->state;
11209 ELzmaDummy res;
11210  
11211 {
11212 CLzmaProb *prob;
11213 uint32_t bound;
11214 unsigned ttt;
11215 71 unsigned posState = (p->processedPos) & ((1 << p->prop.pb) - 1);
11216  
11217 71 prob = probs + IsMatch + (state << kNumPosBitsMax) + posState;
11218 71 ▶ IF_BIT_0_CHECK(prob)
Branch: 3 branches
BranchTrueFalseTotal
IF_BIT_0_CHECK(prob) 0 71 71
IF_BIT_0_CHECK(prob) 0 0 0
IF_BIT_0_CHECK(prob) 42 29 71
11219 {
11220 42 UPDATE_0_CHECK
11221  
11222 /* if (bufLimit - buf >= 7) return DUMMY_LIT; */
11223  
11224 42 prob = probs + Literal;
11225 42 ▶ if (p->checkDicSize != 0 || p->processedPos != 0)
Branch: 2 branches
BranchTrueFalseTotal
if (p->checkDicSize != 0 || p->processedPos != 0) 42 0 42
if (p->checkDicSize != 0 || p->processedPos != 0) 42 0 42
11226 42 prob += (LZMA_LIT_SIZE *
11227 84 ((((p->processedPos) & ((1 << (p->prop.lp)) - 1)) << p->prop.lc) +
11228 42 ▶ (p->dic[(p->dicPos == 0 ? p->dicBufSize : p->dicPos) - 1] >> (8 - p->prop.lc))));
Branch: 1 branch
BranchTrueFalseTotal
(p->dic[(p->dicPos == 0 ? p->dicBufSize : p->dicPos) - 1] >> (8 - p->prop.lc)))); 0 42 42
11229  
11230 42 ▶ if (state < kNumLitStates)
Branch: 1 branch
BranchTrueFalseTotal
if (state < kNumLitStates) 15 27 42
11231 {
11232 15 unsigned symbol = 1;
11233 120 ▶ do { GET_BIT_CHECK(prob + symbol, symbol) } while (symbol < 0x100);
Branch: 4 branches
BranchTrueFalseTotal
do { GET_BIT_CHECK(prob + symbol, symbol) } while (symbol < 0x100); 7 113 120
do { GET_BIT_CHECK(prob + symbol, symbol) } while (symbol < 0x100); 0 7 7
do { GET_BIT_CHECK(prob + symbol, symbol) } while (symbol < 0x100); 85 35 120
do { GET_BIT_CHECK(prob + symbol, symbol) } while (symbol < 0x100); 105 15 120
11234 }
11235 else
11236 {
11237 54 unsigned matchByte = p->dic[p->dicPos - p->reps[0] +
11238 27 ▶ ((p->dicPos < p->reps[0]) ? p->dicBufSize : 0)];
Branch: 1 branch
BranchTrueFalseTotal
((p->dicPos < p->reps[0]) ? p->dicBufSize : 0)]; 0 27 27
11239 27 unsigned offs = 0x100;
11240 27 unsigned symbol = 1;
11241 do
11242 {
11243 unsigned bit;
11244 CLzmaProb *probLit;
11245 216 matchByte <<= 1;
11246 216 bit = (matchByte & offs);
11247 216 probLit = prob + offs + bit + symbol;
11248 216 ▶ GET_BIT2_CHECK(probLit, symbol, offs &= ~bit, offs &= bit)
Branch: 3 branches
BranchTrueFalseTotal
GET_BIT2_CHECK(probLit, symbol, offs &= ~bit, offs &= bit) 21 195 216
GET_BIT2_CHECK(probLit, symbol, offs &= ~bit, offs &= bit) 0 21 21
GET_BIT2_CHECK(probLit, symbol, offs &= ~bit, offs &= bit) 154 62 216
11249 }
11250 216 ▶ while (symbol < 0x100);
Branch: 1 branch
BranchTrueFalseTotal
while (symbol < 0x100); 189 27 216
11251 }
11252 42 res = DUMMY_LIT;
11253 }
11254 else
11255 {
11256 unsigned len;
11257 29 UPDATE_1_CHECK;
11258  
11259 29 prob = probs + IsRep + state;
11260 29 ▶ IF_BIT_0_CHECK(prob)
Branch: 3 branches
BranchTrueFalseTotal
IF_BIT_0_CHECK(prob) 1 28 29
IF_BIT_0_CHECK(prob) 0 1 1
IF_BIT_0_CHECK(prob) 11 18 29
11261 {
11262 11 UPDATE_0_CHECK;
11263 11 state = 0;
11264 11 prob = probs + LenCoder;
11265 11 res = DUMMY_MATCH;
11266 }
11267 else
11268 {
11269 18 UPDATE_1_CHECK;
11270 18 res = DUMMY_REP;
11271 18 prob = probs + IsRepG0 + state;
11272 18 ▶ IF_BIT_0_CHECK(prob)
Branch: 3 branches
BranchTrueFalseTotal
IF_BIT_0_CHECK(prob) 0 18 18
IF_BIT_0_CHECK(prob) 0 0 0
IF_BIT_0_CHECK(prob) 18 0 18
11273 {
11274 18 UPDATE_0_CHECK;
11275 18 prob = probs + IsRep0Long + (state << kNumPosBitsMax) + posState;
11276 18 ▶ IF_BIT_0_CHECK(prob)
Branch: 3 branches
BranchTrueFalseTotal
IF_BIT_0_CHECK(prob) 2 16 18
IF_BIT_0_CHECK(prob) 0 2 2
IF_BIT_0_CHECK(prob) 13 5 18
11277 {
11278 13 UPDATE_0_CHECK;
11279 13 ▶ NORMALIZE_CHECK;
Branch: 2 branches
BranchTrueFalseTotal
NORMALIZE_CHECK; 6 7 13
NORMALIZE_CHECK; 0 6 6
11280 13 return DUMMY_REP;
11281 }
11282 else
11283 {
11284 5 UPDATE_1_CHECK;
11285 }
11286 }
11287 else
11288 {
11289 0 UPDATE_1_CHECK;
11290 0 prob = probs + IsRepG1 + state;
11291 0 ▶ IF_BIT_0_CHECK(prob)
Branch: 3 branches
BranchTrueFalseTotal
IF_BIT_0_CHECK(prob) 0 0 0
IF_BIT_0_CHECK(prob) 0 0 0
IF_BIT_0_CHECK(prob) 0 0 0
11292 {
11293 0 UPDATE_0_CHECK;
11294 }
11295 else
11296 {
11297 0 UPDATE_1_CHECK;
11298 0 prob = probs + IsRepG2 + state;
11299 0 ▶ IF_BIT_0_CHECK(prob)
Branch: 3 branches
BranchTrueFalseTotal
IF_BIT_0_CHECK(prob) 0 0 0
IF_BIT_0_CHECK(prob) 0 0 0
IF_BIT_0_CHECK(prob) 0 0 0
11300 {
11301 0 UPDATE_0_CHECK;
11302 }
11303 else
11304 {
11305 0 UPDATE_1_CHECK;
11306 }
11307 }
11308 }
11309 5 state = kNumStates;
11310 5 prob = probs + RepLenCoder;
11311 }
11312 {
11313 unsigned limit, offset;
11314 16 CLzmaProb *probLen = prob + LenChoice;
11315 16 ▶ IF_BIT_0_CHECK(probLen)
Branch: 3 branches
BranchTrueFalseTotal
IF_BIT_0_CHECK(probLen) 2 14 16
IF_BIT_0_CHECK(probLen) 0 2 2
IF_BIT_0_CHECK(probLen) 15 1 16
11316 {
11317 15 UPDATE_0_CHECK;
11318 15 probLen = prob + LenLow + (posState << kLenNumLowBits);
11319 15 offset = 0;
11320 15 limit = 1 << kLenNumLowBits;
11321 }
11322 else
11323 {
11324 1 UPDATE_1_CHECK;
11325 1 probLen = prob + LenChoice2;
11326 1 ▶ IF_BIT_0_CHECK(probLen)
Branch: 3 branches
BranchTrueFalseTotal
IF_BIT_0_CHECK(probLen) 0 1 1
IF_BIT_0_CHECK(probLen) 0 0 0
IF_BIT_0_CHECK(probLen) 1 0 1
11327 {
11328 1 UPDATE_0_CHECK;
11329 1 probLen = prob + LenMid + (posState << kLenNumMidBits);
11330 1 offset = kLenNumLowSymbols;
11331 1 limit = 1 << kLenNumMidBits;
11332 }
11333 else
11334 {
11335 0 UPDATE_1_CHECK;
11336 0 probLen = prob + LenHigh;
11337 0 offset = kLenNumLowSymbols + kLenNumMidSymbols;
11338 0 limit = 1 << kLenNumHighBits;
11339 }
11340 }
11341 48 ▶ TREE_DECODE_CHECK(probLen, limit, len);
Branch: 4 branches
BranchTrueFalseTotal
TREE_DECODE_CHECK(probLen, limit, len); 8 40 48
TREE_DECODE_CHECK(probLen, limit, len); 0 8 8
TREE_DECODE_CHECK(probLen, limit, len); 22 26 48
TREE_DECODE_CHECK(probLen, limit, len); 32 16 48
11342 16 len += offset;
11343 }
11344  
11345 16 ▶ if (state < 4)
Branch: 1 branch
BranchTrueFalseTotal
if (state < 4) 11 5 16
11346 {
11347 unsigned posSlot;
11348 11 prob = probs + PosSlot +
11349 11 ((len < kNumLenToPosStates ? len : kNumLenToPosStates - 1) <<
11350 kNumPosSlotBits);
11351 66 ▶ TREE_DECODE_CHECK(prob, 1 << kNumPosSlotBits, posSlot);
Branch: 4 branches
BranchTrueFalseTotal
TREE_DECODE_CHECK(prob, 1 << kNumPosSlotBits, posSlot); 7 59 66
TREE_DECODE_CHECK(prob, 1 << kNumPosSlotBits, posSlot); 0 7 7
TREE_DECODE_CHECK(prob, 1 << kNumPosSlotBits, posSlot); 42 24 66
TREE_DECODE_CHECK(prob, 1 << kNumPosSlotBits, posSlot); 55 11 66
11352 11 ▶ if (posSlot >= kStartPosModelIndex)
Branch: 1 branch
BranchTrueFalseTotal
if (posSlot >= kStartPosModelIndex) 10 1 11
11353 {
11354 10 int numDirectBits = ((posSlot >> 1) - 1);
11355  
11356 /* if (bufLimit - buf >= 8) return DUMMY_MATCH; */
11357  
11358 10 ▶ if (posSlot < kEndPosModelIndex)
Branch: 1 branch
BranchTrueFalseTotal
if (posSlot < kEndPosModelIndex) 7 3 10
11359 {
11360 7 prob = probs + SpecPos + ((2 | (posSlot & 1)) << numDirectBits) - posSlot - 1;
11361 }
11362 else
11363 {
11364 3 numDirectBits -= kNumAlignBits;
11365 do
11366 {
11367 43 ▶ NORMALIZE_CHECK
Branch: 2 branches
BranchTrueFalseTotal
NORMALIZE_CHECK 5 38 43
NORMALIZE_CHECK 0 5 5
11368 43 range >>= 1;
11369 43 code -= range & (((code - range) >> 31) - 1);
11370 /* if (code >= range) code -= range; */
11371 }
11372 43 ▶ while (--numDirectBits != 0);
Branch: 1 branch
BranchTrueFalseTotal
while (--numDirectBits != 0); 40 3 43
11373 3 prob = probs + Align;
11374 3 numDirectBits = kNumAlignBits;
11375 }
11376 {
11377 10 unsigned i = 1;
11378 do
11379 {
11380 31 ▶ GET_BIT_CHECK(prob + i, i);
Branch: 3 branches
BranchTrueFalseTotal
GET_BIT_CHECK(prob + i, i); 5 26 31
GET_BIT_CHECK(prob + i, i); 0 5 5
GET_BIT_CHECK(prob + i, i); 10 21 31
11381 }
11382 31 ▶ while (--numDirectBits != 0);
Branch: 1 branch
BranchTrueFalseTotal
while (--numDirectBits != 0); 21 10 31
11383 }
11384 }
11385 }
11386 }
11387 }
11388 58 ▶ NORMALIZE_CHECK;
Branch: 2 branches
BranchTrueFalseTotal
NORMALIZE_CHECK; 12 46 58
NORMALIZE_CHECK; 0 12 12
11389 58 return res;
11390 }
11391  
11392 4 static void LzmaDec_InitRc(CLzmaDec *p, const uint8_t *data)
11393 {
11394 4 p->code = ((uint32_t)data[1] << 24) | ((uint32_t)data[2] << 16) | ((uint32_t)data[3] << 8) | ((uint32_t)data[4]);
11395 4 p->range = 0xFFFFFFFF;
11396 4 p->needFlush = 0;
11397 4 }
11398  
11399 4 void LzmaDec_InitDicAndState(CLzmaDec *p, bool initDic, bool initState)
11400 {
11401 4 p->needFlush = 1;
11402 4 p->remainLen = 0;
11403 4 p->tempBufSize = 0;
11404  
11405 4 ▶ if (initDic)
Branch: 1 branch
BranchTrueFalseTotal
if (initDic) 4 0 4
11406 {
11407 4 p->processedPos = 0;
11408 4 p->checkDicSize = 0;
11409 4 p->needInitState = 1;
11410 }
11411 4 ▶ if (initState)
Branch: 1 branch
BranchTrueFalseTotal
if (initState) 4 0 4
11412 4 p->needInitState = 1;
11413 4 }
11414  
11415 4 void LzmaDec_Init(CLzmaDec *p)
11416 {
11417 4 p->dicPos = 0;
11418 4 LzmaDec_InitDicAndState(p, true, true);
11419 4 }
11420  
11421 4 static void LzmaDec_InitStateReal(CLzmaDec *p)
11422 {
11423 4 uint32_t numProbs = Literal + ((uint32_t)LZMA_LIT_SIZE << (p->prop.lc + p->prop.lp));
11424 uint32_t i;
11425 4 CLzmaProb *probs = p->probs;
11426 31964 ▶ for (i = 0; i < numProbs; i++)
Branch: 1 branch
BranchTrueFalseTotal
for (i = 0; i < numProbs; i++) 31960 4 31964
11427 31960 probs[i] = kBitModelTotal >> 1;
11428 4 p->reps[0] = p->reps[1] = p->reps[2] = p->reps[3] = 1;
11429 4 p->state = 0;
11430 4 p->needInitState = 0;
11431 4 }
11432  
11433 4 SRes LzmaDec_DecodeToDic(CLzmaDec *p, size_t dicLimit, const uint8_t *src, size_t *srcLen,
11434 ELzmaFinishMode finishMode, ELzmaStatus *status)
11435 {
11436 4 size_t inSize = *srcLen;
11437 4 (*srcLen) = 0;
11438 4 LzmaDec_WriteRem(p, dicLimit);
11439
11440 4 *status = LZMA_STATUS_NOT_SPECIFIED;
11441  
11442 80 ▶ while (p->remainLen != kMatchSpecLenStart)
Branch: 1 branch
BranchTrueFalseTotal
while (p->remainLen != kMatchSpecLenStart) 80 0 80
11443 {
11444 int checkEndMarkNow;
11445  
11446 80 ▶ if (p->needFlush != 0)
Branch: 1 branch
BranchTrueFalseTotal
if (p->needFlush != 0) 4 76 80
11447 {
11448 24 ▶ for (; inSize > 0 && p->tempBufSize < RC_INIT_SIZE; (*srcLen)++, inSize--)
Branch: 2 branches
BranchTrueFalseTotal
for (; inSize > 0 && p->tempBufSize < RC_INIT_SIZE; (*srcLen)++, inSize--) 24 0 24
for (; inSize > 0 && p->tempBufSize < RC_INIT_SIZE; (*srcLen)++, inSize--) 20 4 24
11449 20 p->tempBuf[p->tempBufSize++] = *src++;
11450 4 ▶ if (p->tempBufSize < RC_INIT_SIZE)
Branch: 1 branch
BranchTrueFalseTotal
if (p->tempBufSize < RC_INIT_SIZE) 0 4 4
11451 {
11452 0 *status = LZMA_STATUS_NEEDS_MORE_INPUT;
11453 0 return SZ_OK;
11454 }
11455 4 ▶ if (p->tempBuf[0] != 0)
Branch: 1 branch
BranchTrueFalseTotal
if (p->tempBuf[0] != 0) 0 4 4
11456 0 return SZ_ERROR_DATA;
11457  
11458 4 LzmaDec_InitRc(p, p->tempBuf);
11459 4 p->tempBufSize = 0;
11460 }
11461  
11462 80 checkEndMarkNow = 0;
11463 80 ▶ if (p->dicPos >= dicLimit)
Branch: 1 branch
BranchTrueFalseTotal
if (p->dicPos >= dicLimit) 4 76 80
11464 {
11465 4 ▶ if (p->remainLen == 0 && p->code == 0)
Branch: 2 branches
BranchTrueFalseTotal
if (p->remainLen == 0 && p->code == 0) 4 0 4
if (p->remainLen == 0 && p->code == 0) 4 0 4
11466 {
11467 4 *status = LZMA_STATUS_MAYBE_FINISHED_WITHOUT_MARK;
11468 4 return SZ_OK;
11469 }
11470 0 ▶ if (finishMode == LZMA_FINISH_ANY)
Branch: 1 branch
BranchTrueFalseTotal
if (finishMode == LZMA_FINISH_ANY) 0 0 0
11471 {
11472 0 *status = LZMA_STATUS_NOT_FINISHED;
11473 0 return SZ_OK;
11474 }
11475 0 ▶ if (p->remainLen != 0)
Branch: 1 branch
BranchTrueFalseTotal
if (p->remainLen != 0) 0 0 0
11476 {
11477 0 *status = LZMA_STATUS_NOT_FINISHED;
11478 0 return SZ_ERROR_DATA;
11479 }
11480 0 checkEndMarkNow = 1;
11481 }
11482  
11483 76 ▶ if (p->needInitState)
Branch: 1 branch
BranchTrueFalseTotal
if (p->needInitState) 4 72 76
11484 4 LzmaDec_InitStateReal(p);
11485
11486 76 ▶ if (p->tempBufSize == 0)
Branch: 1 branch
BranchTrueFalseTotal
if (p->tempBufSize == 0) 76 0 76
11487 {
11488 size_t processed;
11489 const uint8_t *bufLimit;
11490 76 ▶ if (inSize < LZMA_REQUIRED_INPUT_MAX || checkEndMarkNow)
Branch: 2 branches
BranchTrueFalseTotal
if (inSize < LZMA_REQUIRED_INPUT_MAX || checkEndMarkNow) 5 71 76
if (inSize < LZMA_REQUIRED_INPUT_MAX || checkEndMarkNow) 0 5 5
11491 {
11492 71 int dummyRes = LzmaDec_TryDummy(p, src, inSize);
11493 71 ▶ if (dummyRes == DUMMY_ERROR)
Branch: 1 branch
BranchTrueFalseTotal
if (dummyRes == DUMMY_ERROR) 0 71 71
11494 {
11495 0 memcpy(p->tempBuf, src, inSize);
11496 0 p->tempBufSize = (unsigned)inSize;
11497 0 (*srcLen) += inSize;
11498 0 *status = LZMA_STATUS_NEEDS_MORE_INPUT;
11499 0 return SZ_OK;
11500 }
11501 71 ▶ if (checkEndMarkNow && dummyRes != DUMMY_MATCH)
Branch: 2 branches
BranchTrueFalseTotal
if (checkEndMarkNow && dummyRes != DUMMY_MATCH) 0 71 71
if (checkEndMarkNow && dummyRes != DUMMY_MATCH) 0 0 0
11502 {
11503 0 *status = LZMA_STATUS_NOT_FINISHED;
11504 0 return SZ_ERROR_DATA;
11505 }
11506 71 bufLimit = src;
11507 71 }
11508 else
11509 5 bufLimit = src + inSize - LZMA_REQUIRED_INPUT_MAX;
11510 76 p->buf = src;
11511 76 ▶ if (LzmaDec_DecodeReal2(p, dicLimit, bufLimit) != 0)
Branch: 1 branch
BranchTrueFalseTotal
if (LzmaDec_DecodeReal2(p, dicLimit, bufLimit) != 0) 0 76 76
11512 0 return SZ_ERROR_DATA;
11513 76 processed = (size_t)(p->buf - src);
11514 76 (*srcLen) += processed;
11515 76 src += processed;
11516 76 inSize -= processed;
11517 }
11518 else
11519 {
11520 0 unsigned rem = p->tempBufSize, lookAhead = 0;
11521 0 ▶ while (rem < LZMA_REQUIRED_INPUT_MAX && lookAhead < inSize)
Branch: 2 branches
BranchTrueFalseTotal
while (rem < LZMA_REQUIRED_INPUT_MAX && lookAhead < inSize) 0 0 0
while (rem < LZMA_REQUIRED_INPUT_MAX && lookAhead < inSize) 0 0 0
11522 0 p->tempBuf[rem++] = src[lookAhead++];
11523 0 p->tempBufSize = rem;
11524 0 ▶ if (rem < LZMA_REQUIRED_INPUT_MAX || checkEndMarkNow)
Branch: 2 branches
BranchTrueFalseTotal
if (rem < LZMA_REQUIRED_INPUT_MAX || checkEndMarkNow) 0 0 0
if (rem < LZMA_REQUIRED_INPUT_MAX || checkEndMarkNow) 0 0 0
11525 {
11526 0 int dummyRes = LzmaDec_TryDummy(p, p->tempBuf, rem);
11527 0 ▶ if (dummyRes == DUMMY_ERROR)
Branch: 1 branch
BranchTrueFalseTotal
if (dummyRes == DUMMY_ERROR) 0 0 0
11528 {
11529 0 (*srcLen) += lookAhead;
11530 0 *status = LZMA_STATUS_NEEDS_MORE_INPUT;
11531 0 return SZ_OK;
11532 }
11533 0 ▶ if (checkEndMarkNow && dummyRes != DUMMY_MATCH)
Branch: 2 branches
BranchTrueFalseTotal
if (checkEndMarkNow && dummyRes != DUMMY_MATCH) 0 0 0
if (checkEndMarkNow && dummyRes != DUMMY_MATCH) 0 0 0
11534 {
11535 0 *status = LZMA_STATUS_NOT_FINISHED;
11536 0 return SZ_ERROR_DATA;
11537 }
11538 }
11539 0 p->buf = p->tempBuf;
11540 0 ▶ if (LzmaDec_DecodeReal2(p, dicLimit, p->buf) != 0)
Branch: 1 branch
BranchTrueFalseTotal
if (LzmaDec_DecodeReal2(p, dicLimit, p->buf) != 0) 0 0 0
11541 0 return SZ_ERROR_DATA;
11542 0 lookAhead -= (rem - (unsigned)(p->buf - p->tempBuf));
11543 0 (*srcLen) += lookAhead;
11544 0 src += lookAhead;
11545 0 inSize -= lookAhead;
11546 0 p->tempBufSize = 0;
11547 }
11548 }
11549 0 ▶ if (p->code == 0)
Branch: 1 branch
BranchTrueFalseTotal
if (p->code == 0) 0 0 0
11550 0 *status = LZMA_STATUS_FINISHED_WITH_MARK;
11551 0 return (p->code == 0) ? SZ_OK : SZ_ERROR_DATA;
11552 }
11553  
11554 0 SRes LzmaDec_DecodeToBuf(CLzmaDec *p, uint8_t *dest, size_t *destLen, const uint8_t *src, size_t *srcLen, ELzmaFinishMode finishMode, ELzmaStatus *status)
11555 {
11556 0 size_t outSize = *destLen;
11557 0 size_t inSize = *srcLen;
11558 0 *srcLen = *destLen = 0;
11559 for (;;)
11560 {
11561 0 size_t inSizeCur = inSize, outSizeCur, dicPos;
11562 ELzmaFinishMode curFinishMode;
11563 SRes res;
11564 0 ▶ if (p->dicPos == p->dicBufSize)
Branch: 1 branch
BranchTrueFalseTotal
if (p->dicPos == p->dicBufSize) 0 0 0
11565 0 p->dicPos = 0;
11566 0 dicPos = p->dicPos;
11567 0 ▶ if (outSize > p->dicBufSize - dicPos)
Branch: 1 branch
BranchTrueFalseTotal
if (outSize > p->dicBufSize - dicPos) 0 0 0
11568 {
11569 0 outSizeCur = p->dicBufSize;
11570 0 curFinishMode = LZMA_FINISH_ANY;
11571 }
11572 else
11573 {
11574 0 outSizeCur = dicPos + outSize;
11575 0 curFinishMode = finishMode;
11576 }
11577  
11578 0 res = LzmaDec_DecodeToDic(p, outSizeCur, src, &inSizeCur, curFinishMode, status);
11579 0 src += inSizeCur;
11580 0 inSize -= inSizeCur;
11581 0 *srcLen += inSizeCur;
11582 0 outSizeCur = p->dicPos - dicPos;
11583 0 memcpy(dest, p->dic + dicPos, outSizeCur);
11584 0 dest += outSizeCur;
11585 0 outSize -= outSizeCur;
11586 0 *destLen += outSizeCur;
11587 0 ▶ if (res != 0)
Branch: 1 branch
BranchTrueFalseTotal
if (res != 0) 0 0 0
11588 0 return res;
11589 0 ▶ if (outSizeCur == 0 || outSize == 0)
Branch: 2 branches
BranchTrueFalseTotal
if (outSizeCur == 0 || outSize == 0) 0 0 0
if (outSizeCur == 0 || outSize == 0) 0 0 0
11590 0 return SZ_OK;
11591 0 }
11592 }
11593  
11594 8 void LzmaDec_FreeProbs(CLzmaDec *p, ISzAlloc *alloc)
11595 {
11596 8 alloc->Free(alloc, p->probs);
11597 8 p->probs = 0;
11598 8 }
11599  
11600 0 static void LzmaDec_FreeDict(CLzmaDec *p, ISzAlloc *alloc)
11601 {
11602 0 alloc->Free(alloc, p->dic);
11603 0 p->dic = 0;
11604 0 }
11605  
11606 0 void LzmaDec_Free(CLzmaDec *p, ISzAlloc *alloc)
11607 {
11608 0 LzmaDec_FreeProbs(p, alloc);
11609 0 LzmaDec_FreeDict(p, alloc);
11610 0 }
11611  
11612 4 SRes LzmaProps_Decode(CLzmaProps *p, const uint8_t *data, unsigned size)
11613 {
11614 uint32_t dicSize;
11615 uint8_t d;
11616
11617 4 ▶ if (size < LZMA_PROPS_SIZE)
Branch: 1 branch
BranchTrueFalseTotal
if (size < LZMA_PROPS_SIZE) 0 4 4
11618 0 return SZ_ERROR_UNSUPPORTED;
11619 else
11620 4 dicSize = data[1] | ((uint32_t)data[2] << 8) | ((uint32_t)data[3] << 16) | ((uint32_t)data[4] << 24);
11621
11622 4 ▶ if (dicSize < LZMA_DIC_MIN)
Branch: 1 branch
BranchTrueFalseTotal
if (dicSize < LZMA_DIC_MIN) 0 4 4
11623 0 dicSize = LZMA_DIC_MIN;
11624 4 p->dicSize = dicSize;
11625  
11626 4 d = data[0];
11627 4 ▶ if (d >= (9 * 5 * 5))
Branch: 1 branch
BranchTrueFalseTotal
if (d >= (9 * 5 * 5)) 0 4 4
11628 0 return SZ_ERROR_UNSUPPORTED;
11629  
11630 4 p->lc = d % 9;
11631 4 d /= 9;
11632 4 p->pb = d / 5;
11633 4 p->lp = d % 5;
11634  
11635 4 return SZ_OK;
11636 }
11637  
11638 4 static SRes LzmaDec_AllocateProbs2(CLzmaDec *p, const CLzmaProps *propNew, ISzAlloc *alloc)
11639 {
11640 4 uint32_t numProbs = LzmaProps_GetNumProbs(propNew);
11641 4 ▶ if (p->probs == 0 || numProbs != p->numProbs)
Branch: 2 branches
BranchTrueFalseTotal
if (p->probs == 0 || numProbs != p->numProbs) 0 4 4
if (p->probs == 0 || numProbs != p->numProbs) 0 0 0
11642 {
11643 4 LzmaDec_FreeProbs(p, alloc);
11644 4 p->probs = (CLzmaProb *)alloc->Alloc(alloc, numProbs * sizeof(CLzmaProb));
11645 4 p->numProbs = numProbs;
11646 4 ▶ if (p->probs == 0)
Branch: 1 branch
BranchTrueFalseTotal
if (p->probs == 0) 0 4 4
11647 0 return SZ_ERROR_MEM;
11648 }
11649 4 return SZ_OK;
11650 }
11651  
11652 4 SRes LzmaDec_AllocateProbs(CLzmaDec *p, const uint8_t *props, unsigned propsSize, ISzAlloc *alloc)
11653 {
11654 CLzmaProps propNew;
11655 4 ▶ RINOK(LzmaProps_Decode(&propNew, props, propsSize));
Branch: 1 branch
BranchTrueFalseTotal
RINOK(LzmaProps_Decode(&propNew, props, propsSize)); 0 4 4
11656 4 ▶ RINOK(LzmaDec_AllocateProbs2(p, &propNew, alloc));
Branch: 2 branches
BranchTrueFalseTotal
RINOK(LzmaDec_AllocateProbs2(p, &propNew, alloc)); 4 0 4
RINOK(LzmaDec_AllocateProbs2(p, &propNew, alloc)); 0 4 4
11657 4 p->prop = propNew;
11658 4 return SZ_OK;
11659 }
11660  
11661 0 SRes LzmaDec_Allocate(CLzmaDec *p, const uint8_t *props, unsigned propsSize, ISzAlloc *alloc)
11662 {
11663 CLzmaProps propNew;
11664 size_t dicBufSize;
11665 0 ▶ RINOK(LzmaProps_Decode(&propNew, props, propsSize));
Branch: 1 branch
BranchTrueFalseTotal
RINOK(LzmaProps_Decode(&propNew, props, propsSize)); 0 0 0
11666 0 ▶ RINOK(LzmaDec_AllocateProbs2(p, &propNew, alloc));
Branch: 2 branches
BranchTrueFalseTotal
RINOK(LzmaDec_AllocateProbs2(p, &propNew, alloc)); 0 0 0
RINOK(LzmaDec_AllocateProbs2(p, &propNew, alloc)); 0 0 0
11667 0 dicBufSize = propNew.dicSize;
11668 0 ▶ if (p->dic == 0 || dicBufSize != p->dicBufSize)
Branch: 2 branches
BranchTrueFalseTotal
if (p->dic == 0 || dicBufSize != p->dicBufSize) 0 0 0
if (p->dic == 0 || dicBufSize != p->dicBufSize) 0 0 0
11669 {
11670 0 ▶ LzmaDec_FreeDict(p, alloc);
Branch: 1 branch
BranchTrueFalseTotal
LzmaDec_FreeDict(p, alloc); 0 0 0
11671 0 ▶ p->dic = (uint8_t *)alloc->Alloc(alloc, dicBufSize);
Branch: 1 branch
BranchTrueFalseTotal
p->dic = (uint8_t *)alloc->Alloc(alloc, dicBufSize); 0 0 0
11672 0 ▶ if (p->dic == 0)
Branch: 1 branch
BranchTrueFalseTotal
if (p->dic == 0) 0 0 0
11673 {
11674 0 ▶ LzmaDec_FreeProbs(p, alloc);
Branch: 1 branch
BranchTrueFalseTotal
LzmaDec_FreeProbs(p, alloc); 0 0 0
11675 0 return SZ_ERROR_MEM;
11676 }
11677 }
11678 0 p->dicBufSize = dicBufSize;
11679 0 p->prop = propNew;
11680 0 return SZ_OK;
11681 }
11682  
11683 4 SRes LzmaDecode(uint8_t *dest, size_t *destLen, const uint8_t *src, size_t *srcLen,
11684 const uint8_t *propData, unsigned propSize, ELzmaFinishMode finishMode,
11685 ELzmaStatus *status, ISzAlloc *alloc)
11686 {
11687 CLzmaDec p;
11688 SRes res;
11689 4 size_t inSize = *srcLen;
11690 4 size_t outSize = *destLen;
11691 4 *srcLen = *destLen = 0;
11692 4 ▶ if (inSize < RC_INIT_SIZE)
Branch: 1 branch
BranchTrueFalseTotal
if (inSize < RC_INIT_SIZE) 0 4 4
11693 0 return SZ_ERROR_INPUT_EOF;
11694  
11695 4 LzmaDec_Construct(&p);
11696 4 ▶ res = LzmaDec_AllocateProbs(&p, propData, propSize, alloc);
Branch: 1 branch
BranchTrueFalseTotal
res = LzmaDec_AllocateProbs(&p, propData, propSize, alloc); 4 0 4
11697 4 ▶ if (res != 0)
Branch: 1 branch
BranchTrueFalseTotal
if (res != 0) 0 4 4
11698 0 return res;
11699 4 p.dic = dest;
11700 4 p.dicBufSize = outSize;
11701  
11702 4 LzmaDec_Init(&p);
11703
11704 4 *srcLen = inSize;
11705 4 res = LzmaDec_DecodeToDic(&p, outSize, src, srcLen, finishMode, status);
11706  
11707 4 ▶ if (res == SZ_OK && *status == LZMA_STATUS_NEEDS_MORE_INPUT)
Branch: 2 branches
BranchTrueFalseTotal
if (res == SZ_OK && *status == LZMA_STATUS_NEEDS_MORE_INPUT) 4 0 4
if (res == SZ_OK && *status == LZMA_STATUS_NEEDS_MORE_INPUT) 0 4 4
11708 0 res = SZ_ERROR_INPUT_EOF;
11709  
11710 4 (*destLen) = p.dicPos;
11711 4 ▶ LzmaDec_FreeProbs(&p, alloc);
Branch: 1 branch
BranchTrueFalseTotal
LzmaDec_FreeProbs(&p, alloc); 4 0 4
11712 4 return res;
11713 }
11714  
11715 } // namespace lzma
11716 // End of LZMA compression library by Igor Pavlov
11717  
11718 #ifndef UFAL_CPPUTILS_COMPRESSOR_LZMA_ALLOCATOR_H
11719 #define UFAL_CPPUTILS_COMPRESSOR_LZMA_ALLOCATOR_H
11720 4 static void *LzmaAlloc(void* /*p*/, size_t size) { return new char[size]; }
11721 8 ▶static void LzmaFree(void* /*p*/, void *address) { delete[] (char*) address; }
Branch: 1 branch
BranchTrueFalseTotal
static void LzmaFree(void* /*p*/, void *address) { delete[] (char*) address; } 4 4 8
11722 static lzma::ISzAlloc lzmaAllocator = { LzmaAlloc, LzmaFree };
11723 #endif // UFAL_CPPUTILS_COMPRESSOR_LZMA_ALLOCATOR_H
11724  
11725 4 bool compressor::load(istream& is, binary_decoder& data) {
11726 uint32_t uncompressed_len, compressed_len, poor_crc;
11727 unsigned char props_encoded[LZMA_PROPS_SIZE];
11728  
11729 4 ▶ if (!is.read((char *) &uncompressed_len, sizeof(uncompressed_len))) return false;
Branch: 3 branches
BranchTrueFalseTotal
if (!is.read((char *) &uncompressed_len, sizeof(uncompressed_len))) return false; 4 0 4
if (!is.read((char *) &uncompressed_len, sizeof(uncompressed_len))) return false; 4 0 4
if (!is.read((char *) &uncompressed_len, sizeof(uncompressed_len))) return false; 0 4 4
11730 4 ▶ if (!is.read((char *) &compressed_len, sizeof(compressed_len))) return false;
Branch: 3 branches
BranchTrueFalseTotal
if (!is.read((char *) &compressed_len, sizeof(compressed_len))) return false; 4 0 4
if (!is.read((char *) &compressed_len, sizeof(compressed_len))) return false; 4 0 4
if (!is.read((char *) &compressed_len, sizeof(compressed_len))) return false; 0 4 4
11731 4 ▶ if (!is.read((char *) &poor_crc, sizeof(poor_crc))) return false;
Branch: 3 branches
BranchTrueFalseTotal
if (!is.read((char *) &poor_crc, sizeof(poor_crc))) return false; 4 0 4
if (!is.read((char *) &poor_crc, sizeof(poor_crc))) return false; 4 0 4
if (!is.read((char *) &poor_crc, sizeof(poor_crc))) return false; 0 4 4
11732 4 ▶ if (poor_crc != uncompressed_len * 19991 + compressed_len * 199999991 + 1234567890) return false;
Branch: 1 branch
BranchTrueFalseTotal
if (poor_crc != uncompressed_len * 19991 + compressed_len * 199999991 + 1234567890) return false; 0 4 4
11733 4 ▶ if (!is.read((char *) props_encoded, sizeof(props_encoded))) return false;
Branch: 3 branches
BranchTrueFalseTotal
if (!is.read((char *) props_encoded, sizeof(props_encoded))) return false; 4 0 4
if (!is.read((char *) props_encoded, sizeof(props_encoded))) return false; 4 0 4
if (!is.read((char *) props_encoded, sizeof(props_encoded))) return false; 0 4 4
11734  
11735 4 ▶ vector<unsigned char> compressed(compressed_len);
Branch: 1 branch
BranchTrueFalseTotal
vector<unsigned char> compressed(compressed_len); 4 0 4
11736 4 ▶ if (!is.read((char *) compressed.data(), compressed_len)) return false;
Branch: 3 branches
BranchTrueFalseTotal
if (!is.read((char *) compressed.data(), compressed_len)) return false; 4 0 4
if (!is.read((char *) compressed.data(), compressed_len)) return false; 4 0 4
if (!is.read((char *) compressed.data(), compressed_len)) return false; 0 4 4
11737  
11738 lzma::ELzmaStatus status;
11739 4 size_t uncompressed_size = uncompressed_len, compressed_size = compressed_len;
11740 4 ▶ auto res = lzma::LzmaDecode(data.fill(uncompressed_len), &uncompressed_size, compressed.data(), &compressed_size, props_encoded, LZMA_PROPS_SIZE, lzma::LZMA_FINISH_ANY, &status, &lzmaAllocator);
Branch: 2 branches
BranchTrueFalseTotal
auto res = lzma::LzmaDecode(data.fill(uncompressed_len), &uncompressed_size, compressed.data(), &compressed_size, props_encoded, LZMA_PROPS_SIZE, lzma::LZMA_FINISH_ANY, &status, &lzmaAllocator); 4 0 4
auto res = lzma::LzmaDecode(data.fill(uncompressed_len), &uncompressed_size, compressed.data(), &compressed_size, props_encoded, LZMA_PROPS_SIZE, lzma::LZMA_FINISH_ANY, &status, &lzmaAllocator); 4 0 4
11741 4 ▶ if (res != SZ_OK || uncompressed_size != uncompressed_len || compressed_size != compressed_len) return false;
Branch: 3 branches
BranchTrueFalseTotal
if (res != SZ_OK || uncompressed_size != uncompressed_len || compressed_size != compressed_len) return false; 4 0 4
if (res != SZ_OK || uncompressed_size != uncompressed_len || compressed_size != compressed_len) return false; 4 0 4
if (res != SZ_OK || uncompressed_size != uncompressed_len || compressed_size != compressed_len) return false; 0 4 4
11742  
11743 4 return true;
11744 4 }
11745  
11746 } // namespace utils
11747  
11748 /////////
11749 // File: version/version.h
11750 /////////
11751  
11752 // This file is part of MorphoDiTa <http://github.com/ufal/morphodita/>.
11753 //
11754 // Copyright 2015 Institute of Formal and Applied Linguistics, Faculty of
11755 // Mathematics and Physics, Charles University in Prague, Czech Republic.
11756 //
11757 // This Source Code Form is subject to the terms of the Mozilla Public
11758 // License, v. 2.0. If a copy of the MPL was not distributed with this
11759 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
11760  
11761 class version {
11762 public:
11763 unsigned major;
11764 unsigned minor;
11765 unsigned patch;
11766 string prerelease;
11767  
11768 // Returns current MorphoDiTa version.
11769 static version current();
11770  
11771 // Returns multi-line formated version and copyright string.
11772 static string version_and_copyright(const string& other_libraries = string());
11773 };
11774  
11775 /////////
11776 // File: version/version.cpp
11777 /////////
11778  
11779 // This file is part of MorphoDiTa <http://github.com/ufal/morphodita/>.
11780 //
11781 // Copyright 2015 Institute of Formal and Applied Linguistics, Faculty of
11782 // Mathematics and Physics, Charles University in Prague, Czech Republic.
11783 //
11784 // This Source Code Form is subject to the terms of the Mozilla Public
11785 // License, v. 2.0. If a copy of the MPL was not distributed with this
11786 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
11787  
11788 0 version version::current() {
11789 0 return {1, 11, 3, ""};
11790 0 ▶}
Branch: 1 branch
BranchTrueFalseTotal
} 0 0 0
11791  
11792 // Returns multi-line formated version and copyright string.
11793 0 string version::version_and_copyright(const string& other_libraries) {
11794 0 ▶ ostringstream info;
Branch: 1 branch
BranchTrueFalseTotal
ostringstream info; 0 0 0
11795  
11796 0 ▶ auto morphodita = version::current();
Branch: 1 branch
BranchTrueFalseTotal
auto morphodita = version::current(); 0 0 0
11797 0 ▶ auto unilib = unilib::version::current();
Branch: 1 branch
BranchTrueFalseTotal
auto unilib = unilib::version::current(); 0 0 0
11798  
11799 0 ▶ info << "MorphoDiTa version " << morphodita.major << '.' << morphodita.minor << '.' << morphodita.patch
Branch: 6 branches
BranchTrueFalseTotal
info << "MorphoDiTa version " << morphodita.major << '.' << morphodita.minor << '.' << morphodita.patch 0 0 0
info << "MorphoDiTa version " << morphodita.major << '.' << morphodita.minor << '.' << morphodita.patch 0 0 0
info << "MorphoDiTa version " << morphodita.major << '.' << morphodita.minor << '.' << morphodita.patch 0 0 0
info << "MorphoDiTa version " << morphodita.major << '.' << morphodita.minor << '.' << morphodita.patch 0 0 0
info << "MorphoDiTa version " << morphodita.major << '.' << morphodita.minor << '.' << morphodita.patch 0 0 0
info << "MorphoDiTa version " << morphodita.major << '.' << morphodita.minor << '.' << morphodita.patch 0 0 0
11800 0 << (morphodita.prerelease.empty() ? "" : "-") << morphodita.prerelease
11801 0 ▶ << " (using UniLib " << unilib.major << '.' << unilib.minor << '.' << unilib.patch
Branch: 9 branches
BranchTrueFalseTotal
<< " (using UniLib " << unilib.major << '.' << unilib.minor << '.' << unilib.patch 0 0 0
<< " (using UniLib " << unilib.major << '.' << unilib.minor << '.' << unilib.patch 0 0 0
<< " (using UniLib " << unilib.major << '.' << unilib.minor << '.' << unilib.patch 0 0 0
<< " (using UniLib " << unilib.major << '.' << unilib.minor << '.' << unilib.patch 0 0 0
<< " (using UniLib " << unilib.major << '.' << unilib.minor << '.' << unilib.patch 0 0 0
<< " (using UniLib " << unilib.major << '.' << unilib.minor << '.' << unilib.patch 0 0 0
<< " (using UniLib " << unilib.major << '.' << unilib.minor << '.' << unilib.patch 0 0 0
<< " (using UniLib " << unilib.major << '.' << unilib.minor << '.' << unilib.patch 0 0 0
<< " (using UniLib " << unilib.major << '.' << unilib.minor << '.' << unilib.patch 0 0 0
11802 0 << (other_libraries.empty() ? "" : " and ") << other_libraries << ")\n"
11803 "Copyright 2015 by Institute of Formal and Applied Linguistics, Faculty of\n"
11804 0 ▶ "Mathematics and Physics, Charles University in Prague, Czech Republic.";
Branch: 4 branches
BranchTrueFalseTotal
"Mathematics and Physics, Charles University in Prague, Czech Republic."; 0 0 0
"Mathematics and Physics, Charles University in Prague, Czech Republic."; 0 0 0
"Mathematics and Physics, Charles University in Prague, Czech Republic."; 0 0 0
"Mathematics and Physics, Charles University in Prague, Czech Republic."; 0 0 0
11805  
11806 0 ▶ return info.str();
Branch: 1 branch
BranchTrueFalseTotal
return info.str(); 0 0 0
11807 0 }
11808  
11809 } // namespace morphodita
11810 } // namespace ufal
« lib/Ufal/MorphoDiTa.c ↑ Summary