I have downloaded TreeTaggerv3.2 for Windows and have configured it per the install.txt. I am trying to use it in R with koRpus package. I have set the kRp.env as -
set.kRp.env(TT.cmd="C:\\TreeTagger\\bin\\tag-english.bat", lang="en",
preset="en", treetagger="manual", format="file",
TT.tknz=TRUE, encoding="UTF-8" )
.My data to be tagged is in a file and trying to use it as treetag("myfile.txt") but it is throwing the error-
Error in matrix(unlist(strsplit(tagged.text, "\t")), ncol = 3, byrow = TRUE, : 'data' must be of a vector type, was 'NULL'
In addition: Warning message: running command 'C:\windows\system32\cmd.exe /c C:\TreeTagger\bin\tag-english.bat
C:\Users\vivsingh\Desktop\NLP\tree_tag_ex.txt' had status 255
The standalone TreeTagger is working on by windows.Any idea on how it works?
I am posting this answer to keep a record. I also faced the same issue due to incorrect specification of the location of
jri.dllon 64-Bit processor and windows 8.1. If we callset.kRp.env(TT.cmd="manual", lang="en", TT.options=list(path="/path/to/tree-tagger-windows-x.x/TreeTagger", preset="en"))and we follow either of following two steps, we can resolve this error:While installing R, if we install only 64 Bit version of R, and specify the proper path for these variables
LD_LIBRARY_PATH = /path/to/rJava/jriJAVA_HOME = /path/to/jdk1.x.xjava.library.path = /path/to/rJava/jri/jri.dllCLASSPATH = /path/to/rJava/jriIf we already installed both versions viz. 32 bit and 64 bit of R on your computer then just copy
jri.dllfrom/path/to/rJava/jri/x64/jri.dlland replace atpath/to/rJava/jri/jri.dll. Further, we need to set the path of above mentioned four variables.