private void parseSecondaryVowel ( ) { if ( ! validViSyll ) return ; // get the current and next character in the syllable string char curChar , nextChar ; if ( iCurPos > strSyllable . length ( ) - 1 ) { validViSyll = false ; return ; } curChar = strSyllable . charAt ( iCurPos ) ; if ( iCurPos == strSyllable . length ( ) - 1 ) nextChar = ' ' ; else nextChar = strSyllable . charAt ( iCurPos + 1 ) ; // get the tone and the original vowel (without tone) TONE tone = TONE . NO_TONE ; int idx1 = vnVowels . indexOf ( curChar ) ; int idx2 = vnVowels . indexOf ( nextChar ) ; if ( idx1 == - 1 ) return ; // current char is not a vowel tone = TONE . getTone ( idx1 % 6 ) ; curChar = vnVowels . charAt ( ( idx1 / 6 ) * 6 ) ; if ( idx2 == - 1 ) { // next char is not a vowel strSecondaryVowel = ZERO ; return ; } nextChar = vnVowels . charAt ( ( idx2 / 6 ) * 6 ) ; if ( tone . getValue ( ) == TONE . NO_TONE . getValue ( ) ) tone = TONE . getTone ( idx2 % 6 ) ; // Check the secondary vowel if ( curChar == ' ' ) { if ( nextChar == ' ' || nextChar == ' ' ) { strSecondaryVowel += curChar ; iCurPos ++ ; } else strSecondaryVowel = ZERO ; // oo return ; } else if ( curChar == ' ' ) { if ( nextChar != ' ' && nextChar != ' ' ) { strSecondaryVowel += curChar ; iCurPos ++ ; } else strSecondaryVowel = ZERO ; return ; } }
Parses the secondary vowel .