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

Method AddText

catboost/private/libs/text_processing/text_column_builder.cpp:6–11  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4
5
6void TTextColumnBuilder::AddText(ui32 index, const TStringBuf text) {
7 CB_ENSURE_INTERNAL(index < Texts.size(), "Text index is out of range");
8 TTokensWithBuffer tokens;
9 Tokenizer->Tokenize(text, &tokens);
10 Dictionary->Apply(tokens.View, &Texts[index]);
11}
12
13TVector<TText> TTextColumnBuilder::Build() {
14 CB_ENSURE_INTERNAL(!WasBuilt, "Build could be done only once");

Callers 2

ApplyMethod · 0.80
Y_UNIT_TESTFunction · 0.80

Calls 3

sizeMethod · 0.45
TokenizeMethod · 0.45
ApplyMethod · 0.45

Tested by

no test coverage detected