@@ -8,9 +8,9 @@ Start a container with:
88
99Your application will be available at http://localhost:8000 .
1010
11- ### Customise Wordlist
11+ ### Customise Wordlists and Sentences
1212
13- You might want to run HanziGraph on your own filtered wordlist instead of the full dictionary provided.
13+ You might want to run HanziGraph on your own filtered wordlists instead of the full dictionary provided.
1414
1515For this, create a ` wordlist.json ` file containing the array of your words:
1616
@@ -23,13 +23,40 @@ For this, create a `wordlist.json` file containing the array of your words:
2323]
2424```
2525
26- Then, in ` compose.yaml ` add a new bind mount to your custom wordlist by adapting ` YOUR-PATH-TO ` :
26+ Then, in ` compose.yaml ` add a new bind mount to your custom wordlist by adapting ` YOUR-PATH-TO ` and ` TARGET-CHARSET ` .
27+ ` TARGET-CHARSET ` should be one of ` simplified ` , ` traditional ` , ` hsk ` or ` cantonese ` .
2728
2829``` yaml
2930 ...
3031 volumes :
3132 - " <YOUR-PATH-TO>/wordlist.json\
32- :/usr/src/app/public/data/simplified/wordlist.json\
33+ :/usr/src/app/public/data/<TARGET-CHARSET>/wordlist.json\
34+ :ro"
35+ ...
36+ ```
37+
38+ Similarly, you can customise the available sentences too. Create a ` sentences.json ` file containing an array with
39+ elements as the one below. The Chinese translations are split into meaningful words to guide segmentation.
40+
41+ ``` json
42+ {
43+ "en" : " Guilin's sceneries are the most beautiful ones under the heaven." ,
44+ "zh" : [
45+ " 桂林山水" ,
46+ " 甲天下" ,
47+ " 。"
48+ ],
49+ "pinyin" : " Gui4lin2 shan1shui3 jia3 tian1xia4."
50+ },
51+ ```
52+
53+ Just like with wordlists, activate your custom sentences:
54+
55+ ``` yaml
56+ ...
57+ volumes :
58+ - " <YOUR-PATH-TO>/sentences.json\
59+ :/usr/src/app/public/data/<TARGET-CHARSET>/sentences.json\
3360 :ro"
3461 ...
3562```
0 commit comments