0

嗨,我正在使用 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
4

1 回答 1

1

我已经自己解决了这个问题。“treetag”命令的默认输入是文本文件,TT.options 中的“路径”应该是 treetager 文件/文件夹存在的路径(cmd、bin 和 lib)

这是更正的命令。

library(koRpus)
tagged.text <- treetag("~/inputfile.txt", treetagger="manual", lang="en", 
    TT.options = list(path= "~/", preset="en"))
于 2016-03-03T16:06:24.367 回答