Commit Graph

4 Commits

Author SHA1 Message Date
ovadmin 3e0e859feb 將用戶選字記憶機制整合入 InputMethodController 2022-01-06 18:28:37 -08:00
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 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 Hsieh 5f976e4642 first commit 2011-09-01 23:56:26 -07:00