26 static const int kMinAbsoluteGarbageWordLength = 10;
27 static const float kMinAbsoluteGarbageAlphanumFrac = 0.5f;
50 for (x = 0; x < word.
length(); ++x) {
60 if (state == -1)
return false;
67 if (word.
length() < kMinAbsoluteGarbageWordLength)
return false;
69 for (
int x = 0; x < word.
length(); ++x) {
73 return (
static_cast<float>(num_alphanum) /
74 static_cast<float>(word.
length()) < kMinAbsoluteGarbageAlphanumFrac);
const int case_state_table[6][4]
const UNICHARSET * unicharset() const
UNICHAR_ID unichar_id(int index) const
bool get_isupper(UNICHAR_ID unichar_id) const
bool get_isalpha(UNICHAR_ID unichar_id) const
bool get_isdigit(UNICHAR_ID unichar_id) const
bool get_islower(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)