{"action":"created","issue":{"url":"https://api.github.com/repos/rime/librime/issues/239","repository_url":"https://api.github.com/repos/rime/librime","labels_url":"https://api.github.com/repos/rime/librime/issues/239/labels{/name}","comments_url":"https://api.github.com/repos/rime/librime/issues/239/comments","events_url":"https://api.github.com/repos/rime/librime/issues/239/events","html_url":"https://github.com/rime/librime/issues/239","id":394796683,"node_id":"MDU6SXNzdWUzOTQ3OTY2ODM=","number":239,"title":"opencc滤镜生效作用域的问题","user":{"login":"yanhuacuo","id":3107994,"node_id":"MDQ6VXNlcjMxMDc5OTQ=","avatar_url":"https://avatars2.githubusercontent.com/u/3107994?v=4","gravatar_id":"","url":"https://api.github.com/users/yanhuacuo","html_url":"https://github.com/yanhuacuo","followers_url":"https://api.github.com/users/yanhuacuo/followers","following_url":"https://api.github.com/users/yanhuacuo/following{/other_user}","gists_url":"https://api.github.com/users/yanhuacuo/gists{/gist_id}","starred_url":"https://api.github.com/users/yanhuacuo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yanhuacuo/subscriptions","organizations_url":"https://api.github.com/users/yanhuacuo/orgs","repos_url":"https://api.github.com/users/yanhuacuo/repos","events_url":"https://api.github.com/users/yanhuacuo/events{/privacy}","received_events_url":"https://api.github.com/users/yanhuacuo/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-12-29T13:38:34Z","updated_at":"2018-12-29T18:02:42Z","closed_at":"2018-12-29T16:11:23Z","author_association":"NONE","body":"近日来，我和「98五笔吧」的几位小伙伴们尝试在 RIME 上实现一些有趣的功能，在[这份](https://github.com/yanhuacuo/98WB)尝试性的配置文件上，做到了以下几点：\r\n\r\n- 给汉字或词组缀加传统的带声调的拼音显示\r\n\r\n![缀音](https://raw.githubusercontent.com/yanhuacuo/98WB/master/issues/%E7%BC%80%E9%9F%B3.png)\r\n\r\n- 给拼音方案加注即时五笔编码显示\r\n\r\n![编码](https://raw.githubusercontent.com/yanhuacuo/98WB/master/issues/%E7%BC%96%E7%A0%81.png)\r\n\r\n- 定义「 \\` ] 为编码切分符，并以之引导实现在「整句」模式下的「手工加词」\r\n\r\n![造词](https://raw.githubusercontent.com/yanhuacuo/98WB/master/issues/%E9%80%A0%E8%AF%8D.png)\r\n\r\n然而，这份配置有个「致命缺陷」：「 z 」键反查失效了，如图所示：\r\n\r\n![反查](https://raw.githubusercontent.com/yanhuacuo/98WB/master/issues/%E5%8F%8D%E6%9F%A5.png)\r\n\r\n梳理了一下思路，发现是 opencc 全局生效造成的，于是，我尝试给缀音的声明字段加「tags」，并在「 recognizer/patterns 」中给它限定作用域为 [a-y]{1,4}\r\n\r\n![限定](https://raw.githubusercontent.com/yanhuacuo/98WB/master/issues/%E9%99%90%E5%AE%9A.png)\r\n\r\n此时，「 z 」键引导的「临时拼音反查」恢复了：\r\n\r\n![恢复](https://raw.githubusercontent.com/yanhuacuo/98WB/master/issues/%E6%81%A2%E5%A4%8D.png)\r\n\r\n但是，四码唯一自动上屏失效了。这是最接近成功的修改，此除之外，我们尝试过各种各样的修改方式，都有更多更严重的问题。\r\n\r\n\r\n\r\n![四码唯一字示例](https://raw.githubusercontent.com/yanhuacuo/98WB/master/issues/%E5%9B%9B%E7%A0%81%E5%94%AF%E4%B8%80%E8%87%AA%E5%8A%A8%E4%B8%8A%E5%B1%8F.png)\r\n\r\n\r\n不知可有兼顾「z」键临时拼音反查，「\\`」键引导的整句模式下的手工造词，以及同时使这副「 opencc缀音滤镜 」只在  五笔模式（ 正则：[a-y]{1,4} )  下生效，不干扰「z」键拼音反查和「\\`」键手工造词的办法 ？"},"comment":{"url":"https://api.github.com/repos/rime/librime/issues/comments/450509753","html_url":"https://github.com/rime/librime/issues/239#issuecomment-450509753","issue_url":"https://api.github.com/repos/rime/librime/issues/239","id":450509753,"node_id":"MDEyOklzc3VlQ29tbWVudDQ1MDUwOTc1Mw==","user":{"login":"yanhuacuo","id":3107994,"node_id":"MDQ6VXNlcjMxMDc5OTQ=","avatar_url":"https://avatars2.githubusercontent.com/u/3107994?v=4","gravatar_id":"","url":"https://api.github.com/users/yanhuacuo","html_url":"https://github.com/yanhuacuo","followers_url":"https://api.github.com/users/yanhuacuo/followers","following_url":"https://api.github.com/users/yanhuacuo/following{/other_user}","gists_url":"https://api.github.com/users/yanhuacuo/gists{/gist_id}","starred_url":"https://api.github.com/users/yanhuacuo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yanhuacuo/subscriptions","organizations_url":"https://api.github.com/users/yanhuacuo/orgs","repos_url":"https://api.github.com/users/yanhuacuo/repos","events_url":"https://api.github.com/users/yanhuacuo/events{/privacy}","received_events_url":"https://api.github.com/users/yanhuacuo/received_events","type":"User","site_admin":false},"created_at":"2018-12-29T18:02:42Z","updated_at":"2018-12-29T18:02:42Z","author_association":"NONE","body":"> 主翻譯器和用默認的 `abc` tag；拼音標註用的 opencc 過濾器指定 tag 爲 `abc`；\r\n> 給 z 鍵反查指定一個不同於 `abc` 的 tag。\r\n\r\n追问一个新问题，功能性冲突的问题俱已解决，改成了  [这样](https://github.com/yanhuacuo/98WB/blob/master/wubi98_ci.schema.yaml)，在这种设定下，反查以「z」开头的「汉字」，比如「在」这个字时，需要按「3」次「z」键，这个副作用似乎是正则引起的，不知怎样改写才妥当，求释疑。"}}
{"actor":{"display_login":"yanhuacuo"}}