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

Method FinishBuilding

library/cpp/text_processing/dictionary/bpe_builder.cpp:82–87  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

80}
81
82TIntrusivePtr<TBpeDictionary> TBpeDictionaryBuilder::FinishBuilding() {
83 Y_ENSURE(!IsBuildingFinish, "FinishBuilding method should be called only once.");
84 IsBuildingFinish = true;
85 CalcMostFrequentUnits();
86 return new TBpeDictionary(Alphabet, std::move(ResultingBpeUnits));
87}
88
89void TBpeDictionaryBuilder::CalcMostFrequentUnits() {
90 ResultingBpeUnits.clear();

Callers 8

BuildDictionaryMethod · 0.45
BuildBpeWordFunction · 0.45
BuildBpeLetterFunction · 0.45
GetApplyToAllDictsFuncFunction · 0.45
Y_UNIT_TESTFunction · 0.45
Y_UNIT_TESTFunction · 0.45
CreateDictionaryFunction · 0.45

Calls 1

moveFunction · 0.50

Tested by

no test coverage detected