diff --git a/README.md b/README.md index 26743a07a..40b686306 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ 详细介绍:[Rime 配置:雾凇拼音](https://dvel.me/posts/rime-ice/) -小狼毫、同文请看一下 [常见问题](https://github.com/iDvel/rime-ice/issues/133) +[常见问题](https://github.com/iDvel/rime-ice/issues/133)
diff --git a/double_pinyin.schema.yaml b/double_pinyin.schema.yaml index a2f5d2cf8..fa5f0c596 100644 --- a/double_pinyin.schema.yaml +++ b/double_pinyin.schema.yaml @@ -51,8 +51,8 @@ switches: # 输入引擎 engine: processors: - - lua_processor@*select_character # 以词定字 - # - lua_processor@*cold_word_drop.processor # 词条隐藏、降频 + - lua_processor@select_character # 以词定字 + # - lua_processor@cold_word_drop_processor # 词条隐藏、降频 - ascii_composer - recognizer - key_binder @@ -70,17 +70,17 @@ engine: translators: - punct_translator - script_translator - - lua_translator@*date_translator # 时间、日期、星期 + - lua_translator@date_translator # 时间、日期、星期 - table_translator@custom_phrase # 自定义短语 custom_phrase_double.txt - table_translator@melt_eng # 英文输入 - reverse_lookup_translator@liangfen # 反查,两分拼字 - - lua_translator@*unicode # Unicode + - lua_translator@unicode # Unicode filters: - simplifier@emoji # Emoji - simplifier@traditionalize # 简繁切换 - # - lua_filter@*is_in_user_dict # 为用户词典中(输入过)的内容结尾加上一个星号 * - # - lua_filter@*cold_word_drop.filter # 强制删词, 词条降频(选中高亮的词条放到第四位) - - lua_filter@*reduce_english_filter # 词条隐藏、降频 + # - lua_filter@is_in_user_dict # 为用户词典中(输入过)的内容结尾加上一个星号 + # - lua_filter@cold_word_drop_filter # 词条隐藏、降频 + - lua_filter@reduce_english_filter # 降低部分英语单词在候选项的位置 - uniquifier # 去重 diff --git a/double_pinyin_flypy.schema.yaml b/double_pinyin_flypy.schema.yaml index 9c688f101..13180b83d 100644 --- a/double_pinyin_flypy.schema.yaml +++ b/double_pinyin_flypy.schema.yaml @@ -51,8 +51,8 @@ switches: # 输入引擎 engine: processors: - - lua_processor@*select_character # 以词定字 - # - lua_processor@*cold_word_drop.processor # 词条隐藏、降频 + - lua_processor@select_character # 以词定字 + # - lua_processor@cold_word_drop_processor # 词条隐藏、降频 - ascii_composer - recognizer - key_binder @@ -70,17 +70,17 @@ engine: translators: - punct_translator - script_translator - - lua_translator@*date_translator # 时间、日期、星期 + - lua_translator@date_translator # 时间、日期、星期 - table_translator@custom_phrase # 自定义短语 custom_phrase_double.txt - table_translator@melt_eng # 英文输入 - reverse_lookup_translator@liangfen # 反查,两分拼字 - - lua_translator@*unicode # Unicode + - lua_translator@unicode # Unicode filters: - simplifier@emoji # Emoji - simplifier@traditionalize # 简繁切换 - # - lua_filter@*is_in_user_dict # 为用户词典中(输入过)的内容结尾加上一个星号 * - # - lua_filter@*cold_word_drop.filter # 词条隐藏、降频 - - lua_filter@*reduce_english_filter # 降低部分英语单词在候选项的位置 + # - lua_filter@is_in_user_dict # 为用户词典中(输入过)的内容结尾加上一个星号 + # - lua_filter@cold_word_drop_filter # 词条隐藏、降频 + - lua_filter@reduce_english_filter # 降低部分英语单词在候选项的位置 - uniquifier # 去重 diff --git a/double_pinyin_mspy.schema.yaml b/double_pinyin_mspy.schema.yaml index e0fc8729d..21cdeff3f 100644 --- a/double_pinyin_mspy.schema.yaml +++ b/double_pinyin_mspy.schema.yaml @@ -51,8 +51,8 @@ switches: # 输入引擎 engine: processors: - - lua_processor@*select_character # 以词定字 - # - lua_processor@*cold_word_drop.processor # 词条隐藏、降频 + - lua_processor@select_character # 以词定字 + # - lua_processor@cold_word_drop_processor # 词条隐藏、降频 - ascii_composer - recognizer - key_binder @@ -70,17 +70,17 @@ engine: translators: - punct_translator - script_translator - - lua_translator@*date_translator # 时间、日期、星期 + - lua_translator@date_translator # 时间、日期、星期 - table_translator@custom_phrase # 自定义短语 custom_phrase_double.txt - table_translator@melt_eng # 英文输入 - reverse_lookup_translator@liangfen # 反查,两分拼字 - - lua_translator@*unicode # Unicode + - lua_translator@unicode # Unicode filters: - simplifier@emoji # Emoji - simplifier@traditionalize # 简繁切换 - # - lua_filter@*is_in_user_dict # 为用户词典中(输入过)的内容结尾加上一个星号 * - # - lua_filter@*cold_word_drop.filter # 词条隐藏、降频 - - lua_filter@*reduce_english_filter # 降低部分英语单词在候选项的位置 + # - lua_filter@is_in_user_dict # 为用户词典中(输入过)的内容结尾加上一个星号 + # - lua_filter@cold_word_drop_filter # 词条隐藏、降频 + - lua_filter@reduce_english_filter # 降低部分英语单词在候选项的位置 - uniquifier # 去重 diff --git a/double_pinyin_ziguang.schema.yaml b/double_pinyin_ziguang.schema.yaml index 2768a3df1..74f2a9729 100644 --- a/double_pinyin_ziguang.schema.yaml +++ b/double_pinyin_ziguang.schema.yaml @@ -51,8 +51,8 @@ switches: # 输入引擎 engine: processors: - - lua_processor@*select_character # 以词定字 - # - lua_processor@*cold_word_drop.processor # 词条隐藏、降频 + - lua_processor@select_character # 以词定字 + # - lua_processor@cold_word_drop_processor # 词条隐藏、降频 - ascii_composer - recognizer - key_binder @@ -70,17 +70,17 @@ engine: translators: - punct_translator - script_translator - - lua_translator@*date_translator # 时间、日期、星期 + - lua_translator@date_translator # 时间、日期、星期 - table_translator@custom_phrase # 自定义短语 custom_phrase_double.txt - table_translator@melt_eng # 英文输入 - reverse_lookup_translator@liangfen # 反查,两分拼字 - - lua_translator@*unicode # Unicode + - lua_translator@unicode # Unicode filters: - simplifier@emoji # Emoji - simplifier@traditionalize # 简繁切换 - # - lua_filter@*is_in_user_dict # 为用户词典中(输入过)的内容结尾加上一个星号 * - # - lua_filter@*cold_word_drop.filter # 强制删词, 词条降频(选中高亮的词条放到第四位) - - lua_filter@*reduce_english_filter # 词条隐藏、降频 + # - lua_filter@is_in_user_dict # 为用户词典中(输入过)的内容结尾加上一个星号 + # - lua_filter@cold_word_drop_filter # 词条隐藏、降频 + - lua_filter@reduce_english_filter # 降低部分英语单词在候选项的位置 - uniquifier # 去重 diff --git a/others/recipes/full.recipe.yaml b/others/recipes/full.recipe.yaml index 70a06c13e..beeff356a 100644 --- a/others/recipes/full.recipe.yaml +++ b/others/recipes/full.recipe.yaml @@ -9,6 +9,7 @@ install_files: >- cn_dicts/*.* en_dicts/*.* opencc/*.* + rime.lua lua/*.* lua/cold_word_drop/*.* default.yaml diff --git a/rime.lua b/rime.lua new file mode 100644 index 000000000..19218fcd8 --- /dev/null +++ b/rime.lua @@ -0,0 +1,12 @@ +-- Rime Lua 扩展 https://github.com/hchunhui/librime-lua +-- 文档 https://github.com/hchunhui/librime-lua/wiki/Scripting + +select_character = require("select_character") +date_translator = require("date_translator") +unicode = require("unicode") +is_in_user_dict = require("is_in_user_dict") +v_filter = require("v_filter") +reduce_english_filter = require("reduce_english_filter") +long_word_filter = require("long_word_filter") +cold_word_drop_processor = require("cold_word_drop.processor") +cold_word_drop_filter = require("cold_word_drop.filter") diff --git a/rime_ice.schema.yaml b/rime_ice.schema.yaml index 7c33200f6..7e63968b2 100644 --- a/rime_ice.schema.yaml +++ b/rime_ice.schema.yaml @@ -42,8 +42,8 @@ switches: # 输入引擎 engine: processors: - - lua_processor@*select_character # 以词定字 - # - lua_processor@*cold_word_drop.processor # 词条隐藏、降频 + - lua_processor@select_character # 以词定字 + # - lua_processor@cold_word_drop_processor # 词条隐藏、降频 - ascii_composer - recognizer - key_binder @@ -61,19 +61,19 @@ engine: translators: - punct_translator - script_translator - - lua_translator@*date_translator # 时间、日期、星期 + - lua_translator@date_translator # 时间、日期、星期 - table_translator@custom_phrase # 自定义短语 custom_phrase.txt - table_translator@melt_eng # 英文输入 - reverse_lookup_translator@liangfen # 反查,两分拼字 - - lua_translator@*unicode # Unicode + - lua_translator@unicode # Unicode filters: - simplifier@emoji # Emoji - simplifier@traditionalize # 简繁切换 - # - lua_filter@*is_in_user_dict # 为用户词典中(输入过)的内容结尾加上一个星号 * - - lua_filter@*v_filter # v 模式 symbols 优先(否则是英文优先) - - lua_filter@*reduce_english_filter # 降低部分英语单词在候选项的位置 - # - lua_filter@*cold_word_drop.filter # 词条隐藏、降频 - - lua_filter@*long_word_filter # 长词优先 + # - lua_filter@is_in_user_dict # 为用户词典中(输入过)的内容结尾加上一个星号 + - lua_filter@v_filter # v 模式 symbols 优先(否则是英文优先) + - lua_filter@reduce_english_filter # 降低部分英语单词在候选项的位置 + # - lua_filter@cold_word_drop_filter # 词条隐藏、降频 + - lua_filter@long_word_filter # 长词优先 - uniquifier # 去重