您好我正在使用treetager从数据中提取名词,但是我收到以下错误消息。
这是我的R脚本
A <- Data_raw$SourceText[10:15]
A
## [1] "Hi ... they ... they rather do very helpful and I like your ... have to move with my ... problem dollars. So everything looks good. Thank you very much."
library(koRpus)
tagged.text <- treetag(A[1], treetagger="manual", lang="en",
TT.options = list(path= "~/bin/treetagger", preset="en"))
错误:
**Error: Specified file cannot be found:**
Hi ... they ... they rather do very helpful and I like your ... have to move with my ... problem dollars. So everything looks good. Thank you very much.
**In addition: Warning message:
In normalizePath(file) :**
path[1]="Hi ... they ... they rather do very helpful and I like your ... have to move with my ... problem dollars. So everything looks good. Thank you very much.": No such file or directory
答案 0 :(得分:1)
我自己解决了这个问题。 “treetag”命令的默认输入是文本文件,TT.options中的“路径”应该是treetager文件/文件夹存在的路径(cmd,bin&amp; lib)
这是更正后的命令。
library(koRpus)
tagged.text <- treetag("~/inputfile.txt", treetagger="manual", lang="en",
TT.options = list(path= "~/", preset="en"))