{"id":13420342,"url":"https://github.com/chewing/libchewing","last_synced_at":"2026-01-12T11:49:19.772Z","repository":{"id":1399041,"uuid":"1418153","full_name":"chewing/libchewing","owner":"chewing","description":"libchewing - The intelligent phonetic input method library","archived":false,"fork":false,"pushed_at":"2024-04-14T03:02:23.000Z","size":27082,"stargazers_count":323,"open_issues_count":111,"forks_count":88,"subscribers_count":31,"default_branch":"master","last_synced_at":"2024-04-14T09:39:11.182Z","etag":null,"topics":["bopomofo","chewing","input-method","zhuyin"],"latest_commit_sha":null,"homepage":"https://chewing.im/","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-2.1","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/chewing.png","metadata":{"files":{"readme":"README.md","changelog":"ChangeLog-svn","contributing":".github/CONTRIBUTING.md","funding":null,"license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS","dei":null}},"created_at":"2011-02-27T15:19:23.000Z","updated_at":"2024-05-02T03:00:26.664Z","dependencies_parsed_at":"2023-11-26T08:28:10.178Z","dependency_job_id":"31dd5b5a-707d-4b55-8452-279cbb91e59c","html_url":"https://github.com/chewing/libchewing","commit_stats":{"total_commits":1672,"total_committers":56,"mean_commits":"29.857142857142858","dds":0.631578947368421,"last_synced_commit":"587e9d69679876f7b4f743f88e5e8537e363c6e0"},"previous_names":[],"tags_count":34,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chewing%2Flibchewing","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chewing%2Flibchewing/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chewing%2Flibchewing/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chewing%2Flibchewing/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chewing","download_url":"https://codeload.github.com/chewing/libchewing/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243695454,"owners_count":20332622,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bopomofo","chewing","input-method","zhuyin"],"created_at":"2024-07-30T22:01:31.663Z","updated_at":"2025-12-16T19:20:12.149Z","avatar_url":"https://github.com/chewing.png","language":"C","funding_links":[],"categories":["TODO scan for Android support in followings","Rust"],"sub_categories":[],"readme":"```\n\t           _                   _\n\t       ___| |__   _____      _(_)_ __   __ _\n\t      / __| '_ \\ / _ \\ \\ /\\ / / | '_ \\ / _` |\n\t     | (__| | | |  __/\\ V  V /| | | | | (_| |\n\t      \\___|_| |_|\\___| \\_/\\_/ |_|_| |_|\\__, |\n\t                                       |___/\n\t               https://chewing.im/\n```\n\n# libchewing - The intelligent phonetic input method library\n\nThe Chewing (酷音) is an intelligent phonetic input method (Zhuyin/Bopomofo)\nand is one of the most popular choices for Traditional Chinese users. Chewing\nwas inspired by other proprietary intelligent Zhuyin input methods on Microsoft\nWindows, namely Wang-Xin by Eten, Microsoft New Zhuyin, and Nature Zhuyin (aka\nGoing). The Chewing developer maintains the project as a fully open-source\neffort, positioning it as a leading libre intelligent phonetic solution among\nmajor operating environments.\n\n+ Website: \u003chttps://chewing.im/\u003e\n+ Issue tracker: \u003chttps://github.com/chewing/libchewing/issues\u003e\n+ Mailing lists:\n   - Development: \u003chttps://groups.google.com/group/chewing-devel\u003e\n   - General: \u003chttps://groups.google.com/group/chewing\u003e\n+ Matrix:\n   - Development: \u003chttps://matrix.to/#/#libchewing:matrix.org\u003e\n   - General: \u003chttps://matrix.to/#/#chewing-users:matrix.org\u003e\n+ Build Status:\n   - Github Actions: [![CI](https://github.com/chewing/libchewing/actions/workflows/ci.yml/badge.svg)](https://github.com/chewing/libchewing/actions/workflows/ci.yml)\n   - Coverity Scan: [![Coverity Scan Build Status](https://scan.coverity.com/projects/1273/badge.svg)](https://scan.coverity.com/projects/1273)\n   - Codecov: [![codecov](https://codecov.io/gh/chewing/libchewing/graph/badge.svg?token=r1piKsG5uF)](https://codecov.io/gh/chewing/libchewing)\n\nlibchewing releases can be verified with the following OpenPGP public key\n\n\u0026emsp;[083B3CAB64267E5BAB7159673EF0C673DADCC30C][pgp_key] Libchewing Signing Key \u0026lt;release@chewing.im\u0026gt;\n\nor the following [minisign][] public key\n\n\u0026emsp;RWRzJFnXiLZleAyCIv1talBjyRewelcy9gzYQq9pd3SKSFBPoy57sf5s\n\n[pgp_key]: https://chewing.im/.well-known/openpgpkey/hu/y84sdmnksfqswe7fxf5mzjg53tbdz8f5?l=release\n[minisign]: https://jedisct1.github.io/minisign/\n\n## Status\n\n### 1. System bridge integration\n\nChewing has been integrated into various input frameworks in Unix-like systems\nand even in Microsoft Windows and Android. On these systems, the Chewing package\nis typically divided into two parts: libchewing, which manages the actual\ncharacter selection logic, and an input framework interface for display and\npreference settings.\n\n+ The active integration:\n  - [Windows TSF](https://github.com/chewing/windows-chewing-tsf)\n  - [PIME](https://github.com/EasyIME/PIME)\n  - [ibus](https://github.com/chewing/ibus-chewing)\n  - [HIME](https://hime-ime.github.io/)\n  - [fcitx](https://github.com/fcitx/fcitx5-chewing)\n  - [Guileless Bopomofo](https://github.com/hiroshiyui/GuilelessBopomofo)\n  - [Fcitx5 macOS](https://github.com/fcitx-contrib/fcitx5-macos)\n+ The inactive one: [SCIM](https://github.com/chewing/scim-chewing), standalone Microsoft Windows 32/64-bit ([windows-chewing](https://github.com/chewing/windows-chewing)), mozc, [uim](https://github.com/uim/uim-chewing), [ucimf](https://github.com/matlinuxer2/ucimf), JMCCE, xcin, IIIMF, standalone MacOS X (SpaceChewing), Sun's Java Desktop System Input Method Framework, OpenVanilla Input Method Framework (previous than version 1.0), and OXIM.\n\n\n### 2. Support phonetic keyboard layout\n\n  - DaChen (default)\n  - Hsu\n  - IBM\n  - Gin-Yieh\n  - Eten\n  - Eten 26 keys\n  - Dvorak\n  - Dvorak Hsu\n  - HanYu PinYin\n  - Taiwan Huayu Luomapinyin\n  - MPS2 Pinyin\n  - Colemak\n  - Colemak-DH ANSI\n  - Colemak-DH Ortholinear\n  - Workman\n\n\n### 3. External and unmerged projects\n\nlibchewing provides a straightforward API and design, enabling third-party\nprojects to deploy innovative features. Here are some examples:\n* [FreeArray](https://github.com/shaform/libfreearray): utilizing libchewing for\n  selecting phrases of Array input method.\n* [CitC](https://code.google.com/p/citc/) (Chewing in the Cloud): extending cloud\n  services for real-time training and phrase selection based on Chewing IM.\n* [KindleChewing: Chewing IM for Kindle DX device](https://github.com/tjwei/KindleChewing)\n* [NTNU-Master Input Method](http://rportal.lib.ntnu.edu.tw/items/42d5cd11-5fab-4d27-9f26-d01b80588a82): A faster Chinese IM based on windows-chewing\n\n\n## Build and Installation\n\n### Prerequisites\n\nThe following tools are used to build libchewing. Not all tools are necessary\nduring building. For example, if the compiler you used is clang, gcc \u0026 Visual\nStudio are not needed. The versions listed here is the minimal version known to\nbuild libchewing. If any tools you use below this version, libchewing might not\nbe built.\n\n+ Build tools:\n   - cmake \u003e= 3.21.0\n+ Toolchain / IDE:\n   - clang \u003e= 3.2 OR gcc \u003e= 4.6.3\n   - Rust \u003e= 1.88\n   - Build Tools for Visual Studio 2022 for MSVC build\n   - Vcpkg for MSVC build\n+ Documentation tools:\n   - texinfo \u003e= 4.8\n\n\n### Build via CMake\n\nUse the default preset:\n\n    cmake --preset default --install-prefix /usr\n    cmake --build build\n    cmake --build build -t test\n    cmake --build build -t install\n\nBuild the rust implementation:\n\n    cmake --preset rust-release --install-prefix /usr\n    cmake --build build\n    cmake --build build -t test\n    cmake --build build -t install\n\nCheck other supported presets:\n\n    cmake --list-presets\n\n### Cross-build\n\nDefine a [cmake-toolchains][] file to cross-compile.\n\nExample cross-build instructions:\n\n    cmake --preset default --toolchain arm-none-linux-gnueabi.cmake\n    cmake --build build\n\n[cmake-toolchains]: https://cmake.org/cmake/help/latest/manual/cmake-toolchains.7.html\n\n### Build on Windows with Build Tools for Visual Studio 2022\n\nTo build libchewing on Windows and link to other program build from MSVC, you\nneed to use the MSVC toolchain. To install the build environment:\n\nOpen admin prompt `cmd.exe`\n\n    winget install Microsoft.VisualStudio.2022.BuildTools\n    winget install Ninja-build.Ninja\n    winget install Kitware.CMake\n    winget install Rustlang.Rustup\n\n\nOptional development tools\n\n    winget install Git.Git\n    winget install VSCodium.VSCodium\n\nReboot, then open `Visual Studio Installer` and install C/C++ components.\n\nOpen `x64 Native Tools Command Prompt for VS 2022`\n\n    rustup default stable\n    cmake -G Ninja --preset rust\n\nNow you have the build environment for libchewing. You can follow the installation\nsteps to build with cmake.\n\n### Build on macOS\n\nTo build libchewing on macOS, you will need tools listed in the requirements.\nSince macOS does not ship with these tools, building them from source can be\na tricky task.\n\nA simple way to install these tools is through [Homebrew](https://brew.sh/),\na package manager for macOS. Once Homebrew is installed, run the following\ncommands to install the tools you need:\n\n    brew install cmake\n    brew install rustup\n    rustup default stable\n\n### Minimum Supported Rust Version\n\nTo ensure libchewing can be built on various Linux distributions, we use the\nminimum rust version available from major distributions' next release branch.\nData source: https://repology.org/project/rust/versions\n\n* Current MSRV: 1.88.0 (Debian unstable)\n\n\n## Usage\n\nChewing enables users to input Chinese by its pronunciation, using either\n[Bopomofo/Zhuyin][1] or [Hanyu pinyin][2]. It also supports Chinese punctuation\nmarks, as well as both normal and full-shape numbers and the English alphabet.\n\nThe following sections are based on the assumption that you are using the\ndefault configuration. This includes the default/DaChen Bopomofo keyboard layout\non an en\\_US keyboard, along with the default key-binding.\n\n### Glossary\n\nPreedit Buffer: This is the area where your typing is stored before being sent\nto the applications (such as Firefox) you are using.\n\nMode: This determines how Chewing responds to keyboard input.\n\n### Editing mode\n\nThis mode facilitates the typing of normal Chinese characters and punctuation\nand is typically the default working mode.\n\nIn this mode, alphanumeric characters and punctuation marks are interpreted as\nBopomofo symbols or punctuation marks. When these symbols form Chinese\ncharacters, the system chooses the most appropriate character based on the\ncontext in the preedit buffer.\n\nEntering complete Chinese sentences is advantageous as it allows the system to\nperform auto-correction. To confirm the output, pressing Enter will commit the\ncharacters in the preedit buffer.\n\nIn case of errors, characters can be selected by moving the cursor with {Left}\nor {Right}, followed by pressing {Down} to enter Candidate Selection mode for\nword choice.\n\nAuto-correction for a specific phrase can be overridden by pressing {Tab} at the\nend of the sentence.\n\nMemorization of 2, 3, or 4-word phrases is possible by pressing {Ctrl-2},\n{Ctrl-3}, or {Ctrl-4} at the phrase's end.\n\nThe behavior of the Shift key changes in this mode. Using Shift with an\nalphanumeric key outputs corresponding full-shape Chinese symbols if \"Easy\nSymbol Input\" is enabled, or outputs corresponding half-shape lowercase English\nalphabets if \"Easy Symbol Input\" is disabled.\n\nFor inputting Chinese symbols, aside from enabling \"Easy Symbol Input\" mode,\npressing {Ctrl-1} or {`} opens a symbol selection dialog. After selecting the\ncategory, the {Down} key can be used to choose symbols as one would for\ncharacters.\n\n\tKey binding   API name                   Functionality\n\t-----------   --------                   -------------\n\tCaps Lock     chewing_handle_Capslock    Toggle Temporary English sub-mode\n\tDown          chewing_handle_Down        Enter Candidate Selection mode\n\tShift-Space   chewing_handle_ShiftSpace  Toggle Half/Full Shape sub-mode\n\tEnter         chewing_handle_Enter       Commit the content in preedit buffer\n\t                                         to active application window\n\tTab           chewing_handle_Tab         Break the auto-correction.\n\tCtrl-1        chewing_handle_CtrlNum     Open symbol selection dialog\n\tCtrl-2        chewing_handle_CtrlNum     Remember 2-word phrase.\n\tCtrl-3        chewing_handle_CtrlNum     Remember 3-word phrase.\n\tCtrl-4        chewing_handle_CtrlNum     Remember 4-word phrase.\n\n\n### Half/Full Shape sub-mode\n\nThis sub-mode is for inputting half-shape and full-shape characters. Half-shape\ncharacters are essentially normal English characters, while full-shape\ncharacters are stylized symbols that resemble English characters in a larger,\nmore prominent format.\n\n\tKey binding   API name                   Functionality\n\t-----------   --------                   -------------\n\tShift-Space   chewing_handle_ShiftSpace  Toggle Half/Full Shape sub-mode\n\n\n### Temporary English sub-mode\n\nThis sub-mode is for temporary English inputting.\n\n\tKey binding   API name                   Functionality\n\t-----------   --------                   -------------\n\tCaps Lock     chewing_handle_Capslock    Toggle Temporary English sub-mode\n\n\n### Candidate Selection mode\n\nThis mode is for choosing the candidate. It first displays the longest phrases\nthat match the pronunciation, followed by progressively shorter phrases, down\nto single characters. Pressing {Down} cycles back to the longest phrases.\n\nFor example, after entering \"w91o3g4\" and pressing {Down}, Chewing displays\nthe 3-word candidate \"台北市\". Pressing {Down} again shows the 2-word candidate\n\"北市\". Another press of {Down} brings up 1-word candidates \"市\" and \"是\".\nPressing {Down} once more cycles back to the 3-word candidate \"台北市\".\n\n\n\tKey binding   API name                   Functionality\n\t-----------   --------                   -------------\n\tDown          chewing_handle_Down        Next bunch of candidates in\n\t                                         different length\n\tLeft          chewing_handle_Left        Previous page of candidates\n\tRight         chewing_handle_Right       Next page of candidates\n\t1, 2, ...0    chewing_handle_Default     Select 1st, 2nd, ... 10th candidate\n\n\n### Bypass mode\n\nThis mode is active whenever the preedit buffer is empty. It enables the use\nof movement keys (such as cursor keys and page up/page down) and popular key\nbindings (such as Ctrl-A, Ctrl-S).\n\nFor a brief overview of using the libchewing APIs, please refer to the\nsimplified example in the file `contrib/simple-select.c`.\n\n[1]: https://en.wikipedia.org/wiki/Bopomofo\n[2]: https://en.wikipedia.org/wiki/Pinyin\n\n\n## History\n\nLibchewing is derived from the original Chewing input method, a module of XCIN\nthat focuses on intelligent phonetic (Bopomofo/Zhuyin) processing and was\ninitially intended for use with the X Window System. This input method module\nwas developed by Lu-chuan Kung (lckung) and Kang-pen Chen (kpchen), and was\nsponsored by Tsan-sheng Hsu from Academia Sinica between 1999 and 2001.\n\nHowever, the original authors eventually ceased the development of Chewing, and\nits strong coupling with XCIN limited its application in broader contexts.\nAdditionally, there was a similar input method, bimsphone, which was included in\nthe XCIN server. Like Chewing, bimsphone also lacked a convenient API for\nfurther development. In 2002, Jim Huang, along with others, formed the Chewing\ncore team and extended the work of Kung and Chen. The Chewing core team renamed\nthe project \"New Chewing\" to differentiate their work from the original.\nNevertheless, the English name has remained \"Chewing,\" which is recognized by\nvarious input method frameworks as well.\n\n\n## License\n\nExcept for the following source code, all other source code is licensed under\nthe GNU LGPL v2.1 (Lesser General Public License v2.1), or (at your option) any\nlater version. See \"COPYING\" for details:\n* The directory \"thirdparty/sqlite-amalgamation\" contains the SQLite3 source,\n  which is in the public domain. For more information, see \u003chttps://www.sqlite.org/copyright.html\u003e.\n* The file \"cmake/FindCurses.cmake\" is modified from the CMake source and is\n  licensed under the BSD 3-Clause license.\n\n\n## Authors \u0026 Contact Information\n\nSee \"AUTHORS\" for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchewing%2Flibchewing","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchewing%2Flibchewing","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchewing%2Flibchewing/lists"}