因为我是一个尝试使用R的korpu的初学者,所以任何建议都是很棒的。
我在我的windows机器上安装了TreeTagger,然后安装了koRpus包。我的问题是,我如何使用带有R的koRpus的treetagger?
是否有要添加的设置?
我尝试使用以下命令:
writeLines(text = 'All human beings are born free and equal in dignity and rights. They are endowed with reason and conscience and should act towards one another in a spirit of brotherhood.', con = "myfile.txt"); treetag("myfile.txt")
Error: could not find function "treetag"非常感谢您的帮助
最好的
发布于 2017-03-09 09:44:58
我不熟悉koRpus,但您可以尝试像这样调用函数:
koRpus::treetag("test")或者像这样:
library(koRpus)
writeLines(text = 'All human beings are born free and equal in dignity and rights. They are endowed with reason and conscience and should act towards one another in a spirit of brotherhood.', con = "myfile.txt"); treetag("myfile.txt")发布于 2017-03-13 22:03:49
在koRpus中使用TreeTagger时,您还需要设置有关koRpus环境的信息(例如,告诉它在您的计算机上哪里可以找到TreeTagger,等等)。您可以使用set.kRp.env函数来执行此操作。下面是一个示例,您必须根据计算机上的路径和您的要求进行定制:
set.kRp.env(TT.cmd="C:/Program Files/TreeTagger/bin/tag-english.bat", lang="en",
TT.options=list(path="C:/Program Files/TreeTagger", preset="en"), validate=TRUE)在R中使用TreeTagger之前,您可能还想尝试一下它是否可以在R之外工作。
https://stackoverflow.com/questions/42667547
复制相似问题