0

Hi I ma working treetager to extract nouns from the data, however I am getting the below error message.

Here is my R script

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"))

The error:

**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
Tyler Rinker
  • 108,132
  • 65
  • 322
  • 519
Ravi Kumar
  • 161
  • 1
  • 6

1 Answers1

1

I have resolve the issue by myself. The default input for "treetag" command is a text file and the "path" in TT.options should be the path where treetager files/folders exist (cmd,bin & lib)

Here is the corrected command.

library(koRpus)
tagged.text <- treetag("~/inputfile.txt", treetagger="manual", lang="en", 
    TT.options = list(path= "~/", preset="en"))
Ravi Kumar
  • 161
  • 1
  • 6