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

Function SplitIntoSentences

library/cpp/tokenizer/split.cpp:70–80  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

68}
69
70TVector<TUtf16String> SplitIntoSentences(const TUtf16String& text, const TTokenizerSplitParams& params) {
71 TVector<TUtf16String> sentences;
72
73 TSimpleSentenceHandler handler(&sentences);
74 TNlpTokenizer tokenizer(handler, params.BackwardCompatibility);
75 TTokenizerOptions opts { params.SpacePreserve, params.TokenizerLangMask, params.UrlDecode };
76 tokenizer.Tokenize(text.data(), text.size(), opts);
77 handler.Flush();
78
79 return sentences;
80}

Callers

nothing calls this directly

Calls 4

TokenizeMethod · 0.45
dataMethod · 0.45
sizeMethod · 0.45
FlushMethod · 0.45

Tested by

no test coverage detected