25static const int kMinAbsoluteGarbageWordLength = 10;
26static const float kMinAbsoluteGarbageAlphanumFrac = 0.5f;
48 for (
unsigned x = 0;
x < word.
length(); ++
x) {
67 if (word.
length() < kMinAbsoluteGarbageWordLength) {
71 for (
unsigned x = 0;
x < word.
length(); ++
x) {
75 return (
static_cast<float>(num_alphanum) /
static_cast<float>(word.
length()) <
76 kMinAbsoluteGarbageAlphanumFrac);
const int case_state_table[6][4]
UNICHAR_ID unichar_id(unsigned index) const
const UNICHARSET * unicharset() const
bool get_isalpha(UNICHAR_ID unichar_id) const
bool get_islower(UNICHAR_ID unichar_id) const
bool get_isupper(UNICHAR_ID unichar_id) const
bool get_isdigit(UNICHAR_ID unichar_id) const
int case_ok(const WERD_CHOICE &word) const
Check a string to see if it matches a set of lexical rules.
bool absolute_garbage(const WERD_CHOICE &word, const UNICHARSET &unicharset)