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
Correctly read phrase frequencies for sorting #337
Conversation
Well, no CI tests are run as travis-ci.org is ceased. With this change, all tests are still green on my machine. |
@yan12125 What about GitHub continuous integration? |
@@ -531,7 +531,7 @@ void insert_leaf(NODE * parent, long phr_pos, uint32_t freq) | |||
NODE *pnew; | |||
|
|||
for (p = parent->pFirstChild; p && GetUint16(p->data.key) == 0; prev = p, p = p->pNextSibling) | |||
if (GetUint16(p->data.phrase.freq) <= freq) |
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.
不是太懂 C,不知道這裡是否可以用 GetUint32。
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.
如果要用uint32,詞庫的格式以及libchewing要跟著改,用四個uint8_t表示頻率。目前我是以相容現有的libchewing為目標。
That's a good idea. If libchewing core developers are fine with GitHub Actions, I can try it in another PR. |
Rebased to test the change through GitHub Actions, which was added recently in #349. |
@kanru Mind to have another look? Per #334 (comment), it was expected that [1] libchewing/tools/src/bin/init_database.rs Line 92 in cebaeb3
|
Closes #334