#include "ratngs.h"
#include <algorithm>
#include <string>
#include "blobs.h"
#include "callcpp.h"
#include "genericvector.h"
#include "matrix.h"
#include "normalis.h"
#include "unicharset.h"
Go to the source code of this file.
◆ EqualIgnoringCaseAndTerminalPunct()
Definition at line 809 of file ratngs.cpp.
810 {
812 if (word2.
unicharset() != uchset)
return false;
813 int w1start, w1end;
815 int w2start, w2end;
817 if (w1end - w1start != w2end - w2start) return false;
818 for (int i = 0; i < w1end - w1start; i++) {
821 return false;
822 }
823 }
824 return true;
825}
void punct_stripped(int *start_core, int *end_core) const
UNICHAR_ID unichar_id(int index) const
const UNICHARSET * unicharset() const
UNICHAR_ID to_lower(UNICHAR_ID unichar_id) const
◆ FindMatchingChoice()
Definition at line 184 of file ratngs.cpp.
185 {
186
187 BLOB_CHOICE_IT choice_it(bc_list);
188 for (choice_it.mark_cycle_pt(); !choice_it.cycled_list();
189 choice_it.forward()) {
192 return choice;
193 }
194 }
195 return nullptr;
196}
UNICHAR_ID unichar_id() const
◆ print_ratings_list()
void print_ratings_list |
( |
const char * |
msg, |
|
|
BLOB_CHOICE_LIST * |
ratings, |
|
|
const UNICHARSET & |
current_unicharset |
|
) |
| |
print_ratings_list
Send all the ratings out to the logfile.
- Parameters
-
msg | intro message |
ratings | list of ratings |
current_unicharset | unicharset that can be used for id-to-unichar conversion |
Definition at line 837 of file ratngs.cpp.
839 {
840 if (ratings->length() == 0) {
842 return;
843 }
844 if (*msg != '\0') {
846 }
847 BLOB_CHOICE_IT c_it;
848 c_it.set_to_list(ratings);
849 for (c_it.mark_cycle_pt(); !c_it.cycled_list(); c_it.forward()) {
850 c_it.data()->print(¤t_unicharset);
851 if (!c_it.at_last())
tprintf(
"\n");
852 }
854 fflush(stdout);
855}
DLLSYM void tprintf(const char *format,...)
◆ kMaxBaselineDrift
const double kMaxBaselineDrift = 0.0625 |
◆ kMaxDropCapBottom
const int kMaxDropCapBottom = -128 |
◆ kMaxOverlapDenominator
const double kMaxOverlapDenominator = 0.125 |
◆ kMinSubscriptOffset
const int kMinSubscriptOffset = 20 |
◆ kMinSuperscriptOffset
const int kMinSuperscriptOffset = 20 |
◆ kMinXHeightMatch
const double kMinXHeightMatch = 0.5 |