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

Method getPseudoDocId

src/python/handler/py_PT.cpp:40–49  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

38}
39
40size_t DocumentObject::getPseudoDocId() const
41{
42 if (corpus->isIndependent()) throw py::AttributeError{ "doc has no `pseudoDoc` field!" };
43 if (!doc) throw py::RuntimeError{ "doc is null!" };
44 if (auto ret = docVisit<tomoto::DocumentPT>(getBoundDoc(), [](auto* doc) -> std::optional<size_t>
45 {
46 return doc->pseudoDoc;
47 })) return *ret;
48 throw py::AttributeError{ "doc has no `pseudoDoc` field!" };
49}
50
51std::vector<std::pair<tomoto::Tid, tomoto::Float>> DocumentObject::getTopicsFromPseudoDoc(size_t topN) const
52{

Callers

nothing calls this directly

Calls 1

isIndependentMethod · 0.80

Tested by

no test coverage detected