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

Method getTopicWords

src/python/handler/py_PA.cpp:63–69  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

61}
62
63std::vector<std::pair<std::string, tomoto::Float>> PAModelObject::getTopicWords(size_t topicId, size_t topN) const
64{
65 auto* inst = getInst<tomoto::IPAModel>();
66 if (topicId >= inst->getK2()) throw py::ValueError{ "must topic_id < k2" };
67
68 return inst->getWordsByTopicSorted(topicId, topN);
69}
70
71std::vector<float> PAModelObject::getTopicWordDist(size_t topicId, bool normalize) const
72{

Callers

nothing calls this directly

Calls 1

getWordsByTopicSortedMethod · 0.80

Tested by

no test coverage detected