完善汉字转拼音接口逻辑;

This commit is contained in:
jixiaoxu 2022-12-01 13:51:30 +08:00
parent 48bc9e4209
commit ff5cb5327d
1 changed files with 10 additions and 3 deletions

View File

@ -477,9 +477,16 @@ void stitchMultiToneWordsBFSStackLess3(const QString &hanzi, QStringList &result
}
QStringList FileUtils::findMultiToneWords(const QString &hanzi) {
QStringList output;
stitchMultiToneWordsBFSStackLess3(hanzi, output);
return output;
QStringList output, results;
//stitchMultiToneWordsBFSStackLess3(hanzi, output);
HanZiToPinYin::getInstance()->getResults(hanzi.toStdString(), results);
QString oneResult(results.join(""));
QString firstLetter;
for (QString & info : results) {
if (!info.isEmpty())
firstLetter += info.at(0);
}
return output << oneResult << firstLetter;
}
/**