【发布时间】:2015-02-03 15:29:35
【问题描述】:
我是斯坦福 CoreNLP 工具的新手。现在我没有得到很好的中文分段结果,所以我想改变Segmenter的粒度。我想我可以通过训练自己的听写来做到这一点。
我下载了trainSegmenter-20080521文件,然后关注trainSegmenter-20080521/README.txt。
这是 README.txt:
Sat Jun 21 00:57:22 2008
Author: Pi-Chuan Chang
Here's a documentation of how to train and test the segmenter on specific split
range of the CTB data.
The following steps assumes you have 3 files defining the ranges of train/dev/test.
They should be named as "ctb6.train", "ctb6.dev", "ctb6.test" respectively.
The format should be like:
chtb_0003.fid
chtb_0015.fid
...
[STEP 1] change the CTB6 path in the Makefile:
CTB6=/afs/ir/data/linguistic-data/Chinese-Treebank/6/
[STEP 2] download and uncompress the lastest segmenter from:
http://nlp.stanford.edu/software/stanford-chinese-segmenter-2008-05-21.tar.gz
and change this path in the Makefile to your local path:
SEGMENTER=/tmp/stanford-chinese-segmenter-2008-05-21/
[STEP 3] simply type:
make all
You can also split down into these sub-steps:
make internaldict # make internal dictionaries for affixation feaetures
make data # make datasets
make traintest # train & test the CRF segmenter
但是我还是有一些问题:
训练文件的格式是什么,
train/dev/test各自是干什么用的?chtb_0003.fid、chtb_0015.fid等是什么?Makefile中的
CTB6 path是什么,看来我应该把变量CTB6改成/afs/ir/data/linguistic-data/Chinese-Treebank/6/。但它在那里很远,似乎不是一个有效的子路径。
顺便说一句,有很多属性应该设置为特殊需求,例如sighanPostProcessing和serDictionary。
有没有什么地方我可以得到所有这些属性及其解释?
我现在所能做的就是阅读源代码,例如,edu.stanford.nlp.sequences.SeqClassifierFlags.java,但我仍然对这些属性标志感到困惑。
非常感谢任何人的帮助。
【问题讨论】:
标签: java nlp classification stanford-nlp