| 11 | } |
| 12 | |
| 13 | std::string CandidateObject::repr() const |
| 14 | { |
| 15 | string ret = "tomotopy.label.Candidate(words=["; |
| 16 | for (auto& w : *this) |
| 17 | { |
| 18 | ret.push_back('"'); |
| 19 | ret += w; |
| 20 | ret.push_back('"'); |
| 21 | ret.push_back(','); |
| 22 | } |
| 23 | ret.back() = ']'; |
| 24 | ret += ", name=\""; |
| 25 | ret += cand.name; |
| 26 | ret += "\", score="; |
| 27 | ret += to_string(cand.score); |
| 28 | ret.push_back(')'); |
| 29 | return ret; |
| 30 | } |
| 31 | |
| 32 | py::UniqueObj CandidateObject::getWords() const |
| 33 | { |