MCPcopy Create free account
hub / github.com/bab2min/tomotopy / saves

Method saves

src/python/handler/py_LDA.cpp:427–438  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

425}
426
427py::UniqueObj LDAModelObject::saves(const std::vector<uint8_t>& extraData, bool full)
428{
429 auto* inst = getInst<tomoto::ILDAModel>();
430 if (!isPrepared)
431 {
432 inst->prepare(true, minWordCnt, minWordDf, removeTopWord);
433 isPrepared = true;
434 }
435 ostringstream str;
436 inst->saveModel(str, !!full, &extraData);
437 return py::UniqueObj{ PyBytes_FromStringAndSize(str.str().data(), str.str().size()) };
438}
439
440void LDAModelObject::updateVocab(const std::vector<std::string>& newVocabs)
441{

Callers

nothing calls this directly

Calls 5

saveModelMethod · 0.80
strMethod · 0.80
prepareMethod · 0.45
dataMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected