完善汉字转拼音接口逻辑;
This commit is contained in:
parent
48bc9e4209
commit
ff5cb5327d
|
@ -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