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

Method getTopicsFromPseudoDoc

src/python/handler/py_PT.cpp:51–56  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

49}
50
51std::vector<std::pair<tomoto::Tid, tomoto::Float>> DocumentObject::getTopicsFromPseudoDoc(size_t topN) const
52{
53 auto* mdl = corpus->tm->getInstDynamic<tomoto::IPTModel>();
54 if (!mdl) throw py::ValueError{ "`from_pseudo_doc` is valid for only `tomotopy.PTModel`." };
55 return mdl->getTopicsByDocSorted(getBoundDoc(), topN);
56}
57
58std::vector<float> DocumentObject::getTopicDistFromPseudoDoc(bool normalize) const
59{

Callers

nothing calls this directly

Calls 1

getTopicsByDocSortedMethod · 0.80

Tested by

no test coverage detected