unsigned CIMIContext::getBestSentence(std::vector<unsigned>& result, int rank, unsigned start, unsigned end) { CCandidates sentence; unsigned nWordConverted = getBestSentence(sentence, rank, start, end); result.clear(); for (size_t i = 0; i < sentence.size(); i++) { result.push_back(sentence[i].m_wordId); } return nWordConverted; }
unsigned CIMIContext::getBestSentence(wstring& result, int rank, unsigned start, unsigned end) { CCandidates sentence; unsigned nWordConverted = getBestSentence(sentence, rank, start, end); result.clear(); for (size_t i = 0; i < sentence.size(); i++) { result += sentence[i].m_cwstr; } return nWordConverted; }