| 37 | } |
| 38 | |
| 39 | std::pair<py::UniquePObj<LDAModelObject>, py::UniqueObj> HDPModelObject::convertToLDA(PyObject* LDAType, float topicThreshold) const |
| 40 | { |
| 41 | auto* inst = getInst<tomoto::IHDPModel>(); |
| 42 | std::vector<tomoto::Tid> newK; |
| 43 | auto lda = inst->convertToLDA(topicThreshold, newK); |
| 44 | auto ret = py::makeNewObject<py::PObject<LDAModelObject>>((PyTypeObject*)LDAType); |
| 45 | ret->inst = move(lda); |
| 46 | ret->isPrepared = true; |
| 47 | ret->minWordCnt = minWordCnt; |
| 48 | ret->minWordDf = minWordDf; |
| 49 | ret->removeTopWord = removeTopWord; |
| 50 | return make_pair(move(ret), py::buildPyValue(newK, py::cast_to_signed)); |
| 51 | } |
| 52 | |
| 53 | std::vector<int32_t> HDPModelObject::purgeDeadTopics() |
| 54 | { |
nothing calls this directly
no test coverage detected