0

curl http://model.dbpedia-spotlight.org/en/annotate \ --data-urlencode "text=President Obama called Wednesday on Congress to extend a tax break for students included in last year's economic stimulus package, arguing that the policy provides more generous assistance." \ --data "confidence=0.35" \ -H "Accept: application/json"

1 Answers1

0
url = 'http://model.dbpedia-spotlight.org/en/annotate'
data = {"text": query,"confidence":"0.35" ,"Subject": "Pycurl", "TextBody": "Some text"}
headers = {"Accept" : "application/json"}
res = req.get(url, params=data, headers=headers)
#print res.content
j = json.loads(res.content)
vallentin
  • 19,107
  • 6
  • 43
  • 68