Giter VIP home page Giter VIP logo

rime-xh's Introduction

RIME 配置

基于rime实现的 以小鹤双拼作为双拼方案 以超强音形(二笔)作为辅助码 实现的输入方案

Features

配置文件结构

.
├── dicts/                                -- 词库目录
│   ├── extend/                           -- 分类扩展词库
│   ├── thirdpart/                        -- 第三方词库
│   ├── top/                              -- 固顶词库 主要包含单字、用户自定义短语、辅助码词库
│   │   ├── custom_phrase.txt             -- 自定义固顶短语
│   │   ├── erbi_filter.txt               -- 二笔辅助码词库
│   │   ├── erbi_filter_lookup.txt        -- 二笔辅助码反查词库
│   │   ├── top_single_char.txt           -- 固顶单字
│   │   └── top_words.txt                 -- 固顶词组
│   └── pinyin.dict.yaml                  -- 拼音基础词库
├── opencc/                               -- emoji相关opencc配置
├── lua                                   -- lua扩展
│   ├── date_translator.lua               -- date、time转日期、时间实现
│   └── select_character_processor.lua    -- 以词定字实现
├── default.custom.yaml                   -- 配置索引
├── mine.schema.yaml                      -- rime具体配置文件
├── english.dict.yaml                     -- english词库
├── english.schema.yaml                   -- english方案
├── pinyin.extended.dict.yaml             -- 词库配置索引
├── rime.lua                              -- lua扩展索引
└── README.md                             -- README文件

如何使用

# 确保你已经正确安装fictx5和rime, 以archlinux举例
sudo pacman -S fcitx5 fcitx5-qt fcitx5-gtk fcitx5-config-qt fcitx5-material-color fcitx5-im fcitx5-rime
sudo echo '
GTK_IM_MODULE=fcitx
QT_IM_MODULE=fcitx
XMODIFIERS=@im=fcitx
SDL_IM_MODULE=fcitx
GLFW_IM_MODULE=ibus' >> /etc/environment

# clone本仓库
mkdir -p ~/.local/share/fcitx5
git clone https://github.com/yaocccc/rime ~/.local/share/fcitx5/rime

按键说明

  [        以词定字 选中选中词的第一个字
  ]        以词定字 选中选中词的第二个字
  回车     上屏编码
  左shift  上屏第二个候选
  右shift  上屏第三个候选
  左ctrl   清空编码

小鹤双拼

具体键位不在此处额外说明 主要由 ./mine.schema.yaml/speller 处实现

emoji混输

通过opencc实现 若不想使用该功能 请注释掉 ./mine.schema.yaml 中的

engine:
  filters:
    - simplifier@emoji_suggestion

---

emoji_suggestion:
  opencc_config: emoji.json
  option_name: emoji_suggestion
  tips: all

中英混输

通过english方案实现 若不想使用该功能 请注释掉 ./mine.schema.yaml 中的

engine:
  translators:
    - table_translator@english         # 英文输入

---

english:
  dictionary: english
  enable_completion: true
  enable_sentence: false
  initial_quality: 0

基于二笔输入法的形码辅助码

主要通过 ./dicts/top/erbi_filter.txt 实现

  主: 小鹤双拼
  辅: 单字第三码 由 超强音形 的 形码提供筛选 (正常2码或者多码打单字或词组不受影响)
  例:
    if = chen, m = 乚丨 即 ifm = 陈
    la = la,   l = 口   即 lal = 啦
    jq = jiu,  x = 丨   即 jqx = 旧
    dajx 依旧是 大家,xl 依旧是想,不会受辅助码影响

erbi


通过table_translator实现 若不想使用该功能 请注释掉 ./mine.schema.yaml 中的

engine:
  translators:
    - table_translator@erbi_filter     # 二笔辅助码

---

erbi_filter:
  dictionary: ""
  user_dict: ./dicts/top/erbi_filter
  db_class: stabledb
  enable_completion: false
  enable_sentence: false
  initial_quality: 1

辅助码查询

因辅助码经常想不起来 故添加了该功能 由 ./dicts/top/erbi_filter_lookup.txt 实现

使用: 输入单字拼音再输入jj可见该拼音的所有字的辅助码
e.g. 输入 erjj 可展示所有 拼音为 er 的所有字的辅助码

为什么是jj, 因为小鹤双拼中没有对应候选的连续组合有 tt 和 jj,jj相对更容易使用

用户自定义短语

  若有需要自定义的短语 写入 ./dicts/top/custom_phrase.txt 即可
  如果想某些词百分百固定在顶部 写入 ./dicts/top/top_words.txt 即可
  如果想更改单字顺序 修改 ./dicts/top/top_single_char.txt 即可

基于LUA的扩展

./lua 目录中实现了两个扩展

  1. 输入date、time可扩展为日期和时间
  2. 使用 [ ] 进行 以词定字

如需扩展 可自行修改相关的文件

Q & A

Q: 如何自定义短语?
A: 修改 custom_phrase.txt 注意不要修改上面的内容

Q: 是否支持切换双拼方案?
A: 不支持 不仅mine.schema.yaml中是根据小鹤双拼定制的,固定词库中也是以此定制

rime-xh's People

Contributors

coderyouxuan avatar yaocccc avatar

Stargazers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.