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

Method getTopicWords

src/python/handler/py_HPA.cpp:47–52  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

45}
46
47std::vector<std::pair<std::string, tomoto::Float>> HPAModelObject::getTopicWords(size_t topicId, size_t topN) const
48{
49 auto* inst = getInst<tomoto::IHPAModel>();
50 if (topicId > inst->getK() + inst->getK2()) throw py::ValueError{ "must topic_id < 1 + K1 + K2" };
51 return inst->getWordsByTopicSorted(topicId, topN);
52}
53
54std::vector<float> HPAModelObject::getTopicWordDist(size_t topicId, bool normalize) const
55{

Callers

nothing calls this directly

Calls 2

getWordsByTopicSortedMethod · 0.80
getKMethod · 0.45

Tested by

no test coverage detected