| 17 | } |
| 18 | |
| 19 | void NCB::TTokenizer::Tokenize(TStringBuf inputString, TTokensWithBuffer* tokens) { |
| 20 | if (TokenizerImpl.NeedToModifyTokens()) { |
| 21 | TokenizerImpl.Tokenize(inputString, &tokens->Data); |
| 22 | tokens->View.clear(); |
| 23 | for (const auto& token: tokens->Data) { |
| 24 | tokens->View.emplace_back(token); |
| 25 | } |
| 26 | } else { |
| 27 | TokenizerImpl.TokenizeWithoutCopy(inputString, &tokens->View); |
| 28 | } |
| 29 | } |
| 30 | |
| 31 | void NCB::TTokenizer::Save(IOutputStream *stream) const { |
| 32 | WriteMagic(TokenizerMagic.data(), MagicSize, Alignment, stream); |
no test coverage detected