Skip to content
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

無法由共用詞典的翻譯器實現調頻,原因是未指明所屬語言一致 #184

Closed
omgredfog opened this issue Feb 28, 2018 · 38 comments
Assignees

Comments

@omgredfog
Copy link

在調頻定義函數「algo/dynamics.h」中,調頻的對象包括用戶碼表中的全體對象。音碼類輸入法中,這或許是個好辦法,然類,對於幾乎所有形碼類輸入方案,這幾乎是個災難。

不同與音碼類輸入法,形碼類的輸入法方案在制定之初,便有基本的「效率」設定。因爲「重碼」是無可避免的,分流重碼的設計存在於所有種類的形碼方案之中,一級簡碼設二重,二級簡碼設二重或三重,常見高頻漢字的重碼固定排序,都是非常常見的重碼分流方案。

依「五筆」爲例,25個參與編碼的鍵上,都有一個「無理碼」,通常叫作「一級簡碼」。它們是「固定」的,五筆用戶爲了效率,習慣上都將需要四次按鍵(4*某鍵)才能打出的「鍵名字」,作爲一級簡碼的「第二重碼」,比如:

  • R
  • 一級簡碼 「的」
  • 第二重碼 「白」

這種設定,通常是作爲輸入法的「基本規則」來記憶的,不論在何種情形之下,五筆用戶都不希望按下一個「R」鍵時,「的」與「白」的次序有更改。

與此類似,「去」、「支」、「云」三個字共享「FCU」的編碼,一般來講,它們三個字的排序是固定的。在五筆中,整個 GB2312 裏重碼單字統共一百多組,而真正高頻的,不過十來組。這樣的固定序列,很容易形成肌肉記憶,對提升輸入效率,大有裨益。

於是,以五筆爲代表的形碼類方案,便有一個基本的需求:頻率調整,只針對詞組,不涉及單字。

通常來講,詞組編碼的定義是需要「四」個編碼完成,而「三」個編碼(一,二,三)已覆蓋掉 GB2312 單字的 95 % 以上,在「四碼鍵入完畢」時,詞組的排序,可以放心地優先單字顯示。

例如:

例

目前,五筆用戶唯有禁用所有調頻、自造詞、用戶詞典等功能,才能正常使用 RIME ——在所有平臺中皆是如此。

一級簡碼,一簡二重碼;二級簡碼,二簡二重碼;三級簡碼;全碼重碼字

這些涉及「單字排序」的內容,一旦啓用了 「enable_user_dict: true」,不久就會排序亂得差七錯八。而一旦關掉,就等於告別了 RIME 的自造詞功能,非常遺憾。

倘若 Librime 能打個補丁,將調頻策略修正爲僅針對用戶詞組,那麼即使 RIME 形碼類用戶起初只放置一份純單字碼表,也能養出一份「知我心意」的「用戶詞典」了。

以上,請參考。

@omgredfog
Copy link
Author

至於「新詞」的位置,大可以最優顯示,也可以次於單字顯示,這都無所謂,總之,將原來用戶碼表中的單字之間的排序打亂——總是個很大的困擾。

@omgredfog
Copy link
Author

omgredfog commented Feb 28, 2018

经实践发现:优先级低的翻译器在过滤重码时会被无视掉,从而导致它形同虚设。

@lotem
Copy link
Member

lotem commented Mar 4, 2018

多謝反饋。
現在無法實現預定效果,是因爲這一處代碼沒有完成:
https://github.com/rime/librime/blob/master/src/rime/gear/memory.h#L65
兩個共用詞典的翻譯器應該指向同一種「語言」,從而互通對詞典的更新。
雖然設計中有這一環,但當時還沒有應用場景,權且假定每個翻譯器處理不同「語言」。

@lotem lotem self-assigned this Mar 4, 2018
@lotem lotem changed the title 關於調頻的邏輯問題 無法由共用詞典的翻譯器實現調頻,原因是未指明所屬語言一致 Mar 4, 2018
@lotem
Copy link
Member

lotem commented Mar 4, 2018

實現方法:
Language 對象裏記錄語言代碼,據此實現該類的比較運算符 ==

語言代碼按照原定設計取詞典名中任何 . 字符之前的部分。即與確定「用戶詞典」名稱的規則一致。
例如詞典 luna_pinyinluna_pinyin.extended 均對應語言代碼 luna_pinyin

@omgredfog
Copy link
Author

omgredfog commented Mar 5, 2018

非常抱歉,因爲配置遇着困難就發了這麼一條反饋,實際上一樓,二樓,三樓所指所問都不同,因爲翻查到了佛振君給的「同一字典雙層翻譯器」,二樓,三樓所說,皆是針對這個置配方式上的不完美而談。下面,我做個綜述:

我看到三年前的一處討論裏,佛振先生給出的「雙翻譯器」技巧,它大致是這樣實現的:

雙層翻譯器

但是,這裏有個不完美的地方:

濾重器,會過濾掉來自低權重翻譯器的候選詞條供給,使得這個開啓了「用戶詞典」以拾取「上屏記錄」的翻譯器無法收到任何「上屏記錄」,以致「陰陽魚」無從給出正確的建議:

缺憾

@lotem 佛振先生您說的,「互通對詞典的更新」這裏我不太明白,依上圖爲例,對於禁掉「用戶詞典」的那支翻譯器來講,用戶打字上屏的記錄它是不會收錄的。這個「互通」是從何說起的呢?

雙層翻譯器方案配置

如果不更改濾重器的濾重策略,針對這種共用了同一方案字典的兩個翻譯器,只要能收錄到來自「高權重禁調頻」的那支的上屏信息並收錄到用戶詞典中,問題便徹底解決了,就像下面,不知道您上面回復的是否與我現在講的可是同一回事兒?

示意圖

還是非常希望能夠實您三年前給的這種「雙層翻譯器」技巧,這樣能保障用戶的碼表詞序在打字時是固定的,同時,又可以利用陰陽魚的建議功能。新加的詞組,在排序上是後置於原碼表詞條的,不會給形碼用戶造成困擾。

@lotem
Copy link
Member

lotem commented Mar 5, 2018

基本正确。
过滤器在此处没有影响。首先 uniqifier 并非简单忽略后来者,而是把文字相同的候选词合并成一个选项,包含原选项的引用。但这不是问题的关键。
每个翻译器也都会收到上屏的候选词序列,他们会有选择地记录来自他们所属语言的文本。这些逻辑都符合设计。
唯一的问题是现在他们不知道在用同一种语言。

@omgredfog
Copy link
Author

那太好了,请求修缮一下。

@nameoverflow
Copy link
Member

nameoverflow commented Mar 31, 2018

公子准备啥时候弄弄这个?

@nameoverflow
Copy link
Member

nameoverflow commented Apr 8, 2018

我觉得这里是不是由 Dictionary::name 相等来判断就可以了?如果两个被 unified 的候选是来自同一个 dict 那么就应该组词。没有很明白独立出一个 Language 类型的作用。

@lotem
Copy link
Member

lotem commented Apr 8, 2018

Language 是指輸入法的編碼方案,或者對應語言學的「音系」概念。

拼音和五筆,由於漢字編碼方案不同,因此屬於不同語言;
漢語拼音和粵語拼音,也屬於不同(輸入法概念上的)語言,這比較直觀;
朙月拼音和地球拼音,雖然語言學上都對應現代標準漢語,但是聲調有無導致音節表不兼容,也是不同的輸入法語言。
地球拼音和注音,是同一個音系的不同拼寫法(通過不同的棱鏡反射),兩者詞典共享,恰屬同一種語言。
按照這個分類依據,與語言最接近的概念就是詞典名即 Dictionary::name()

但問題來了,同一種語言還可以由多種詞典實現。類比漢語詞典會有「新華字典」「現代漢語詞典」等不同版本,輸入法用家也有類似需求,創建更大更全或者個性化、專業化的拼音詞典,然而又想與明月拼音及其衍生方案如雙拼互通,因此約定了這樣的詞典名luna_pinyin.extended.dict.yamlluna_pinyin.poetry.dict.yaml 等等,他們都基於共同的拼音音節表。
注意這不只是命名約定而已,輸入法確實會取第一個 . 之前的部份,作爲 用戶詞典名 (如果沒有在配置裏另行定義)。即詞典 luna_pinyin.extendedluna_pinyin.poetryluna_pinyin 共享用戶詞典,以免切換詞典後重新學習輸入習慣。無疑這個「輸入習慣」是與輸入法所講的「語言」更相關的東西。本題所討論的調頻正是針對用戶詞典的。

接下來要做的是把以上取用戶詞典名的邏輯明確定義爲 Language

@omgredfog
Copy link
Author

omgredfog commented Jun 24, 2018

重大的问题之一啊,盼解决……

希望能将这个 issues 的排期靠前些啊

形码用户们实现rime的自造词,全靠它了。

@lotem
Copy link
Member

lotem commented Jul 9, 2018

@omgredfog 自造詞不依賴這個功能

@xiaoqun2016
Copy link

xiaoqun2016 commented Jul 12, 2018

針對這種共用了同一方案字典的兩個翻譯器,只要能收錄到來自「高權重禁調頻」的那支的上屏信息並收錄到用戶詞典中,問題便徹底解決了

@omgredfog
像这样打补丁,问题就迎刃而解了:

# wubi86.custom.yaml
patch:
  engine/translators:
    - punct_translator
    - reverse_lookup_translator
    - table_translator@fixed
    - table_translator
  engine/filters:
    - uniquifier
  fixed:
    __include: wubi86.schema:/translator
    enable_user_dict: true  # 开启用户词典
    enable_encoder: true  # 开启造词功能
    initial_quality: 1000
    disable_user_dict_for_patterns:
      - '.*'  # 对所有编码禁用用户词典(不调频,不读取用户词,但不影响自造词写入用户词典)

由高权重的fixed翻译器来负责呈现固态词典中的所有条目,以及造词、记录词频。再由低权重的主翻译器负责呈现用户词,以及用户词的调频。

@nameoverflow
Copy link
Member

@xiaoqun2016 很厉害的样子

@omgredfog
Copy link
Author

@xiaoqun2016

该贴所述的思路,就是你说的这种想法的实现。
该贴所反馈的问题,就是这种想法实现不了。

@omgredfog
Copy link
Author

@lotem

但是目前的问题就是:低权重的翻译器无法拾取到上屏记录。

在纯单字的形码码表下,「秋」和「天」连续上屏之后,尝试「秋天」的编码键入时,「秋天」并不在「阴阳鱼」的建议中,而若去掉「滤重参数」,再次连续输入「秋」和「天」时,都选排在第二位(由低权重翻译器给出的上屏选项)的「秋」和「天」后,尝试「秋天」的编码,「秋天」就被阴阳鱼正确地给出了。

所以,「自造词」确实依赖于这个功能的实现,目前这个issues存在,双翻译器模式下的「自造词」——实现不了。

@xiaoqun2016
Copy link

@omgredfog 一些细微的调整,出来的效果就大不相同了。为什么不实际试一下那个补丁呢? 难道非要用低权重的翻译器来造词吗

@nameoverflow
Copy link
Member

@xiaoqun2016 不过你的这个方法用户词不能调频吧。

@xiaoqun2016
Copy link

用户词可以调频。因为负责呈现用户词的那个低权重翻译器开启了用户词典,想不调频都难。

@xiaoqun2016
Copy link

具体效果:实测录屏 (12M)

参考方案:

# Rime schema settings
# encoding: utf-8

schema:
  schema_id: wubi86
  name: "五笔86-测试"
  version: "0.21"
  author:
    - 發明人 王永民先生
  description: |
    五筆字型86版
    碼表源自 ibus-table
    敲 z 鍵進入拼音反查
  dependencies:
    - pinyin_simp

switches:
  - name: ascii_mode
    reset: 0
    states: [ 中文, 西文 ]
  - name: full_shape
    states: [ 半角, 全角 ]
  - name: extended_charset
    states: [ 常用, 增廣 ]
  - name: ascii_punct
    states: [ 。,, ., ]

engine:
  processors:
    - ascii_composer
    - recognizer
    - key_binder
    - speller
    - punctuator
    - selector
    - navigator
    - express_editor
  segmentors:
    - ascii_segmentor
    - matcher
    - abc_segmentor
    - punct_segmentor
    - fallback_segmentor
  translators:
    - punct_translator
    - reverse_lookup_translator
    - table_translator@fixed
    - table_translator
  filters:
    - uniquifier

speller:
  delimiter: " ;'"
  max_code_length: 4

fixed:
  __include: translator
  initial_quality: 1000
  enable_completion: true #若设为false,则无法造词
  disable_user_dict_for_patterns:
    - '.*'
# 实测发现词典中4码的字词不会参与造词(未解之谜),而1~3码的字可以正常参与造词。

translator:
  dictionary: wubi86
  enable_charset_filter: true
  enable_sentence: false
  enable_user_dict: true
  enable_encoder: true
  encode_commit_history: true
  max_phrase_length: 4
  disable_user_dict_for_patterns:
    - "^z.*$"

reverse_lookup:
  dictionary: pinyin_simp
  prefix: "z"
  suffix: "'"
  tips: 〔拼音〕
  preedit_format:
    - xform/([nl])v/$1ü/
    - xform/([nl])ue/$1üe/
    - xform/([jqxy])v/$1u/

punctuator:
  import_preset: default

key_binder:
  import_preset: default

recognizer:
  import_preset: default
  patterns:
    reverse_lookup: "^z[a-z]*'?$"

不明白enable_completion为何会影响到造词了?disable_user_dict_for_patterns和其它功能组合起来也出现了意料之外的效果,结果并不完美,临时用用倒是可以。主要还得靠Rime更新功能了。 @omgredfog

@lotem lotem closed this as completed in 9f774e7 Aug 2, 2018
@nameoverflow
Copy link
Member

nameoverflow commented Aug 3, 2018

发现在 #214 的实现下,只有当设定 enable_sentence: true 并一次性输入多个单字的编码时才能造词,分多次连续输入多个单字无法造词。如果设定 enable_sentence: false 并连续输入多个单字,查看用户词典记录发现并没能拾取到上屏记录。

--

好吧,发现这个问题只有部分词语才会出现,比如分别输入「笑」和「死」后无法整合为一个用户词,但是「用」和「户」是可以的。「可」和「以」也可以。

@nameoverflow nameoverflow reopened this Aug 3, 2018
@omgredfog
Copy link
Author

omgredfog commented Aug 3, 2018

@nameoverflow

当「enable_sentence: false」时,阴阳鱼给出的建议,其实依然与「上屏记录」无关,你看到的,以为起了效的正确建议,是因为它们都是排在「第一」的首选单字。

清空已编译的用户缓存文件,尝试使用纯单字码表输入单字,或连续输入指定单字,然后重新部署一下让程序生成文本文件的「用户上屏记录」,在我这里,我发现是收录不到上屏信息的。

wubi98_jian.schema.yaml:

↓ 在本地生成的用户词典名称
user_dict: 98wb
↓ 用户词典格式,tabledb(文本) 或 userdb (二进制)。
db_class: tabledb

验证是用新编译的 fcitx-rime

@nameoverflow
Copy link
Member

@omgredfog 你是使用的 #214 之后编译的 librime?
我从自己这里验证的结果是一部分记录可以收录,但是另一部分不可以。

@omgredfog
Copy link
Author

omgredfog commented Aug 3, 2018

@nameoverflow

忘了这一茬儿了,我重新看一下。
是最新了,没错。

@nameoverflow
Copy link
Member

nameoverflow commented Aug 13, 2018

单步一下发现 encode commit history 的问题疑似是因为 src/rime/gear/table_translator.cc#L338 处判断 it->type,不能造词时对应 commit history 的 typeuniquified 于是跳出了。我使用的方案中所有 2 码和 1 码的候选的 type 都是 table,3 码以上则是 uniquified。不知道是这里的问题还是 uniquifier 的机制问题。

ztl8702 added a commit to ztl8702/librime that referenced this issue Sep 18, 2018
* fix(user_db): unwanted implicit instantiation of UserDbFormat template

Fixes rime#188: UserDbFormat<BaseDb>::extension not working

* fix(config_compiler): "/" mistaken as path separator in merged map key (rime#192)

Fixes rime#190

* fix(ConfigFileUpdate): no need to create user build if shared build is up-to-date

* fix(SchemaUpdate): read compiled schema from shared build if there is no user build

* chore(release tag): deprecating tag name prefix 'rime-' in favor of conventional 'v'

BREAKING CHANGE: After 1.3.0 release, we'll no longer be creating tags in the format 'rime-X.Y.Z'. Downstream packagers please change automated scripts accordingly.

* chore(CMakeLists.txt): bump version to 1.3.0

* chore(release): 1.3.0 🎉

* chore(tags): adopt semver "X.Y.Z" without prefix  [ci skip]

* fix(config_file_update): clean up deprecated user copy (rime#193)

* fix(config_file_update): trash deprecated user copy created by older rime version

* fix(config_file_update): create trash directory when needed to trash config files

* fix(config_file_update): prefer rime-installed user copy to shared minimal version if numbers match'

* fix(thirdparty/src/leveldb): do not link to snappy library

* chore(bump-version.sh): npm version script

* chore(release): 1.3.1 🎉

* docs(README): replace rime/brise with rime/plum

* Add ENABLE_ASAN option

This enable the Address Sanitizer memory detect when turns on, make us
easy to find out the memory problems.

* Fix a heap-use-after-free error found by asan

ctx->composition().Forward() might invalidated the iterator when did a
push_back, we can't use `seg` anymore.

* chore(engine.cc): Google code style; more informative name

* chore(REAME.md): require boost>=1.48, for boost::locale  [ci skip]

* fix(config_compiler): support creating list in-place by __patch and __merge

* fix(CMakeLists.txt): do not link binaries when building static library

* refactor(editor): extract helper class key_binding_processor

* refactor(navigator): key bindings

* fix(config_compiler): ambiguous operator overload with cmake option ENABLE_LOGGING=OFF

Fixes rime#211

* feat(language): shared user dictionary per language (Closes rime#184) (rime#214)

* fix(table_translator): enable encoding uniquified commit history

* feat: always_show_comments option (rime#220)

* feat: add always_show_comments option

* fix: address feedback
Line wraps
@omgredfog
Copy link
Author

omgredfog commented Nov 18, 2018

@nameoverflow @lotem

这个 ISSUES 虽然被关闭了,但是我反复验证,发现上屏记录,还是没有办法被拾取到。

下面是验证码表,是「单字」码表,可以连续输入任何「单字」,然后在「用户目录」下的「用户词典」(特别设定为了TXT文本格式)中,查看是否有拾取到的上屏记录,我这里反复验证,无法拾取到。

这个 ISSUE 从佛振君提出设想到今天,已经 4 年有余,我在确认「配置方式」正确的前提下,至今没有复现成功,希望被指点一下,问题到底出在什么地方。

验证文件

@nameoverflow
Copy link
Member

要 enable_completion 吧。

@omgredfog
Copy link
Author

@nameoverflow

双翻译器都加上「 enable_completion: true 」——它是「逐渐提示」的开关

翻译器一
翻译器二

打单字「春」和「云」

打单字

重新部署一次,以刷新「用户词典」

部署刷新用户词典

打开一看,还是没有拾取到:

空空如也

@nameoverflow
Copy link
Member

不用 tabledb 就可以造词。

@omgredfog
Copy link
Author

@nameoverflow 明白了,感谢

@omgredfog
Copy link
Author

@nameoverflow
经过反复测试,发现在造词时,如果有第二或第三重码参与,就会无法造词成功。
举例:「寸云」
可以输入「寸」和「云」的编码,以「编码切分符」切分它们,用方向键选字使「寸」和「云」分别上屏。
但是,如果不给「高权重」的「翻译器」开「 enable_user_dict: true 」,「寸云」的建议,永远不会出现在阴阳鱼中。
可是,如果开了「 enable_user_dict: true 」,完全有违初衷。

@nameoverflow
Copy link
Member

@omgredfog
image

@omgredfog
Copy link
Author

@omgredfog
image

求分享配置文件,查了半天没找到原因。

@omgredfog
Copy link
Author

omgredfog commented Dec 18, 2018

@omgredfog
image

终于弄清楚了,原来只要对「用户字典」的名命与当前方案名不一致,就会出问题。

# ↓ 在本地生成的用户词典名称
user_dict: 98wb

原来公子真的已经修复了这个问题,下面的配置已经可用了

https://github.com/omgredfog/rime-make-phrase

@omgredfog
Copy link
Author

@omgredfog
image

经过调整,发现原来并不需要「强制开启」逐渐提示,也能使用上自造词功能。
我在这份配置文件中,用了3个翻译器,实现了禁止程序根据上屏历史记录推建议词,同时还可以使用编码切分符手动造词,哈哈,太安逸了!
https://github.com/omgredfog/rime-make-phrase

@huaxianyan
Copy link

@omgredfog
抱歉打扰您,但是您分享的链接已经失效了,最近我也碰到了使用第二个翻译器用来给高权重固定候选字词,但是无法上屏的问题,想看看您是怎么解决的

@Ace-Who
Copy link
Contributor

Ace-Who commented Jun 17, 2019

最近使用这个方法,出现一个意外状况,即当自造词为首个候选时,一定会被删词键删去,即使光标在其他候选上。如果那个候选也是自造词,也会被删去,即同时删去了两个自造词,而其他位置的自造词(如果有的话)不受影响。

@KyleBing
Copy link

还是手动造词并调整词序实在些,写了个有基础功能的词条添加工具,目前感觉还可以:

码表助手https://github.com/KyleBing/WubiBuddy

main file

root file

netbsd-srcmastr pushed a commit to NetBSD/pkgsrc that referenced this issue Feb 20, 2021
Changelog:
## [1.7.2](rime/librime@1.7.1...1.7.2) (2021-02-07)


### Bug Fixes

* **chord_composer:** should clear raw input after committing text ([79b34ab](rime/librime@79b34ab))



## [1.7.1](rime/librime@1.7.0...1.7.1) (2021-02-06)


### Bug Fixes

* **chord_composer:** press Return key to commit raw key sequence ([2b25861](rime/librime@2b25861))



# [1.7.0](rime/librime@1.6.1...1.7.0) (2021-01-17)


### Bug Fixes

* **chord_composer:** more safely handle the placeholder ZWSP ([025d9fb](rime/librime@025d9fb))
* **cmake:** use full paths defined by GNUInstallDirs ([bb8c263](rime/librime@bb8c263)), closes [#424](rime/librime#424)
* **opencc:** update submodule to fix [#425](rime/librime#425) ([3fa1571](rime/librime@3fa1571))
* **script_translator:** always_show_comments also applies to phrases ([440a97c](rime/librime@440a97c)), closes [#272](rime/librime#272) [#419](rime/librime#419)
* **table_translator:** index out of bound access in string ([ff7acdc](rime/librime@ff7acdc))


### Features

* **chareset_filter:** add CJK Compatibility Ideographs in is_extended_cjk() ([3cb1128](rime/librime@3cb1128)), closes [#305](rime/librime#305)
* **setup:** find and load external RIME plugins as shared libs [#431](rime/librime#431) ([b2abd09](rime/librime@b2abd09))



## [1.6.1](rime/librime@1.6.0...1.6.1) (2020-09-21)


### Bug Fixes

* **rime_api.cc:** dangling pointer returned from RimeGetSharedDataDir ([78abaa8](rime/librime@78abaa8))



# [1.6.0](rime/librime@1.5.3...1.6.0) (2020-09-20)


### Bug Fixes

* **ascii_composer:** do not comsume Shift key release ([debc2c0](rime/librime@debc2c0))
* **ascii_composer:** first read ascii_composer/good_old_caps_lock from schema config ([3fc56c4](rime/librime@3fc56c4))
* **chord_composer:** commit raw input with uppercase letters ([cc983d5](rime/librime@cc983d5))
* **CMakeLists.txt:** ensure paths in pkgconfig file are absolute ([0e96e51](rime/librime@0e96e51))
* **CMakeLists.txt:** would not use signals v1 due to a typo ([6662a28](rime/librime@6662a28)), closes [#225](rime/librime#225)
* **custom_settings:** accept "*.schema" as config id ([604da0b](rime/librime@604da0b))
* **dict:** issues with user db recovery ([0f3d0df](rime/librime@0f3d0df))
* **dict_compiler:** build prism with loaded syllabary when not rebuilding primary table ([93fe827](rime/librime@93fe827))
* **plugins/CMakeLists.txt:** avoid rime_library linking to itself via rime_plugins_deps ([fe744db](rime/librime@fe744db))
* **rime_api.cc:** check struct has member of non-pointer type ([090dfa4](rime/librime@090dfa4))
* **rime_api.cc:** using unchecked fields introduced an ABI breakage ([62bbead](rime/librime@62bbead)), closes [/github.com/rime/librime/pull/328#pullrequestreview-335125464](https://github.com//github.com/rime/librime/pull/328/issues/pullrequestreview-335125464)
* **rime_test:** set data directories to working directory using rime::SetupDeployer API ([7c08a90](rime/librime@7c08a90))
* **simplifier:** opencc::DictEntry::Values() type change in opencc 1.1.0 ([beae5b1](rime/librime@beae5b1)), closes [#367](rime/librime#367)
* **user_db:** pointer cast error caused by multiple inheritance ([2ed780b](rime/librime@2ed780b))
* use official emoji 12.0 data ([#304](rime/librime#304)) ([75a60dc](rime/librime@75a60dc))


### Features

* **api:** implement capnproto api ([873f648](rime/librime@873f648))
* **api:** include candidate labels in proto message ([aae7a0c](rime/librime@aae7a0c))
* **charset_filter:** support charset options with emoji ([#293](rime/librime#293)) ([943c95b](rime/librime@943c95b))
* **charset_filter:** support CJK Unified Ideographs Extension G ([#393](rime/librime#393)) ([0a1573d](rime/librime@0a1573d))
* **chord_composer:** support chording with Shift keys ([94cf479](rime/librime@94cf479))
* **chord_composer:** use Control, Alt, Shift to input chord ([f3a2ad0](rime/librime@f3a2ad0))
* **dictionary:** packs extends the dictionary with extra binary table files ([930074c](rime/librime@930074c))
* **key_binder:** bind key to a key sequence ([3b5dbf6](rime/librime@3b5dbf6)), closes [#301](rime/librime#301)
* **logging:** setup min log level, log dir and set file mode to log files ([90839b0](rime/librime@90839b0))
* **selector:** support 4 combinations of horizontal/vertical text orientation and stacked/linear candidate list layout ([c498f71](rime/librime@c498f71))
* **selector:** support vertical UI ([dbb35c6](rime/librime@dbb35c6))
* **switcher:** enable schema in cases where conditions are met ([217c72b](rime/librime@217c72b))
* **tools/rime_proto_console:** demo for proto api ([d88ef9f](rime/librime@d88ef9f))


### Performance Improvements

* **poet:** optimize for performance in making sentences (~40% faster) ([0853465](rime/librime@0853465))



## [1.5.3](rime/librime@1.5.2...1.5.3) (2019-06-22)


### Bug Fixes

* **cmake, xcode.mk:** find optional dependency icu, while building xcode/release-with-icu target  [skip appveyor] ([17a80f8](rime/librime@17a80f8))
* **single_char_filter:** broken in librime 1.5.2 ([6948a62](rime/librime@6948a62))


### Features

* **appveyor:** build variant "rime-with-plugins" for tagged commits  [skip travis] ([eef8c30](rime/librime@eef8c30))
* **travis-ci:** build variant "rime-with-plugins" for tagged commits  [skip appveyor] ([cf11c27](rime/librime@cf11c27))
* **travis-ci:** deploy artifacts for macOS to GitHub releases  [skip appveyor] ([3f03784](rime/librime@3f03784))



## [1.5.2](rime/librime@1.5.1...1.5.2) (2019-06-17)


### Bug Fixes

* **user_dictionary, contextual_translation:** fix user phrase quality; order contextual suggestions by type ([69d5c32](rime/librime@69d5c32))



## [1.5.1](rime/librime@1.5.0...1.5.1) (2019-06-16)


### Bug Fixes

* **user_dictionary:** make user phrases comparable in weight to system words ([982f69d](rime/librime@982f69d))



# [1.5.0](rime/librime@1.4.0...1.5.0) (2019-06-06)


### Bug Fixes

* **ci:** update build script ([84a1a1b](rime/librime@84a1a1b))
* **ci:** use submodules in AppVeyor CI build script ([7b515b4](rime/librime@7b515b4))
* **cmake:** libboost Windows XP compatibility fix ([#270](rime/librime#270)) ([fecfe39](rime/librime@fecfe39)), closes [rime/weasel#337](rime/weasel#337)
* **CMakeLists.txt:** install header files in all platforms ([821d563](rime/librime@821d563))
* **CMakeLists.txt:** set "-std=c++11" in CMAKE_CXX_FLAGS ([5d8a836](rime/librime@5d8a836))
* **config/plugins.h:** memory leak caused by non-virtual destructor ([316a659](rime/librime@316a659)), closes [#259](rime/librime#259)
* **deploy:** treat schema dependencies as optional; do not report errors if missing ([ff3d5e9](rime/librime@ff3d5e9))
* **engine:** schema doesn't match the one used by switcher ([e41bb63](rime/librime@e41bb63)), closes [#269](rime/librime#269)
* **rime_levers_api.h:** customize_bool() misused `bool` type ([42bacc5](rime/librime@42bacc5))
* **syllabifier:** enable_completion not working ([2714131](rime/librime@2714131)), closes [#343](rime/librime#343)
* **table_translator:** null pointer exception when dict entries are filtered ([77438a9](rime/librime@77438a9))
* **test:** compile error in unit test ([7076d9e](rime/librime@7076d9e))
* **travis-install.sh:** working directory ([97220ce](rime/librime@97220ce))


### Features

* **appveyor:** install RIME_PLUGINS  [skip travis] ([c7ce66f](rime/librime@c7ce66f))
* **CMakeList.txt:** add plugin build support ([#257](rime/librime#257)) ([dfa341b](rime/librime@dfa341b))
* **contextual_translation:** weight and re-order phrases by context ([2390da3](rime/librime@2390da3))
* **dict:** specify vocabulary db name in dict settings ([dcdc301](rime/librime@dcdc301))
* **grammar:** compare homophones/homographs in sentence ([9248a6b](rime/librime@9248a6b))
* **install-plugins.sh:** git-clone or update plugins ([70483b4](rime/librime@70483b4))
* **poet:** find best sentence candidates ([b3f4005](rime/librime@b3f4005))
* **rime_api:** get candidate list from index ([c587900](rime/librime@c587900))
* **translator:** contextual suggestions in partially selected sentence ([12a7501](rime/librime@12a7501))
* **translator:** look at preceding text when making sentence ([6ae34de](rime/librime@6ae34de))
* **travis-ci:** install plugins specified in envvar RIME_PLUGINS ([c857639](rime/librime@c857639))


### Performance Improvements

* **dictionary:** refactor DictEntryIterator and do partial sort ([0258c7f](rime/librime@0258c7f))


### BREAKING CHANGES

* **rime_levers_api.h:** in signature of C API function `customize_bool()`,
change type `bool` to `Bool` (alias of `int`).

Impact: the changed function is not in use by any first party code,
known to be in use by osfans/trime.



# [1.4.0](rime/librime@1.3.2...1.4.0) (2019-01-16)


### Bug Fixes

* **config:** user_config should not fall back to shared data ([68c8a34](rime/librime@68c8a34)), closes [#271](rime/librime#271)
* **SymlinkingPrebuiltDictionaries:** remove dangling symlinks ([5ad333d](rime/librime@5ad333d)), closes [#241](rime/librime#241)
* **SymlinkingPrebuiltDictionaries:** remove dangling symlinks ([f8e4ebf](rime/librime@f8e4ebf)), closes [#241](rime/librime#241)


### Features

* spelling correction ([#228](rime/librime#228)) ([ad3638a](rime/librime@ad3638a))
* **Dockerfile:** for build ([#246](rime/librime#246)) ([cafd0d5](rime/librime@cafd0d5))



## [1.3.2](rime/librime@1.3.1...1.3.2) (2018-11-12)


### Bug Fixes

* **CMakeLists.txt:** do not link binaries when building static library ([99573e3](rime/librime@99573e3))
* **CMakeLists.txt:** do not require boost::signals, which will be deprecated in Boost 1.69 ([8a9ef3b](rime/librime@8a9ef3b)), closes [#225](rime/librime#225)
* **config_compiler:** ambiguous operator overload with cmake option ENABLE_LOGGING=OFF ([b86b647](rime/librime@b86b647)), closes [#211](rime/librime#211)
* **config_compiler:** support creating list in-place by __patch and __merge ([0784eb0](rime/librime@0784eb0))
* **table_translator:** enable encoding uniquified commit history ([74e31bc](rime/librime@74e31bc))


### Features

* **language:** shared user dictionary per language (Closes [#184](rime/librime#184)) ([#214](rime/librime#214)) ([9f774e7](rime/librime@9f774e7))
* always_show_comments option ([#220](rime/librime#220)) ([19cea07](rime/librime@19cea07))



## [1.3.1](rime/librime@1.3.0...1.3.1) (2018-04-01)


### Bug Fixes

* **config_file_update:** clean up deprecated user copy ([#193](rime/librime#193)) ([8d8d2e6](rime/librime@8d8d2e6))
* **thirdparty/src/leveldb:** do not link to snappy library ([6f6056a](rime/librime@6f6056a))



# 1.3.0 (2018-03-09)


### Bug Fixes

* **CMakeLists.txt, build.bat:** install header files (public API) ([06c9e86](rime/librime@06c9e86))
* **config_compiler:** "/" mistaken as path separator in merged map key ([#192](rime/librime#192)) ([831ffba](rime/librime@831ffba)), closes [#190](rime/librime#190)
* **ConfigFileUpdate:** no need to create user build if shared build is up-to-date ([cafd5c4](rime/librime@cafd5c4))
* **SchemaUpdate:** read compiled schema from shared build if there is no user build ([45a04dd](rime/librime@45a04dd))
* **simplifier:** fix typo ([9e1114e](rime/librime@9e1114e)), closes [#183](rime/librime#183)
* **user_db:** unwanted implicit instantiation of UserDbFormat template ([3cbc9cb](rime/librime@3cbc9cb)), closes [#188](rime/librime#188)


### Chores

* **release tag:** deprecating tag name prefix 'rime-' in favor of semver 'X.Y.Z'


### BREAKING CHANGES

* **release tag:** After 1.3.0 release, we'll no longer be creating tags in the format 'rime-X.Y.Z'. Downstream packagers please change automated scripts accordingly.



## 1.2.10 (2018-02-21)


### Bug Fixes

* **config_compiler:** linking failure on blocking root node of a dependency resource ([ecf3397](rime/librime@ecf3397))
* table_translator not making sentence if table entry is hidden by charset filter. ([77eb12e](rime/librime@77eb12e))
* **appveyor.install.bat:** switch to a more stable download server for libboost ([bcc4d10](rime/librime@bcc4d10))
* **appveyor.yml:** archive header files ([c8b1e67](rime/librime@c8b1e67))
* **ascii_composer:** support key binding Shift+space in ascii mode ([7077389](rime/librime@7077389))
* **build.bat:** fix build errors with VS2015 build tools ([ec940c6](rime/librime@ec940c6))
* **calculus, recognizer:** memory leak due to unchecked regex error ([19ddc1e](rime/librime@19ddc1e)), closes [#171](rime/librime#171)
* **chord_composer:** allow editor to define BackSpace key behavior ([7f41f65](rime/librime@7f41f65))
* **chord_composer:** letters with modifier keys should not be committed by a following enter key ([aab5eb8](rime/librime@aab5eb8))
* **ci:** call cmake under /usr/local with sudo by passing $PATH environment variable ([a0e6d2f](rime/librime@a0e6d2f))
* **cmake:** fix build break for mingw ([939893c](rime/librime@939893c))
* **config:** auto save modified config data; fixes [#144](rime/librime#144) ([2736f4b](rime/librime@2736f4b))
* **config:** treat "@" as map key rather than list index ([a1df9c5](rime/librime@a1df9c5))
* **config_compiler:** duplicate PendingChild dependencies happen from multiple commands on the same node ([25c28f8](rime/librime@25c28f8))
* **config_compiler:** enforce dependency priorities ([69a6f3e](rime/librime@69a6f3e))
* **config_compiler:** null value should not overwrite a normal key in a merged tree ([4ecae44](rime/librime@4ecae44))
* **config_compiler:** template operator overload had compile error with NDK ([71817a0](rime/librime@71817a0))
* **config/build_info_plugin:** referenced but unavailable resources should also be recorded ([cd46f7a](rime/librime@cd46f7a))
* **ConfigFileUpdate:** should succeed if shared copy does not exist ([8a3e25c](rime/librime@8a3e25c))
* **custom_settings:** fall back to $shared_data_dir/build when loading config ([caf8ebb](rime/librime@caf8ebb))
* **custom_settings:** load built settings from $user_data_dir/build directory ([463dc09](rime/librime@463dc09))
* **deployment_tasks:** symbols.yaml is no longer a build target ([f920e4f](rime/librime@f920e4f))
* **dict_compiler:** prism should load compiled schema ([c2fd0cf](rime/librime@c2fd0cf)), closes [#176](rime/librime#176)
* **key_event:** KeySequence::repr() prefer unescaped punctuation characters ([aa43e5e](rime/librime@aa43e5e))
* **levers:** update deployment tasks for copy-free resource resolution ([1f86413](rime/librime@1f86413))
* **Makefile:** make install-debug; do return error code on mac ([1177142](rime/librime@1177142))
* **rime_api:** use user_config_open() to access user.yaml ([4e4a491](rime/librime@4e4a491))
* **rime_console:** not showing switcher's context ([632cf4b](rime/librime@632cf4b))
* **schema:** create a "schema" component that opens Config by schema_id ([555f990](rime/librime@555f990))
* **simplifier:** fix crash if no opencc file ([091cb9d](rime/librime@091cb9d))
* **simplifier:** tips option for show_in_comment simplifier ([e7bb757](rime/librime@e7bb757))
* **uniquifier:** half of the duplicate candidates remain after dedup [Closes [#114](rime/librime#114)] ([2ab76bc](rime/librime@2ab76bc))


### Features

* **build.bat:** customize build settings via environment variables ([#178](rime/librime#178)) ([1678b75](rime/librime@1678b75))
* **chord_composer:** accept escaped chording keys ([79a32b2](rime/librime@79a32b2))
* **chord_composer:** support chording with function keys ([48424d3](rime/librime@48424d3))
* **config:** add config compiler plugin that includes default:/menu into schema ([b51dda8](rime/librime@b51dda8))
* **config:** best effort resolution for circurlar dependencies ([2e52d54](rime/librime@2e52d54))
* **config:** build config files if source files changed ([0d79712](rime/librime@0d79712))
* **config:** config compiler plugins that port legacy features to the new YAML syntax ([a7d253e](rime/librime@a7d253e))
* **config:** config_builder saves output to $rime_user_dir/build/ ([e596155](rime/librime@e596155))
* **config:** references to optional config resources, ending with "?" ([14ec858](rime/librime@14ec858))
* **config:** save __build_info in compiled config ([45a7337](rime/librime@45a7337))
* **config:** separate out config_builder and user_config components ([9e9493b](rime/librime@9e9493b))
* **config:** support append and merge syntax ([04dcf42](rime/librime@04dcf42))
* **customizer:** disable saving patched config files ([88f5a0c](rime/librime@88f5a0c))
* **detect_modifications:** quick test based on last write time of files ([285fbcc](rime/librime@285fbcc))
* **dict:** no conditional compilation on arm ([85b945f](rime/librime@85b945f))
* **dict:** relocate binary files to $user_data_dir/build ([bc66a47](rime/librime@bc66a47))
* **dict:** use resource resolver to find dictionary files ([8ea08b3](rime/librime@8ea08b3))
* add property notifier ([fa7b5a5](rime/librime@fa7b5a5))
* **resource_resolver:** add class and unit test ([03ee8b4](rime/librime@03ee8b4))
* **resource_resolver:** fallback root path ([02151da](rime/librime@02151da))
* **translator:** add history_translator ([#115](rime/librime#115)) ([ae13354](rime/librime@ae13354))



## 1.2.9 (2014-12-14)

* **rime_api.h:** add `RIME_MODULE_LIST`, `RIME_REGISTER_MODULE_GROUP`.
* **Makefile:** add make targets `thirdparty/*` to build individual libraries.
* **legacy/src/legacy_module.cc:** plugin module `rime-legacy` for GPL code,
  providing component `legacy_userdb` for user dictionary upgrade.
* **src/setup.cc:** define module groups `"default"` and `"deployer"`, to avoid
	naming a list of built-bin modules in `RimeTraits::modules`.
* **test/table_test.cc:** fix random segment faults when run shuffled.
* **thirdparty/src/leveldb:** new dependency LevelDB, replacing Kyoto Cabinet.
* **dict/level_db:** userdb implementation based on LevelDB, replacing treeDb.
* **dict/tree_db:** moved to `legacy/src/`.
* **dict/user_db:** refactored and modularized to ease adding implementations.
* **gear/cjk_minifier:** support CJK Extension E.
* **gear/memory:** save cached phrases as soon as the next composition begins.
* **gear/recognizer:** match space iff set `recognizer/use_space: true`.
* **gear/simplifier:** catch and log OpenCC exceptions when loading.
* **gear/single_char_filter:** bring single character candidates to the front.
* **gear/simplifier:** adapt to OpenCC 1.0 API.
* **thirdparty/src/opencc:** update OpenCC to v1.0.2 (incompatible with v0.4).
* **lever/deployment_tasks:** update and rename task `user_dict_upgrade`.



## 1.2 (2014-07-15)

* **rime_api:** add API functions to access complex structures in config;
  add API to get the raw input and cursor position, or to select a candidate.
* **config:** support references to list elements in key paths.
  eg. `schema_list/@0/schema` is the id of the first schema in schema list.
* **switcher:** enable folding IME options in the switcher menu.
* **dict_compiler:** also detect changes in essay when updating a dictionary;
  support updating prism without the source file of the dictionary.
* **preset_vocabulary:** load `essay.txt` instead of `essay.kct`.
* **reverse_lookup_dictionary:** adopt a new file format with 50% space saving.
* **table:** add support for a new binary format with 20% space saving;
  fix alignment on ARM.
* **ascii_composer:** do not toggle IME states when long pressing `Shift` key;
  support discarding unfinished input when switching to ASCII mode.
* **affix_segmentor:** fix issues with selecting a partial-match candidate.
* **chord_composer:** commit raw input composed with original key strokes.
* **cjk_minifier:** a filter to hide characters in CJK extension set, works
  with `script_translator`.
* **navigator:** do not use `BackSpace` to revert selecting a candidate but to
  edit the input after moving the cursor left or right.
* **punctuator:** support `ascii_punct` option for switching between Chinese and
  Western (ASCII) punctuations.
* **speller:** auto-select candidates by pattern matching against the code;
  fix issues to cooperate with punctuator.
* **CMakeLists.txt:** add options `ENABLE_LOGGING` and `BOOST_USE_CXX11`;
  introduce a new dependency: `libmarisa`.
* **cmake/FindYamlCpp.cmake:** check the availability of the new (v0.5) API.
* **sample:** the directory containing a sample plug-in module.
* **tools/rime_patch.cc:** a command line tool to create patches.
* **thirdparty:** include source code of third-party libraries to ease
  building librime on Windows and Mac.



## 1.1 (2013-12-26)

* **new build dependency:** compiler with C++11 support.
  tested with GCC 4.8.2, Apple LLVM version 5.0, MSVC 12 (2013).
* **encoder:** disable warnings for phrase encode failures in log output;
  limit the number of results in encoding a phrase with multiple solutions.
* **punctuator:** fixed a bug in matching nested "pairs of 'symbols'".
* **speller:** better support for auto-committing, allowing users of table
  based input schema to omit explicitly selecting candidates in many cases.
* **schema_list_translator:** option for static schema list order.
* **table_translator:** fixed the range of CJK-D in charset filter.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants