protected IWord getNextPunctuationPairWord ( int c , int pos ) throws IOException { IWord w = null , w2 = null ; String text = getPairPunctuationText ( c ) ; //handle the punctuation. String str = String . valueOf ( ( char ) c ) ; if ( ! ( config . CLEAR_STOPWORD && dic . match ( ILexicon . STOP_WORD , str ) ) ) { w = new Word ( str , IWord . T_PUNCTUATION ) ; w . setPartSpeech ( IWord . PUNCTUATION ) ; w . setPosition ( pos ) ; } //handle the pair text. if ( text != null && text . length ( ) > 0 && ! ( config . CLEAR_STOPWORD && dic . match ( ILexicon . STOP_WORD , text ) ) ) { w2 = new Word ( text , ILexicon . CJK_WORD ) ; w2 . setPartSpeech ( IWord . PPT_POSPEECH ) ; w2 . setPosition ( pos + 1 ) ; if ( w == null ) w = w2 ; else wordPool . add ( w2 ) ; } /* here: * 1. the punctuation is clear. * 2. the pair text is null or being cleared. * @date 2013-09-06 */ if ( w == null && w2 == null ) { return null ; } return w ; }
get the next punctuation pair word from the current position of the input stream .