如何在python中编写代码以使用babelnet

时间:2019-06-18 04:36:53

标签: python

使用babelnet在python中

我的代码

import pybabelfy

text= "BabelNet is both a multilingual encyclopedic dictionary and a semantic network"
lang = "EN"
key = "64c6149e-44d8-4245-895f-5b2f64b93c3a" #This only works for the demo example. Change it for your RESTful key (you must register at babelfy.org for it)

babelapi = Babelfy()

semantic_annotations = babelapi.disambiguate(text,lang,key)

 babelapi = Babelfy()



错误:

  

NameError:未定义名称'Babelfy'


谁能告诉我为什么出现此NameError吗?

0 个答案:

没有答案