java -cp "*" -Xmx500m edu.stanford.nlp.pipeline.StanfordCoreNLP -annotators tokenize,ssplit,pos -file english.txt -outputFormat conll

-----------------------------------------------------------------------------------

E:\cornlp\stanford-corenlp-full-2018-01-31>java -cp "*" -Xmx500m edu.stanford.nlp.pipeline.StanfordCoreNLP -annotators tokenize,ssplit,pos -file english.txt -outputFormat conll
[main] INFO edu.stanford.nlp.pipeline.StanfordCoreNLP - Adding annotator tokenize
[main] INFO edu.stanford.nlp.pipeline.TokenizerAnnotator - No tokenizer type provided. Defaulting to PTBTokenizer.
[main] INFO edu.stanford.nlp.pipeline.StanfordCoreNLP - Adding annotator ssplit
[main] INFO edu.stanford.nlp.pipeline.StanfordCoreNLP - Adding annotator pos
[main] INFO edu.stanford.nlp.tagger.maxent.MaxentTagger - Loading POS tagger from edu/stanford/nlp/models/pos-tagger/english-left3words/english-left3words-distsim.tagger ... done [2.0 sec].


Processing file E:\cornlp\stanford-corenlp-full-2018-01-31\english.txt ... writing to E:\cornlp\stanford-corenlp-full-2018-01-31\english.txt.conll
Annotating file E:\cornlp\stanford-corenlp-full-2018-01-31\english.txt ... done [0.3 sec].


Annotation pipeline timing information:
TokenizerAnnotator: 0.2 sec.
WordsToSentencesAnnotator: 0.0 sec.
POSTaggerAnnotator: 0.1 sec.
TOTAL: 0.3 sec. for 34 tokens at 133.9 tokens/sec.
Pipeline setup: 2.1 sec.

Total time for StanfordCoreNLP pipeline: 2.5 sec.

------------------------------------------------------------------------------------

【实例】用cmd 引用 java 生成 conll文件(stanford-corenlp)

--------------------------------------------------------------------

E:\cornlp\stanford-corenlp-full-2018-01-31>java -cp "*" -Xmx500m edu.stanford.nlp.pipeline.StanfordCoreNLP -annotators tokenize,ssplit,pos -encoding utf-8 /file a.txt -outputFormat conll

[main] INFO edu.stanford.nlp.pipeline.StanfordCoreNLP - Adding annotator tokenize
[main] INFO edu.stanford.nlp.pipeline.TokenizerAnnotator - No tokenizer type provided. Defaulting to PTBTokenizer.
[main] INFO edu.stanford.nlp.pipeline.StanfordCoreNLP - Adding annotator ssplit
[main] INFO edu.stanford.nlp.pipeline.StanfordCoreNLP - Adding annotator pos
[main] INFO edu.stanford.nlp.tagger.maxent.MaxentTagger - Loading POS tagger from edu/stanford/nlp/models/pos-tagger/english-left3words/english-left3words-distsim.tagger ... done [2.2 sec].


Entering interactive shell. Type q RETURN or EOF to quit.
NLP> StanfordCoreNLP(r'E:/cornlp/stanford-corenlp-full-2018-01-31/',lang='zh')
1       StanfordCoreNLP _       NN      _       _       _
2       -LRB-   _       -LRB-   _       _       _
3       r       _       NN      _       _       _
4       `       _       ``      _       _       _
5       E       _       NN      _       _       _
6       :       _       :       _       _       _
7       /       _       :       _       _       _
8       cornlp/stanford-corenlp-full    _       JJ      _       _       _
9       -2018-01-31     _       CD      _       _       _
10      /       _       :       _       _       _
11      '       _       ''      _       _       _
12      ,       _       ,       _       _       _
13      lang    _       NN      _       _       _
14      =       _       JJ      _       _       _
15      `       _       ``      _       _       _
16      zh      _       NN      _       _       _
17      '       _       ''      _       _       _
18      -RRB-   _       -RRB-   _       _       _




NLP>

相关文章:

  • 2021-08-31
  • 2022-02-11
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-07-15
  • 2022-12-23
猜你喜欢
  • 2022-01-18
  • 2022-12-23
  • 2022-12-23
  • 2021-11-11
  • 2021-11-10
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案