File tree 3 files changed +7
-5
lines changed
3 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -42,10 +42,11 @@ jobs:
42
42
- name : Build predict.db
43
43
working-directory : build/bin
44
44
run : |
45
+ mkdir build
45
46
wget https://github.com/rime/librime-predict/releases/download/data-1.0/predict.txt
46
- wget -O release.db https://github.com/rime/librime-predict/releases/download/data-1.0/predict.db
47
- cat predict.txt | ../plugins/predict/bin/build_predict
48
- diff predict.db release.db
47
+ wget -O build/ release.db https://github.com/rime/librime-predict/releases/download/data-1.0/predict.db
48
+ cat predict.txt | ../plugins/predict/bin/build_predict build/predict.db
49
+ diff build/{ predict, release} .db
49
50
50
51
- name : Test
51
52
working-directory : build/bin
Original file line number Diff line number Diff line change 2
2
librime plugin. predict next word.
3
3
4
4
## Usage
5
- * Put the db file (by default ` predict.db ` ) in rime user directory.
5
+ * Put the db file (by default ` predict.db ` ) in ` build/ ` under rime user directory.
6
6
* In ` *.schema.yaml ` , add ` predictor ` to the list of ` engine/processors ` before ` key_binder ` ,
7
7
or patch the schema with: ` engine/processors/@before 0: predictor `
8
8
* Add the ` prediction ` switch:
Original file line number Diff line number Diff line change @@ -136,7 +136,8 @@ Predictor* PredictorComponent::Create(const Ticket& ticket) {
136
136
}
137
137
if (!db_ || db_->file_name () != db_file) {
138
138
the<ResourceResolver> res (
139
- Service::instance ().CreateResourceResolver ({" predict_db" , " " , " " }));
139
+ Service::instance ().CreateDeployedResourceResolver (
140
+ {" predict_db" , " " , " " }));
140
141
string path = res->ResolvePath (db_file).string ();
141
142
auto db = std::make_unique<PredictDb>(path);
142
143
if (db && db->Load ()) {
You can’t perform that action at this time.
0 commit comments