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

This commit is contained in:
jixiaoxu 2022-12-01 13:51:30 +08:00 committed by iaom
parent e712641f4f
commit ff3e927e36
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;
}
/**