| 5 | |
| 6 | template <typename T> |
| 7 | static void AddToken( |
| 8 | const T& token, |
| 9 | bool skipUnknown, |
| 10 | const TDictionary& alphabet, |
| 11 | TEraseList<TTokenId>* tokenIdsList |
| 12 | ) { |
| 13 | auto tokenId = alphabet.Apply(token); |
| 14 | if (tokenId != alphabet.GetUnknownTokenId()) { |
| 15 | tokenIdsList->PushToken(tokenId); |
| 16 | } else { |
| 17 | if (skipUnknown) { |
| 18 | return; |
| 19 | } |
| 20 | tokenIdsList->PushToken(tokenId); |
| 21 | } |
| 22 | } |
| 23 | |
| 24 | template <typename TStringVector> |
| 25 | static void AddImpl( |
no test coverage detected