尝试使用python TweetNLP包装器CMUTagger,但它引发以下错误:
java.io.FileNotFoundException: \dev\stdin (The system cannot find the path specified)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(Unknown Source)
at java.io.FileInputStream.<init>(Unknown Source)
at cmu.arktweetnlp.util.BasicFileIO.openFileToReadUTF8(BasicFileIO.java:50)
at cmu.arktweetnlp.RunTagger.runTagger(RunTagger.java:93)
at cmu.arktweetnlp.RunTagger.main(RunTagger.java:364)
Sep 17, 2014 10:22:45 AM cmu.arktweetnlp.util.BasicFileIO openFileToReadUTF8
SEVERE: Could not open file:/dev/stdin
重新安装了JDK而不是JRE。什么也没修好。不知道该怎么办,因为我甚至找不到java目录中的dev文件夹。。。halp=(
如果不带python的命令行调用是'sh','运行标签.sh','--output format,'conll',[要标记tweets的文件],但我需要它通过stdin=标记来自python的tweet传入流)
EDIT在CygWin中找到dev/stdin,并尝试添加路径“c:…\CygWin”和“c:…\CygWin\dev”,但还是没有任何结果
我也一直被困在这件事上。我找到了解决办法。在
您可以使用以下代码:
这将为您提供通过tagger运行示例\u tweets文件的输出。在
相关问题 更多 >
编程相关推荐