src/training/unicharset/validate_grapheme.cpp
bool ValidateGrapheme::IsBadlyFormedIndicVowel(char32 prev_ch, char32 ch) {
  return ((prev_ch == 0x905 && (ch == 0x946 || ch == 0x93E)) || (prev_ch == 0x909 && ch == 0x941) ||
          (prev_ch == 0x90F && (ch >= 0x945 && ch <= 0x947)) ||
          (prev_ch == 0x905 && (ch >= 0x949 && ch <= 0x94C)) ||
          (prev_ch == 0x906 && (ch >= 0x949 && ch <= 0x94C)) ||
          // Illegal combinations of two dependent Devanagari vowels.
          (prev_ch == 0x93E && (ch >= 0x945 && ch <= 0x948)) ||
          // Dependent Devanagari vowels following a virama.
          (prev_ch == 0x94D && (ch >= 0x93E && ch <= 0x94C)) ||
          // Bengali vowels (Table 9-5, pg 313)
          (prev_ch == 0x985 && ch == 0x9BE) ||
          // Telugu vowels (Table 9-19, pg 331)
          (prev_ch == 0xC12 && (ch == 0xC55 || ch == 0xC4C)) ||
          // Kannada vowels (Table 9-20, pg 332)
          (prev_ch == 0xC92 && ch == 0xCCC));
}
// Helper returns true if the sequence prev_ch,ch is an invalid Indic vowel.
// Some vowels in Indic scripts may be analytically decomposed into atomic pairs
// of components that are themselves valid unicode symbols. (See Table 12-1 in
// http://www.unicode.org/versions/Unicode9.0.0/ch12.pdf
// for examples in Devanagari). The Unicode standard discourages specifying
// vowels this way, but they are sometimes encountered in text, probably because
// some editors still permit it. Renderers however dislike such pairs, and so
// this function may be used to detect their occurrence for removal.
// TODO(rays) This function only covers a subset of Indic languages and doesn't
// include all rules. Add rules as appropriate to support other languages or
// find a way to generalize these existing rules that makes use of the
// regularity of the mapping from ISCII to Unicode.
/* static */
Helper returns true if the sequence prev_ch,ch is an invalid Indic vowel.
Some vowels in Indic scripts may be analytically decomposed into atomic pairs
of components that are themselves valid unicode symbols.
Helper returns true if the sequence prev_ch ch is an invalid Indic vowel . Some vowels in Indic scripts may be analytically decomposed into atomic pairs of components that are themselves valid unicode symbols .
bool ValidateGrapheme::IsBadlyFormedIndicVowel(char32 prev_ch, char32 ch) {
  return ((prev_ch == 0x905 && (ch == 0x946 || ch == 0x93E)) || (prev_ch == 0x909 && ch == 0x941) ||
          (prev_ch == 0x90F && (ch >= 0x945 && ch <= 0x947)) ||
          (prev_ch == 0x905 && (ch >= 0x949 && ch <= 0x94C)) ||
          (prev_ch == 0x906 && (ch >= 0x949 && ch <= 0x94C)) ||
          (prev_ch == 0x93E && (ch >= 0x945 && ch <= 0x948)) ||
          (prev_ch == 0x94D && (ch >= 0x93E && ch <= 0x94C)) ||
          (prev_ch == 0x985 && ch == 0x9BE) ||
          (prev_ch == 0xC12 && (ch == 0xC55 || ch == 0xC4C)) ||
          (prev_ch == 0xC92 && ch == 0xCCC));
}
bool ValidateGrapheme :: IsBadlyFormedIndicVowel ( char32 prev_ch , char32 ch ) { return ( ( prev_ch == 0x905 && ( ch == 0x946 || ch == 0x93E ) ) || ( prev_ch == 0x909 && ch == 0x941 ) || ( prev_ch == 0x90F && ( ch >= 0x945 && ch <= 0x947 ) ) || ( prev_ch == 0x905 && ( ch >= 0x949 && ch <= 0x94C ) ) || ( prev_ch == 0x906 && ( ch >= 0x949 && ch <= 0x94C ) ) || ( prev_ch == 0x93E && ( ch >= 0x945 && ch <= 0x948 ) ) || ( prev_ch == 0x94D && ( ch >= 0x93E && ch <= 0x94C ) ) || ( prev_ch == 0x985 && ch == 0x9BE ) || ( prev_ch == 0xC12 && ( ch == 0xC55 || ch == 0xC4C ) ) || ( prev_ch == 0xC92 && ch == 0xCCC ) ) ; }
Helper returns true if the sequence prev_ch,ch is an invalid Indic vowel.
Helper returns true if the sequence prev_ch ch is an invalid Indic vowel .
// Illegal combinations of two dependent Devanagari vowels. // Dependent Devanagari vowels following a virama. // Bengali vowels (Table 9-5, pg 313) // Telugu vowels (Table 9-19, pg 331) // Kannada vowels (Table 9-20, pg 332)