/****************************************************************/ /********************** nextWordValid ***************************/ /****************************************************************/ private Boolean nextWordValid(int beginPos, String text) { int pos = beginPos + 1; int status; if (beginPos == text.Length) { return(true); } else if (text[beginPos] <= '~') { //Englurish alphabets/digits/special characters return(true); } else { while (pos <= text.Length) { status = dict.contains(text.Substring(beginPos, (pos - beginPos))); if (status == 1) { return(true); } else if (status == 0) { pos++; } else { break; } } } return(false); }