Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rime/librime-predict
librime plugin. predict next word.
https://github.com/rime/librime-predict
Last synced: 3 months ago
JSON representation
librime plugin. predict next word.
- Host: GitHub
- URL: https://github.com/rime/librime-predict
- Owner: rime
- License: bsd-3-clause
- Created: 2022-09-08T03:47:55.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2024-06-19T17:49:47.000Z (8 months ago)
- Last Synced: 2024-09-18T01:26:56.302Z (5 months ago)
- Language: C++
- Size: 30.3 KB
- Stars: 51
- Watchers: 8
- Forks: 13
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# librime-predict
librime plugin. predict next word.## Usage
* Put the db file (by default `predict.db`) in rime user directory.
* In `*.schema.yaml`, add `predictor` to the list of `engine/processors` before `key_binder`,
add `predict_translator` to the list of `engine/translators`;
or patch the schema with:
```yaml
patch:
'engine/processors/@before 0': predictor
'engine/translators/@before 0': predict_translator
```* Add the `prediction` switch:
```yaml
switches:
- name: prediction
states: [ 關閉預測, 開啓預測 ]
reset: 1
```
* Config items for your predictor:
```yaml
predictor:
# predict db file in user directory/shared directory
# default to 'predict.db'
db: predict.db
# max prediction candidates every time
# default to 0, which means showing all candidates
# you may set it the same with page_size so that period doesn't trigger next page
max_candidates: 5
# max continuous prediction times
# default to 0, which means no limitation
max_iterations: 1
```
* Deploy and enjoy.