MCPcopy Create free account
hub / github.com/catboost/catboost / ProcessWordToken

Function ProcessWordToken

library/cpp/text_processing/tokenizer/tokenizer.cpp:78–85  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

76}
77
78static void ProcessWordToken(const NTokenizer::TTokenizerOptions& options, ILemmerImplementation* lemmer, TUtf16String* token) {
79 if (options.Lowercasing) {
80 ToLower(*token);
81 }
82 if (options.Lemmatizing) {
83 lemmer->Lemmatize(token);
84 }
85}
86
87static std::pair<const wchar16*, size_t> BuildSubToken(const TWideToken& rawToken, const TCharSpan& subTokenInfo) {
88 return std::make_pair(

Callers 2

OnTokenMethod · 0.85
SplitByDelimiterFunction · 0.85

Calls 2

ToLowerFunction · 0.50
LemmatizeMethod · 0.45

Tested by

no test coverage detected