Giter Site home page Giter Site logo

mcbopomofo-core's Introduction

McBopomofoCore

此專案為小麥注音輸入法 fcitx 版的一個分叉,用以維護其核心引擎以及提供 C API,方便移植到不同輸入法框架。
請注意這些 C API 仍在實驗階段,將隨時變動。


以下為原始 README 內容


fcitx5-mcbopomofo: 小麥注音輸入法 fcitx5 模組

本專案是小麥注音的 Linux 版本,功能與小麥注音 macOS 版同步:

  • 提供自動選字注音
  • 提供傳統注音(打一字選一字「ㄅ半」注音)
  • 用戶自訂詞功能:可在組字區加詞,亦可直接修改用戶詞庫檔案及刪詞設定檔
  • 記憶使用者最近選字
  • 支援標準、倚天、許氏鍵盤、倚天 26 鍵等常見注音鍵盤排列
  • 便捷輸入各種中文標點符號
  • 支援微軟新注音式「游標後」跟漢音式「游標前」選字

與 macOS 版的主要差別如下:

  • 注音組字只支援空白鍵
  • 使用 fcitx5 內建選字窗
  • 繁簡轉換使用 fcitx5 內建 chttrans 模組

此外,在專案組織上:

  • 目前直接使用 McBopomofo macOS 版產生的資料檔
  • 語言模型及選字引擎程式碼目前從 macOS 版拷貝過來

安裝方式

以下說明如何在 Ubuntu 22.04 LTS 上面編譯安裝。

請先安裝 fcitx5, CMake, 以及以下開發用模組:

sudo apt install \
    fcitx5 libfcitx5core-dev libfcitx5config-dev libfcitx5utils-dev \
    cmake extra-cmake-modules gettext libfmt-dev

然後在本專案的 git 目錄下執行以下指令:

mkdir -p build
cd build
cmake ../ -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Debug
make
sudo make install

# 初次安裝後,執行以下指令,小麥注音 icon 就會出現在 fcitx5 選單中
sudo update-icon-caches /usr/share/icons/*

在其他 Linux Distro 上安裝

  • 我們計畫利用 wiki 收集在其他 Linux distro 上安裝的方式,歡迎提供內容與指正。

C++ 語法風格

本專案的程式碼大致採用 Google C++ style。我們已經設定好 .clang-format 檔案,請在發送 PR 前使用 clang-format 重整風格即可。

本專案跟 Google C++ style 不同的地方如下:

  • 我們不使用 snake_case 變數名稱。變數或參數一律使用 lowerCamelCase 風格。
  • 成員函數不使用 Foo::PascalCaseMethod()。成員函數一律使用 Foo::lowerCamelCaseMethod() 風格。

此外,src/Engine/ 目錄裡的程式碼,傳統上使用 WebKit style,未來繼續使用 WebKit 風格。我們也在該目錄放置了符合該風格的 .clang-format

我們也推薦使用 cpplint 檢查 C++ 常見問題。

社群公約

歡迎小麥注音 Linux 用戶回報問題與指教,也歡迎大家參與小麥注音開發。

我們採用了 GitHub 的通用社群公約。公約的中文版請參考這裡的翻譯。我們以上述公約,作為維護小麥注音社群的準則。

mcbopomofo-core's People

Contributors

lukhnos avatar zonble avatar andy0130tw avatar brli avatar wengxt avatar tinywrkb avatar xatier avatar

Watchers

 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.