-
Notifications
You must be signed in to change notification settings - Fork 0
/
README.md
54 lines (45 loc) · 1.31 KB
/
README.md
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# ChineseWordSegmentation
该项目中介绍了jieba,hanlp,snownlp,nlpir,pkuseg,thulac几个常用分词工具,并结合其分词性能与时间效率做了比较
# 实验流程介绍
> 分词工具安装
> [数据下载](http://sighan.cs.uchicago.edu/bakeoff2005/)
> 实验
## 分词工具安装及使用
> 1、[jieba](https://github.com/fxsjy/jieba)
```python
pip3 install jieba
```
> 2、[hanlp](https://github.com/hankcs/HanLP)
```python
pip3 install hanlp
```
> 3、[pkuseg](https://github.com/lancopku/PKUSeg-python)
```python
pip3 install pkuseg
```
> 4、[thulac](https://github.com/thunlp/THULAC-Python)
```python
pip3 install thulac
```
> 5、[snownlp](https://github.com/isnowfy/snownlp)
```python
pip3 install snownlp
```
> 6、[nlpir](https://github.com/NLPIR-team/NLPIR)
```python
pip3 install pynlpir
```
## data目录结构
主要和本项目相关的目录,可以直接下载使用上边的[数据集](http://sighan.cs.uchicago.edu/bakeoff2005/)<br/>
data<br/>
-icwb2<br/>
-testing<br/>
-gold<br/>
-segment(该目录由程序生成)<br/>
## 项目运行
> 该项目共两个参数,
> 第一个参数为分词工具,其范围[hanlp,jieba,snownlp,nlpir,pkuseg,thulac]
> 第二个参数为分词的数据集[cityu, as, msr, pku]
`
python segment_score.py jieba as
`