使用LTP进行分词及词性标注

ltp_test in LTP 3.3.1 - (C) 2012-2015 HIT-SCIR
The console application for Language Technology Platform.
usage: ./ltp_test <options>
options:
--threads arg The number of threads [default=1].
--last-stage arg The last stage of analysis. This option can be used
when the user onlywants to perform early stage
analysis, like only segment without postagging.value
includes:
- ws: Chinese word segmentation
- pos: Part of speech tagging
- ner: Named entity recognization
- dp: Dependency parsing
- srl: Semantic role labeling (equals to all)
- all: The whole pipeline [default]
--input arg The path to the input file.
--segmentor-model arg The path to the segment model
[default=ltp_data/cws.model].
--segmentor-lexicon arg The path to the external lexicon in segmentor
[optional].
--postagger-model arg The path to the postag model
[default=ltp_data/pos.model].
--postagger-lexicon arg The path to the external lexicon in postagger
[optional].
--ner-model arg The path to the NER model [default=ltp_data/ner.model
].
--parser-model arg The path to the parser model
[default=ltp_data/parser.model].
--srl-data arg The path to the SRL model directory
[default=ltp_data/srl_data/].
--debug-level arg The debug level.
-h [ --help ] Show help information

3、测试例子
en.txt

Don't ever let somebody tell you you can't do something, not even me.
You got a dream, you gotta protect it.
People can’t do something themselves, they wanna tell you you can’t do it.
If you want something, go get it.
Period.