Skip to content

Commit

Permalink
README
Browse files Browse the repository at this point in the history
  • Loading branch information
leizongmin committed Oct 29, 2015
1 parent 2ff2cad commit fd6bcb0
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions README.md
Expand Up @@ -92,6 +92,20 @@ console.log(result);

### 转换同义词

载入同义词词典:

```javascript
segment.loadSynonymDict('synonym.txt');
```

词典格式:

```
什么时候,何时
```

在分词时设置`convertSynonym=true`则结果中的`"什么时候"`将被转换为`"何时"`

```javascript
var text = '什么时候我也开始夜夜无法入睡';
var result = segment.doSegment(text, {
Expand Down

0 comments on commit fd6bcb0

Please sign in to comment.