Stanford3.8.0依存句法分析在java中运行
2017-12-28 13:14
399 查看
linux 下的Stanford词性标注
java -mx1g -cp "/home/hadoop/stanford-corenlp-full-2017-06-09/stanford-postagger.jar:" edu.stanford.nlp.tagger.maxent.MaxentTagger -model "/home/hadoop/stanford-corenlp-full-2017-06-09/models/chinese-distsim.tagger" -textFile source.txt > result-linux.txt
win7下的Stanford 依存句法分析
java -mx150m -cp "*;" edu.stanford.nlp.parser.lexparser.LexicalizedParser -outputFormat "penn,typedDependencies" lexparser/chinesePCFG.ser.gz source.txt > my.txt
linux 下的Stanford 依存句法分析
java -mx150m -cp "/home/hadoop/stanford-parser-full-2017-06-09/*:" edu.stanford.nlp.parser.lexparser.LexicalizedParser -outputFormat "penn,typedDependencies" lexparser/chinesePCFG.ser.gz source.txt > my.txt
(ROOT
(IP
(NP (NR 张传庆))
(VP
(ADVP (AD 曾))
(PP (P 在)
(LCP
(NP
(QP (CD 许多))
(NP (NR 中国) (NN 引水) (NN 隧洞) (NN 项目)))
(LC 中)))
(VP (VV 发挥)
(NP
(ADJP (JJ 重要))
(NP (NN 作用。)))))))
nsubj(发挥-10, 张传庆-1)
advmod(发挥-10, 曾-2)
case(项目-8, 在-3)
dep(项目-8, 许多-4)
compound:nn(项目-8, 中国-5)
compound:nn(项目-8, 引水-6)
compound:nn(项目-8, 隧洞-7)
nmod:prep(发挥-10, 项目-8)
case(项目-8, 中-9)
root(ROOT-0, 发挥-10)
amod(作用。-12, 重要-11)
dobj(发挥-10, 作用。-12)
去掉penn
java -mx150m -cp "/home/hadoop/stanford-parser-full-2017-06-09/*:" edu.stanford.nlp.parser.lexparser.LexicalizedParser -outputFormat "typedDependencies" lexparser/chinesePCFG.ser.gz source.txt > my.txt
只显示penn
输出:
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
Parsing file: source.txt
Parsing [sent. 1 len. 12]: 张传庆 曾 在 许多 中国 引水 隧洞 项目 中 发挥 重要 作用。
Parsed file: source.txt [1 sentences].
Parsed 12 words in 1 sentences (7.22 wds/sec; 0.60 sents/sec).
hadoop@master:~/stanford-parser-full-2017-06-09$ cat my.txt
nsubj(发挥-10, 张传庆-1)
advmod(发挥-10, 曾-2)
case(项目-8, 在-3)
dep(项目-8, 许多-4)
compound:nn(项目-8, 中国-5)
compound:nn(项目-8, 引水-6)
compound:nn(项目-8, 隧洞-7)
nmod:prep(发挥-10, 项目-8)
case(项目-8, 中-9)
root(ROOT-0, 发挥-10)
amod(作用。-12, 重要-11)
dobj(发挥-10, 作用。-12)
java -mx150m -cp "/home/hadoop/stanford-parser-full-2017-06-09/*:" edu.stanford.nlp.parser.lexparser.LexicalizedParser -outputFormat "penn" lexparser/chinesePCFG.ser.gz source.txt > my.txt
输出
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
Parsing file: source.txt
Parsing [sent. 1 len. 12]: 张传庆 曾 在 许多 中国 引水 隧洞 项目 中 发挥 重要 作用。
Parsed file: source.txt [1 sentences].
Parsed 12 words in 1 sentences (20.76 wds/sec; 1.73 sents/sec).
hadoop@master:~/stanford-parser-full-2017-06-09$ cat my.txt
(ROOT
(IP
(NP (NR 张传庆))
(VP
(ADVP (AD 曾))
(PP (P 在)
(LCP
(NP
(QP (CD 许多))
(NP (NR 中国) (NN 引水) (NN 隧洞) (NN 项目)))
(LC 中)))
(VP (VV 发挥)
(NP
(ADJP (JJ 重要))
(NP (NN 作用。)))))))
java -mx1g -cp "/home/hadoop/stanford-corenlp-full-2017-06-09/stanford-postagger.jar:" edu.stanford.nlp.tagger.maxent.MaxentTagger -model "/home/hadoop/stanford-corenlp-full-2017-06-09/models/chinese-distsim.tagger" -textFile source.txt > result-linux.txt
win7下的Stanford 依存句法分析
java -mx150m -cp "*;" edu.stanford.nlp.parser.lexparser.LexicalizedParser -outputFormat "penn,typedDependencies" lexparser/chinesePCFG.ser.gz source.txt > my.txt
linux 下的Stanford 依存句法分析
java -mx150m -cp "/home/hadoop/stanford-parser-full-2017-06-09/*:" edu.stanford.nlp.parser.lexparser.LexicalizedParser -outputFormat "penn,typedDependencies" lexparser/chinesePCFG.ser.gz source.txt > my.txt
(ROOT
(IP
(NP (NR 张传庆))
(VP
(ADVP (AD 曾))
(PP (P 在)
(LCP
(NP
(QP (CD 许多))
(NP (NR 中国) (NN 引水) (NN 隧洞) (NN 项目)))
(LC 中)))
(VP (VV 发挥)
(NP
(ADJP (JJ 重要))
(NP (NN 作用。)))))))
nsubj(发挥-10, 张传庆-1)
advmod(发挥-10, 曾-2)
case(项目-8, 在-3)
dep(项目-8, 许多-4)
compound:nn(项目-8, 中国-5)
compound:nn(项目-8, 引水-6)
compound:nn(项目-8, 隧洞-7)
nmod:prep(发挥-10, 项目-8)
case(项目-8, 中-9)
root(ROOT-0, 发挥-10)
amod(作用。-12, 重要-11)
dobj(发挥-10, 作用。-12)
去掉penn
java -mx150m -cp "/home/hadoop/stanford-parser-full-2017-06-09/*:" edu.stanford.nlp.parser.lexparser.LexicalizedParser -outputFormat "typedDependencies" lexparser/chinesePCFG.ser.gz source.txt > my.txt
只显示penn
输出:
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
Parsing file: source.txt
Parsing [sent. 1 len. 12]: 张传庆 曾 在 许多 中国 引水 隧洞 项目 中 发挥 重要 作用。
Parsed file: source.txt [1 sentences].
Parsed 12 words in 1 sentences (7.22 wds/sec; 0.60 sents/sec).
hadoop@master:~/stanford-parser-full-2017-06-09$ cat my.txt
nsubj(发挥-10, 张传庆-1)
advmod(发挥-10, 曾-2)
case(项目-8, 在-3)
dep(项目-8, 许多-4)
compound:nn(项目-8, 中国-5)
compound:nn(项目-8, 引水-6)
compound:nn(项目-8, 隧洞-7)
nmod:prep(发挥-10, 项目-8)
case(项目-8, 中-9)
root(ROOT-0, 发挥-10)
amod(作用。-12, 重要-11)
dobj(发挥-10, 作用。-12)
java -mx150m -cp "/home/hadoop/stanford-parser-full-2017-06-09/*:" edu.stanford.nlp.parser.lexparser.LexicalizedParser -outputFormat "penn" lexparser/chinesePCFG.ser.gz source.txt > my.txt
输出
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
Parsing file: source.txt
Parsing [sent. 1 len. 12]: 张传庆 曾 在 许多 中国 引水 隧洞 项目 中 发挥 重要 作用。
Parsed file: source.txt [1 sentences].
Parsed 12 words in 1 sentences (20.76 wds/sec; 1.73 sents/sec).
hadoop@master:~/stanford-parser-full-2017-06-09$ cat my.txt
(ROOT
(IP
(NP (NR 张传庆))
(VP
(ADVP (AD 曾))
(PP (P 在)
(LCP
(NP
(QP (CD 许多))
(NP (NR 中国) (NN 引水) (NN 隧洞) (NN 项目)))
(LC 中)))
(VP (VV 发挥)
(NP
(ADJP (JJ 重要))
(NP (NN 作用。)))))))
相关文章推荐
- 【已解决】win10环境下基于nltk搭建stanford parser环境,进行中文依存句法分析
- 使用Stanford CoreNLP的Python封装包处理中文(分词、词性标注、命名实体识别、句法树、依存句法分析)
- 【已解决】win10环境下基于nltk搭建stanford parser环境,进行中文依存句法分析
- 借助开源工具高效完成Java应用的运行分析
- JVM源码分析-Java运行
- 利用 JConsole观察分析Java程序的运行进行排错调优
- Stanford-parser依存句法关系解释
- 如何利用 JConsole观察分析Java程序的运行,进行排错调优
- Java的多进程运行模式分析
- Java运行内存分析
- fudannlp - 开源中文自然语言处理工具包|中文分词|词性标注|依存句法分析|指代消解 - Google Project Hosting
- Java的多进程运行模式分析
- Java的多进程运行模式分析
- Azul发布开源工具jHiccup,为Java提供运行时响应时间分析
- JVM源码分析-Java运行
- 依存句法分析与语义依存分析的区别
- 如何利用 JConsole观察分析Java程序的运行,进行排错调优
- JAVA 反射机制 在运行时使用反射分析对象
- Java程序多进程运行模式的实例分析
- 使用java命令运行class文件提示“错误:找不到或无法加载主类“的问题分析