protected IWord getNextLatinWord ( int c , int pos ) throws IOException { /* * clear or just return the English punctuation as * a single word with PUNCTUATION type and part of speech */ if ( StringUtil . isEnPunctuation ( c ) ) { String str = String . valueOf ( ( char ) c ) ; if ( config . CLEAR_STOPWORD && dic . match ( ILexicon . STOP_WORD , str ) ) { return null ; } IWord w = new Word ( str , IWord . T_PUNCTUATION ) ; w . setPosition ( pos ) ; w . setPartSpeech ( IWord . PUNCTUATION ) ; return w ; } IWord w = nextLatinWord ( c , pos ) ; w . setPosition ( pos ) ; /* @added: 2013-12-16 * check and do the secondary segmentation work. * This will split 'qq2013' to 'qq, 2013'. */ if ( config . EN_SECOND_SEG && ( ctrlMask & ISegment . START_SS_MASK ) != 0 ) { enSecondSeg ( w , false ) ; } if ( config . CLEAR_STOPWORD && dic . match ( ILexicon . STOP_WORD , w . getValue ( ) ) ) { w = null ; //Let gc do its work return null ; } if ( config . APPEND_CJK_SYN ) { appendLatinSyn ( w ) ; } return w ; }
get the next Latin word from the current position of the input stream