如何安装“ RDRPOSTagger”?

时间:2019-06-28 15:58:42

标签: python nlp tags part-of-speech

我如何在法语中使用“ RDRPOSTagger”

我需要在法语中使用'RDRPOSTagger',但是我不怎么安装或包含该库

r = RDRPOSTagger() 
r.constructSCRDRtreeFromRDRfile("RDRPOSTagger-master/Models/POS/French.RDR") # Load POS tagging model for French 
DICT = readDictionary("../Models/POS/French.DICT") # Load a French lexicon 
r.tagRawSentence(DICT, "Cette annonce a fait l' effet d' une véritable bombe . ")

---------------------------------------------------------------------------
NameError                                 Traceback (most recent call last)
<ipython-input-33-c07a37f4fd93> in <module>
      3 
      4 
----> 5 r = RDRPOSTagger()
      6 r.constructSCRDRtreeFromRDRfile("RDRPOSTagger-master/Models/POS/French.RDR") # Load POS tagging model for French
      7 DICT = readDictionary("../Models/POS/French.DICT") # Load a French lexicon

NameError: name 'RDRPOSTagger' is not defined

3 个答案:

答案 0 :(得分:0)

您可以尝试artagger,一种Python实现。这是GitHub Page,要通过点子获取它,它是一个简单的pip install artagger

答案 1 :(得分:0)

install.packages("rJava")
install.packages("data.table")
install.packages("RDRPOSTagger", repos = "http://www.datatailor.be/rcube", type = "source")

答案 2 :(得分:0)

转到右侧的 https://github.com/bnosac/RDRPOSTagger 及上方,单击绿色按钮 - 然后下载 zip 文件。解压它,然后尝试以下操作:

devtools::install("file path to the master file locally")

或在 R Studio GUI 上安装下载的 zip 文件: Install package from GUI

然后点击安装。