| 520 | } |
| 521 | |
| 522 | py::UniqueObj LDAModelObject::getWordForms(size_t idx) const |
| 523 | { |
| 524 | auto* inst = getInst<tomoto::ILDAModel>(); |
| 525 | if (idx == (size_t)-1) |
| 526 | { |
| 527 | return py::buildPyValue(inst->getWordFormCnts()); |
| 528 | } |
| 529 | else |
| 530 | { |
| 531 | if (idx >= inst->getWordFormCnts().size()) |
| 532 | { |
| 533 | throw py::ValueError{ "`idx` must be less than the `len(used_vocabs)`." }; |
| 534 | } |
| 535 | return py::buildPyValue(inst->getWordFormCnts()[idx]); |
| 536 | } |
| 537 | } |
| 538 | |
| 539 | py::UniqueObj LDAModelObject::getHash() const |
| 540 | { |
nothing calls this directly
no test coverage detected