forked from openkylin/ukui-search
完善汉字转拼音接口逻辑;
This commit is contained in:
parent
e712641f4f
commit
ff3e927e36
|
@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue