-
Notifications
You must be signed in to change notification settings - Fork 557
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix #652: process whole conversion chain #656
Conversation
* continue to process whole conversion chain for whole candidate matching except for the candidate original form
src/rime/gear/simplifier.cc
Outdated
string simplified; | ||
const bool success_converted = opencc_->ConvertText(original->text(), &simplified); | ||
if (success_converted && original->text().compare(simplified) != 0) { | ||
PushBack(original, result, simplified); | ||
} else { | ||
PushBack(original, result, forms[i]); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have not tested your suggestion yet. I have a question. Would it lose results if a character can be converted into multiple ones?
For example, 「才」 would be converted to 「才」 and 「纔」, but it will use ConvertText
first, get result 「才」 (or 「纔」, not test yet), and go to success
branch. Then the result 「纔」 will lose.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested the example in #652 and it works fine.
不应重复转换 |
@lotem is right. Should fix it in ConvertWord. |
Pull request
Issue tracker
Fixes #652
Unit test
Manual test
Code Review
Additional Info