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

【功能请求】添加颜文字词库 #462

Closed
xtmu opened this issue Aug 31, 2023 · 6 comments
Closed

【功能请求】添加颜文字词库 #462

xtmu opened this issue Aug 31, 2023 · 6 comments

Comments

@xtmu
Copy link
Contributor

xtmu commented Aug 31, 2023

能否使用反查词典,实现正常打字时出现颜文字,用`反查时单独显示颜文字

鼠鬚管 Squirrel 快速输入颜文字的方法

这个方案按他的配置部署貌似检测不到 meow_emoji 方案

配置如下:

meow_emoji.schema.yaml

schema:
  schema_id: meow_emoji
  name: 貓顏文字
  version: "0.1"
  author:
    - hitigon <[email protected]>
  description: |
    Meow! 基於貓老師@_ym的貓顏文字詞庫

engine:
  processors:
    - key_binder
    - speller
    - punctuator
    - selector
    - navigator
    - express_editor
  segmentors:
    - abc_segmentor
    - punct_segmentor
    - fallback_segmentor
  translators:
    - echo_translator
    - punct_translator
    - table_translator

translator:
  dictionary: meow_emoji

punctuator:
  import_preset: default

key_binder:
  import_preset: default

meow_emoji.dict.yaml

# Rime dictionary
# encoding: utf-8

—
name: meow_emoji
version: "0.1"
sort: original
…

(/≥▽≤/) ataoyan
(╭ ̄3 ̄)╭♡ abaobei
(´・ω・`) azheyanga
_(:з」∠)_ azheyanga
(┙&gt;∧&lt;)┙へ┻┻ aheng
o( ̄ヘ ̄o#) aheng

rime_ice.custom.yaml

patch:
  engine/translators:
    – punct_translator
    – r10n_translator
    – reverse_lookup_translator
  recognizer/patterns/reverse_lookup: "`[a-z]*$"
  schema/dependencies:
    – meow_emoji
  abc_segmentor/extra_tags:
    – reverse_lookup
  reverse_lookup:
    dictionary: meow_emoji
    enable_completion: false
    prefix: "`"
    tips: 〔表情〕

相关修改 #463

颜文字词库推荐:rime_kaomoji_dict

期望能适配双拼输入。

@iDvel
Copy link
Owner

iDvel commented Aug 31, 2023

暂时不搞了,有这个需求的可以通过反查、自定义短语、opencc 等等实现。

这种方式没法适配所有双拼。

我觉得和 emoji 一样的实现方式比较好,这样同时支持全拼双拼五笔等等。
但 opencc 里的那些文件无法添加包含空格的词汇,空格被作为分隔符了,不知道怎么搞,颜文字很多都是包含空格的。
还有一个问题就是颜文字和 emoji 如果映射重合了,它们必须要放在同一个文件里,这样就无法只启用 emoji 或只启用颜文字。

@iDvel iDvel closed this as not planned Won't fix, can't repro, duplicate, stale Aug 31, 2023
@xtmu
Copy link
Contributor Author

xtmu commented Aug 31, 2023

opencc 不能空格有点无解,只能间接给 abc_segmentor 添加 kaomoji 标签来像使用 emoji 一样使用颜文字,而且颜文字不能设置权重。

@xtmu
Copy link
Contributor Author

xtmu commented Aug 31, 2023

请教一下反查翻译器和反查滤镜有什么区别,反查滤镜怎么配置以代替反查翻译器在次要码表中查询?

reverse_lookup_filter 反查滤镜,以更灵活的方式反查,Rime1.0后替代 reverse_lookup_translator
此项可加载多个实例,后接 @+滤镜名〔如: pinyin_lookup、 jyutping_lookup等〕

@iDvel
Copy link
Owner

iDvel commented Sep 1, 2023

不会用,试了一下没成功。

This was referenced Sep 1, 2023
@xtmu
Copy link
Contributor Author

xtmu commented Sep 2, 2023

这种方式没法适配所有双拼。

粗糙适配的双拼:颜文字双拼词典

@tksmly
Copy link
Contributor

tksmly commented Sep 5, 2023

暂时不搞了,有这个需求的可以通过反查、自定义短语、opencc 等等实现。

这种方式没法适配所有双拼。

我觉得和 emoji 一样的实现方式比较好,这样同时支持全拼双拼五笔等等。 但 opencc 里的那些文件无法添加包含空格的词汇,空格被作为分隔符了,不知道怎么搞,颜文字很多都是包含空格的。 还有一个问题就是颜文字和 emoji 如果映射重合了,它们必须要放在同一个文件里,这样就无法只启用 emoji 或只启用颜文字。

https://zh.wikipedia.org/wiki/%E7%A9%BA%E6%A0%BC#Unicode%E5%AE%9A%E7%BE%A9
用奇奇怪怪的空格脚本替换应该可以(大概

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

3 participants