32 static const int kMinAbsoluteGarbageWordLength = 10;
33 static const float kMinAbsoluteGarbageAlphanumFrac = 0.5f;
55 for (x = 0; x < word.
length(); ++x) {
65 if (state == -1)
return false;
72 if (word.
length() < kMinAbsoluteGarbageWordLength)
return false;
74 for (
int x = 0; x < word.
length(); ++x) {
78 return (static_cast<float>(num_alphanum) /
79 static_cast<float>(word.
length()) < kMinAbsoluteGarbageAlphanumFrac);
int case_ok(const WERD_CHOICE &word, const UNICHARSET &unicharset) const
Check a string to see if it matches a set of lexical rules.
bool get_islower(UNICHAR_ID unichar_id) const
const int case_state_table[6][4]
bool get_isalpha(UNICHAR_ID unichar_id) const
bool get_isdigit(UNICHAR_ID unichar_id) const
UNICHAR_ID unichar_id(int index) const
bool absolute_garbage(const WERD_CHOICE &word, const UNICHARSET &unicharset)
bool get_isupper(UNICHAR_ID unichar_id) const