<commit_before>	           _                   _
	       ___| |__   _____      _(_)_ __   __ _
	      / __| '_ \ / _ \ \ /\ / / | '_ \ / _` |
	     | (__| | | |  __/\ V  V /| | | | | (_| |
	      \___|_| |_|\___| \_/\_/ |_|_| |_|\__, |
	                                       |___/
	               http://chewing.im/

# libchewing - The intelligent phonetic input method library

The Chewing (酷音) is an intelligent phonetic (Zhuyin/Bopomofo) input method,
one of the most popular choices for Traditional Chinese users. Chewing was
inspired by other proprietary intelligent Zhuyin input methods under Microsoft
Windows, namely, Wang-Xin by Eten, Microsoft New Zhuyin, and Nature Zhuyin.

The Chewing core team extended their work and actively maintains the project
as full open source efforts.

+ Website: <http://chewing.im/>
+ Issue tracker: <https://github.com/chewing/libchewing/issues>
+ Mailing lists:
   - Development: <http://groups.google.com/group/chewing-devel>
   - General: <http://groups.google.com/group/chewing>
+ Build Status:
   - Travis-Ci: [![Status-Icon](https://travis-ci.org/chewing/libchewing.svg?branch=master)](https://travis-ci.org/chewing/libchewing)
   - Coverity Scan: [![Coverity Scan Build Status](https://scan.coverity.com/projects/1273/badge.svg)](https://scan.coverity.com/projects/1273)
   - Coveralls: [![Coverage Status](https://img.shields.io/coveralls/chewing/libchewing.svg)](https://coveralls.io/r/chewing/libchewing?branch=master)
    - API changes/compatibility report: <http://upstream-tracker.org/versions/libchewing.html>


## History

libchewing is derived from the original Chewing input method, a xcin module
focusing on intelligent phonetic (Bopomofo/Zhuyin) processing by <NAME> (lckung) and <NAME> (kpchen) sponsored by <NAME> from
Academia Sinica during 1999-2001.  However, the original authors of Chewing
dropped its development, and Chewing was highly coupled with xcin, which
prevents from comprehensive applications.  There was a similar input method,
bimsphone, which was bundled in XCIN server. However, it did not provide a
convenient API for further development, either.


## Motivation

<NAME>, et al. formed the Chewing core team and extended Kung and Chen's
work since 2002.  The chewing core team renamed the project as "new" chewing
to differentiate their work from the original.  Nevertheless, the English name
has remained "chewing", which is identified by various input method framework
as well.

In 2004, Chewing core team successfully ported the input method to several
platforms and framework along with community collaboration.


## Development Goal of libchewing

- Split logic and view.
- Support multiple operating systems, and input framework.
- Provide a universal API for input framework and further development.


## Status


### 1. System bridge integration

Chewing has been adopted by various input frameworks in Unix-like systems and
even Microsoft Windows.  On these systems, the chewing package is usually
split into two parts: libchewing, which handles the actual character selection
logic; and input framework interface for display and preference setting.

+ The active integration:
  - JMCCE
  - SCIM
  - standalone Microsoft Windows 32/64-bit (windows-chewing)
  - Text Services Framework for Microsoft Windows
  - UIM
  - ibus
  - UCIMF
  - mozc
  - gcin/HIME
  - fcitx
+ The inactive one:
  - xcin
  - IIIMF
  - MacOS X (SpaceChewing)
  - Sun's Java Desktop System Input Method Framework
  - OpenVanilla Input Method Framework (previous than version 1.0)
  - OXIM


### 2. support phonetic keyboard layout

  - Hsu
  - IBM
  - Gin-Yieh
  - Eten
  - Eten 26 keys
  - Dvorak
  - Dvorak Hsu
  - <NAME>
  - Taiwan Huayu Luomapinyin
  - MPS2 Pinyin


### 3. External and unmerged projects

libchewing provides straightforward API and design, which enables third-party
projects to deploy the innovative.  Here are the examples:

  * FreeArray: utilizing libchewing for selecting phrases of Array input
   method.
   <https://github.com/shaform/libfreearray>
   <https://github.com/shaform/ibus-freearray>

  * CitC (Chewing in the Cloud): extending cloud services for real-time
   training and phrase selection based on Chewing IM.
   <https://code.google.com/p/citc/>

  * KindleChewing: Chewing IM for Kindle DX device
   <https://github.com/tjwei/KindleChewing>

  * NTNU-Master Input Method: A Faster Chinese IM based on windows-chewing
   <https://sites.google.com/site/ntnumaster001/>


## Minimal Build Tools Requirement

The following tools are used to build libchewing. Not all tools are necessary
during building. For example, if the compiler you used is clang, gcc & Visual
Studio are not needed. The versions listed here is the minimal version known to
build libchewing. If any tools you use below this version, libchewing might not
be built.

+ Build tools:
   - autoconf >= 2.65
   - automake >= 1.11.6
   - libtool >= 2.4.2
   - cmake >= 2.8.8 (optional)
+ Toolchain / IDE:
   - clang >= 3.2
   - gcc >= 4.6.3
   - Visual Studio Express 2012
+ Documentation tools:
   - texinfo >= 4.12


## Continuous Integration (CI) Service

libchewing uses the following CI services:

- <https://travis-ci.org/chewing/libchewing> (testing)
- <https://drone.io/github.com/chewing/libchewing> (testing)
- <https://coveralls.io/r/chewing/libchewing> (coverage report)
- <https://launchpad.net/~chewing/+archive/chewing> (ubuntu PPA)


## Installation


	# ./configure --prefix=/usr
	  (If you checkout from GIT, make sure running ./autogen.sh
	   before this.)
	# make
	# make install

see "INSTALL" for details.


## Cross-build

Example cross-build instructions:

	# CC_FOR_BUILD=gcc ./configure \
	    --host=arm-none-linux-gnueabi \
	    --disable-shared --enable-static
	# make


## Build on Windows with MinGW<commit_msg>Add installation instructions for macOS<commit_after>	           _                   _
	       ___| |__   _____      _(_)_ __   __ _
	      / __| '_ \ / _ \ \ /\ / / | '_ \ / _` |
	     | (__| | | |  __/\ V  V /| | | | | (_| |
	      \___|_| |_|\___| \_/\_/ |_|_| |_|\__, |
	                                       |___/
	               http://chewing.im/

# libchewing - The intelligent phonetic input method library

The Chewing (酷音) is an intelligent phonetic (Zhuyin/Bopomofo) input method,
one of the most popular choices for Traditional Chinese users. Chewing was
inspired by other proprietary intelligent Zhuyin input methods under Microsoft
Windows, namely, Wang-Xin by Eten, Microsoft New Zhuyin, and Nature Zhuyin.

The Chewing core team extended their work and actively maintains the project
as full open source efforts.

+ Website: <http://chewing.im/>
+ Issue tracker: <https://github.com/chewing/libchewing/issues>
+ Mailing lists:
   - Development: <http://groups.google.com/group/chewing-devel>
   - General: <http://groups.google.com/group/chewing>
+ Build Status:
   - Travis-Ci: [![Status-Icon](https://travis-ci.org/chewing/libchewing.svg?branch=master)](https://travis-ci.org/chewing/libchewing)
   - Coverity Scan: [![Coverity Scan Build Status](https://scan.coverity.com/projects/1273/badge.svg)](https://scan.coverity.com/projects/1273)
   - Coveralls: [![Coverage Status](https://img.shields.io/coveralls/chewing/libchewing.svg)](https://coveralls.io/r/chewing/libchewing?branch=master)
    - API changes/compatibility report: <http://upstream-tracker.org/versions/libchewing.html>


## History

libchewing is derived from the original Chewing input method, a xcin module
focusing on intelligent phonetic (Bopomofo/Zhuyin) processing by <NAME> (lckung) and <NAME> (kpchen) sponsored by <NAME> from
Academia Sinica during 1999-2001.  However, the original authors of Chewing
dropped its development, and Chewing was highly coupled with xcin, which
prevents from comprehensive applications.  There was a similar input method,
bimsphone, which was bundled in XCIN server. However, it did not provide a
convenient API for further development, either.


## Motivation

<NAME>, et al. formed the Chewing core team and extended Kung and Chen's
work since 2002.  The chewing core team renamed the project as "new" chewing
to differentiate their work from the original.  Nevertheless, the English name
has remained "chewing", which is identified by various input method framework
as well.

In 2004, Chewing core team successfully ported the input method to several
platforms and framework along with community collaboration.


## Development Goal of libchewing

- Split logic and view.
- Support multiple operating systems, and input framework.
- Provide a universal API for input framework and further development.


## Status


### 1. System bridge integration

Chewing has been adopted by various input frameworks in Unix-like systems and
even Microsoft Windows.  On these systems, the chewing package is usually
split into two parts: libchewing, which handles the actual character selection
logic; and input framework interface for display and preference setting.

+ The active integration:
  - JMCCE
  - SCIM
  - standalone Microsoft Windows 32/64-bit (windows-chewing)
  - Text Services Framework for Microsoft Windows
  - UIM
  - ibus
  - UCIMF
  - mozc
  - gcin/HIME
  - fcitx
+ The inactive one:
  - xcin
  - IIIMF
  - MacOS X (SpaceChewing)
  - Sun's Java Desktop System Input Method Framework
  - OpenVanilla Input Method Framework (previous than version 1.0)
  - OXIM


### 2. support phonetic keyboard layout

  - Hsu
  - IBM
  - Gin-Yieh
  - Eten
  - Eten 26 keys
  - Dvorak
  - Dvorak Hsu
  - <NAME>
  - Taiwan Hu<NAME>inyin
  - MPS2 Pinyin


### 3. External and unmerged projects

libchewing provides straightforward API and design, which enables third-party
projects to deploy the innovative.  Here are the examples:

  * FreeArray: utilizing libchewing for selecting phrases of Array input
   method.
   <https://github.com/shaform/libfreearray>
   <https://github.com/shaform/ibus-freearray>

  * CitC (Chewing in the Cloud): extending cloud services for real-time
   training and phrase selection based on Chewing IM.
   <https://code.google.com/p/citc/>

  * KindleChewing: Chewing IM for Kindle DX device
   <https://github.com/tjwei/KindleChewing>

  * NTNU-Master Input Method: A Faster Chinese IM based on windows-chewing
   <https://sites.google.com/site/ntnumaster001/>


## Minimal Build Tools Requirement

The following tools are used to build libchewing. Not all tools are necessary
during building. For example, if the compiler you used is clang, gcc & Visual
Studio are not needed. The versions listed here is the minimal version known to
build libchewing. If any tools you use below this version, libchewing might not
be built.

+ Build tools:
   - autoconf >= 2.65
   - automake >= 1.11.6
   - libtool >= 2.4.2
   - cmake >= 2.8.8 (optional)
+ Toolchain / IDE:
   - clang >= 3.2
   - gcc >= 4.6.3
   - Visual Studio Express 2012
+ Documentation tools:
   - texinfo >= 4.12


## Continuous Integration (CI) Service

libchewing uses the following CI services:

- <https://travis-ci.org/chewing/libchewing> (testing)
- <https://drone.io/github.com/chewing/libchewing> (testing)
- <https://coveralls.io/r/chewing/libchewing> (coverage report)
- <https://launchpad.net/~chewing/+archive/chewing> (ubuntu PPA)


## Installation

	# ./configure --prefix=/usr
	  (If you checkout from GIT, make sure running ./autogen.sh
	   before this.)
	# make
	# make install

For macOS:

	# brew install libchewing  # latest release version
	# brew install --HEAD libchewing  # development, git master branch

see "INSTALL" for details.


## Cross-build

Example cross-build instructions:

	# CC_FOR_BUILD=gcc ./configure \
	    --host=arm-none-linux-gnueabi \
	    --disable-shared --enable-static
	# make


## Build on Windows with MinGW
{'fraction_non_alphanumeric': 0.09761480349715644, 'fraction_numerical': 0.01086495204142263, 'mean_word_length': 3.3236697247706424, 'pattern_counts': {'":': 0, '<': 42, '<?xml version=': 0, '>': 56, 'https://': 32, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7160209', 'n_tokens_mistral': 3784, 'n_tokens_neox': 3489, 'n_words': 1222}