| 619 | } |
| 620 | |
| 621 | std::vector<float> DocumentObject::getCountVector() const |
| 622 | { |
| 623 | if (corpus->isIndependent()) throw py::AttributeError{ "This method can only be called by documents bound to the topic model." }; |
| 624 | if (!corpus->tm->inst) throw runtime_error{ "inst is null" }; |
| 625 | size_t v = corpus->tm->inst->getV(); |
| 626 | |
| 627 | return docVisit<tomoto::DocumentLDA>(getBoundDoc(), [&](auto* doc) |
| 628 | { |
| 629 | return doc->getCountVector(v); |
| 630 | }); |
| 631 | |
| 632 | throw py::AttributeError{ "cannot get count vector" }; |
| 633 | } |
nothing calls this directly
no test coverage detected