called for the first prefix, other prefixes returned as delimiters by GetDelimiter()
| 177 | } |
| 178 | //! called for the first prefix, other prefixes returned as delimiters by GetDelimiter() |
| 179 | void GetPrefix(TWideToken& tok) const { |
| 180 | Y_ASSERT(Tokens.empty()); // Next() must NOT be called |
| 181 | if (Subtokens.empty() || Subtokens[0].PrefixLen == 0) { |
| 182 | tok.Leng = 0; |
| 183 | tok.SubTokens.clear(); |
| 184 | } else { |
| 185 | tok.Token = Tok.Token; |
| 186 | tok.Leng = Subtokens[0].PrefixLen; |
| 187 | tok.SubTokens.clear(); |
| 188 | } |
| 189 | } |
| 190 | //! @note NLP type of token is NLP_MISCTEXT; |
| 191 | //! prefixes always considered as "misctext"; |
| 192 | //! suffixes of non-words considered as "misctext"; |
no test coverage detected