<commit_before>
# demo-libchewing


## 原始討論串

* [討論「請教 ezgo13 的 fcitx-chewing 輸入法之自建字庫問題」](https://www.ubuntu-tw.org/modules/newbb/viewtopic.php?post_id=356758#forumpost356758)


## Prototype

* [chewing_userphrase_add](python/prototype/chewing_userphrase_add/00-start/main.py)
* [chewing_userphrase_enumerate](python/prototype/chewing_userphrase_add/00-start/main.py)
* [chewing_userphrase_lookup](python/prototype/chewing_userphrase_add/00-start/main.py)
* [chewing_userphrase_remove](python/prototype/chewing_userphrase_add/00-start/main.py)


## 相關連結

* https://gist.github.com/mitya57/1e49b079a91942782f62 ([1](https://www.ubuntu-tw.org/modules/newbb/viewtopic.php?post_id=356524#forumpost356524))
* https://docs.python.org/3/library/ctypes.html
* https://docs.python.org/2/library/ctypes.html


## Source Code 參考網址

* https://github.com/chewing/libchewing/blob/master/include/chewingio.h
* https://github.com/chewing/libchewing/blob/master/test/test-userphrase.c
* https://github.com/chewing/chewing-editor/blob/0.0.1/src/model/UserphraseModel.cpp#L199
* https://github.com/fcitx/fcitx-chewing/blob/master/src/eim.c<commit_msg>add url<commit_after>
# demo-libchewing


## 原始討論串

* [討論「請教 ezgo13 的 fcitx-chewing 輸入法之自建字庫問題」](https://www.ubuntu-tw.org/modules/newbb/viewtopic.php?post_id=356758#forumpost356758)


## Prototype

* [chewing_userphrase_add](python/prototype/chewing_userphrase_add/00-start/main.py) ([h](https://github.com/chewing/libchewing/blob/v0.4.0/include/chewingio.h#L531)) ([c](https://github.com/chewing/libchewing/blob/v0.4.0/src/chewingio.c#L1985))
* [chewing_userphrase_enumerate](python/prototype/chewing_userphrase_add/00-start/main.py) ([h](https://github.com/chewing/libchewing/blob/v0.4.0/include/chewingio.h#L523)) ([c](https://github.com/chewing/libchewing/blob/v0.4.0/src/chewingio.c#L1847))
* [chewing_userphrase_lookup](python/prototype/chewing_userphrase_add/00-start/main.py) ([h](https://github.com/chewing/libchewing/blob/v0.4.0/include/chewingio.h#L535)) ([c](https://github.com/chewing/libchewing/blob/v0.4.0/src/chewingio.c#L2055))
* [chewing_userphrase_remove](python/prototype/chewing_userphrase_add/00-start/main.py) ([h](https://github.com/chewing/libchewing/blob/v0.4.0/include/chewingio.h#L533)) ([c](https://github.com/chewing/libchewing/blob/v0.4.0/src/chewingio.c#L2026))


## 相關連結

* https://gist.github.com/mitya57/1e49b079a91942782f62 ([1](https://www.ubuntu-tw.org/modules/newbb/viewtopic.php?post_id=356524#forumpost356524))
* https://docs.python.org/3/library/ctypes.html
* https://docs.python.org/2/library/ctypes.html


## Source Code 參考網址

* https://github.com/chewing/libchewing/blob/master/include/chewingio.h
* https://github.com/chewing/libchewing/blob/master/test/test-userphrase.c
* https://github.com/chewing/chewing-editor/blob/0.0.1/src/model/UserphraseModel.cpp#L199
* https://github.com/fcitx/fcitx-chewing/blob/master/src/eim.c
{'fraction_non_alphanumeric': 0.1790633608815427, 'fraction_numerical': 0.05991735537190083, 'mean_word_length': 5.662844036697248, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 26, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5227120', 'n_tokens_mistral': 1326, 'n_tokens_neox': 1251, 'n_words': 58}