Commit Graph

7 Commits

Author SHA1 Message Date
Lukhnos Liu fa224c2657 Reset other nodes' fixed state when fixing a node
This fixes a bug that, when a span covers several nodes and a long node
has already been candidate-fixed, fixing a short node does not cause
the walk to reflect the result.

A concrete example:

1. type 高中生.
2. move the cursor to 中 and change to 鐘聲: 高鐘聲.
3. with cursor position unchanged, select the candidate to 忠.
4. the expected result should be 高忠生 but instead it is stuck with
   高鐘聲 due to the node representing "鐘聲" is still fixed.

Fixes #54
2020-10-09 22:16:06 -07:00
Lukhnos Liu 71b97f82b3 Simplify candidate fixing by moving code to Grid 2020-10-09 22:16:06 -07:00
Lukhnos Liu b4eea515c3 Fix Span removal bug when linked against libc++ 2013-06-14 23:54:37 -07:00
Lukhnos Liu 71921b848a Use stable sort in the engine.
So that unigram nodes with the same log probability are sorted
according to the order in which they were added to the language
model.
2012-09-10 19:02:24 -07:00
Mengjuei 7476edf12a 最多使用六個自來組成一個詞 2011-10-18 16:06:51 -07:00
Mengjuei Hsieh 8549045ef5 Accepting 5-char phrases 2011-10-01 10:20:18 -07:00
Mengjuei Hsieh 5f976e4642 first commit 2011-09-01 23:56:26 -07:00