Code Monkey home page Code Monkey logo

dictionaries's Introduction

Rime 擴充詞庫

使用方法

  1. 下載詞庫 https://github.com/rime-aca/dictionaries.git (或是直接 clone / pull 這個 repo)

    注意到其中應該有六個檔案:

    double_pinyin.custom.yaml
    luna_pinyin.custom.yaml
    luna_pinyin.hanyu.dict.yaml
    luna_pinyin.cn_en.dict.yaml
    luna_pinyin.extended.dict.yaml
    luna_pinyin.poetry.dict.yaml*
    
  2. 將上述檔案中後面五個移至你的 Rime 目錄底下 (depends on your OS),以 OS X 來說,就是在 ~/Library/Rime/ 底下

    # 部署位置:
    # ~/.config/ibus/rime  (Linux)
    # ~/Library/Rime  (Mac OS)
    # %APPDATA%\Rime  (Windows)
    
  3. 若爲雙拼使用者,請將 double_pinyin.custom.yaml 改名成你所使用的雙拼方案的代碼 如 double_pinyin_abc.custom.yaml,並放入第二步所說的目錄底下 若該目錄底下已有這個檔案,那麼將這兩個檔案中的內容 merge 即可

    附雙拼方案與其對應的 id 一覽表:

    輸入方案 id
    自然碼雙拼 double_pinyin
    智能ABC雙拼 double_pinyin_abc
    小鶴雙拼 double_pinyin_flypy
    MSPY雙拼 double_pinyin_mspy
  4. 若爲「朙月拼音」系列輸入方案使用者,請將補靪文件 luna_pinyin.custom.yaml 改名爲你所使用的輸入方案對應的 id。(比如朙月拼音·簡化字方案,則將 luna_pinyin.custom.yaml 改名爲 luna_pinyin_simp.custom.yaml)。

驗證:切換到拼音或其他適用方案,輸入「一介書生」(驗證擴充詞庫之基本詞庫)、「一丈紅」(驗證擴充詞庫之漢語大詞典詞彙)、「疑是地上霜」(驗證擴充詞庫之詩詞詞庫)、輸入「哆啦A夢(duo la a meng)」(驗證擴充詞庫之西文詞庫,此子詞庫爲朙月拼音系列方案專有,雙拼方案不推薦使用)。

增加自己的詞庫

在這個架構底下增加自己的詞庫相當容易,只需新增一個自訂的 *.dict.yaml 檔案,內容可以仿照 luna_pinyin.extended.dict.yaml,並於其中引入 luna_pinyin.extended 及相關字典檔,例如:

# lazywei.dict.yaml
---
name: lazywei
version: "2015.1.10"
sort: by_weight
use_preset_vocabulary: true
import_tables:
  - luna_pinyin
  - luna_pinyin.extended
  - luna_pinyin.hanyu
  - luna_pinyin.poetry
...

這是我的詞

接着再於 *.schema.yaml*.custom.yaml 中將 translator/dictionary 設置成此字典檔即可,例如:

patch:
  translator/dictionary: lazywei

如此,往後 luna_pinyin.extended 升級時並不會影響到這個 lazywei.dict.yaml,所以直接將所有檔案覆蓋即可。

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.