You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
chikkarpy is a Python version of [chikkar](https://github.com/WorksApplications/chikkar).
12
+
chikkarpy is developed to utilize the [Sudachi synonym dictionary](https://github.com/WorksApplications/SudachiDict/blob/develop/docs/synonyms.md) and add synonym expansion to the output of [SudachiPy](https://github.com/WorksApplications/SudachiPy).
13
+
This library alone can be used as a search tool for our synonym dictionaries.
14
+
14
15
## 利用方法 Usage
15
16
## TL;DR
16
17
```bash
@@ -20,19 +21,30 @@ $ echo "閉店" | chikkarpy
20
21
閉店 クローズ,close,店仕舞い
21
22
```
22
23
23
-
## Step 1. chikkarpyのインストール
24
+
## Step 1. chikkarpyのインストール Install chikkarpy
24
25
```bash
25
26
$ pip install chikkarpy
26
27
```
27
-
## Step 2. 使用方法
28
-
### コマンドライン
28
+
29
+
## Step 2. 使用方法 Usage
30
+
### コマンドライン Command Line
29
31
```bash
30
32
$ echo"閉店"| chikkarpy
31
33
閉店 クローズ,close,店仕舞い
32
34
```
33
35
chikkarpyは入力された単語を見て一致する同義語のリストを返します。
36
+
chikkarpy looks at a headword of synonym dictionary by the entered word and returns a list of matching synonyms.
37
+
34
38
同義語辞書内の曖昧性フラグが`1`の見出し語をトリガーにすることはできません。
39
+
You cannot use a headword with an ambiguity flag of `1` in a synonym dictionary as a search trigger.
40
+
35
41
出力は`クエリ\t同義語リスト`の形式です。
42
+
The output is in the form of a `query \t synonym list`.
When you use your user dictionary, you should specify the binary dictionary to read with `-d`.
71
+
(For building a binary dictionary, see [Building a Dictionary](#辞書の作成-Build-a-dictionary).)
72
+
58
73
複数辞書を読み込む場合は順番に注意してください。
59
-
以下の場合,user2 > user > system の順で同義語を検索して見つかった時点で検索結果を返します。
74
+
When reading multiple dictionaries, pay attention to the order.
75
+
76
+
以下の場合,**user2 > user > system** の順で同義語を検索して見つかった時点で検索結果を返します。
77
+
In the following cases, the synonyms are searched in the order of **user2 > user > system**, and the search results are returned which are first found.
60
78
61
79
```bash
62
80
chikkarpy -d system.dic user.dic user2.dic
63
81
```
64
82
65
83
また、出力はデフォルトで**体言**のみです。
84
+
Also, the output is **noun** only by default.
85
+
66
86
**用言**も出力したい場合は`-ev`を有効にしてください。
87
+
When you want to output **verb** as well, please enable`-ev`.
67
88
68
89
```bash
69
90
$ echo"開放"| chikkarpy
@@ -72,41 +93,62 @@ $ echo "開放" | chikkarpy -ev
72
93
開放 開け放す,開く,オープン,open
73
94
```
74
95
96
+
### Python ライブラリ / Python library
97
+
使用例 Example of use
75
98
76
-
### python ライブラリ
77
-
使用例
78
99
```python
79
100
from chikkarpy import Chikkar
80
101
from chikkarpy.dictionarylib import Dictionary
81
102
82
103
chikkar = Chikkar()
83
104
84
-
system_dic = Dictionary("system.dic", False)
105
+
# デフォルトのシステム同義語辞書を使う場合,Dictionaryの引数は省略可能 You may omit the ``Dictionary`` arguments if you want to use the system synonym dictionary
Follow the [Sudachi Synonym Dictionary](https://github.com/WorksApplications/SudachiDict/blob/develop/docs/synonyms.md) for the format of the synonym dictionary.
0 commit comments