Closed laparn closed 9 years ago
What version of DBpedia's spotlight are you using? It could be that they changed their API and this (rather old; last update 2013) wrapper was not updated.
Had the same Problem. sportlight.sztaki.hu doesn't like the LingPipeSpotter which is set by pyspotlight by default. you have to choose "Default" for spotter, then it works.
result = annotate(url,text=text,confidence= 0.5, support= 0,spotter='Default')
By the way, the next issue I had with this public server was, that if you want to try texts other then english you have to use different ports: Here is the list:
sztakiPorts= {"english" : '2222',
"german" : '2226',
"dutch" : '2232',
"hungarian" : '2229',
"french" : '2225',
"portuguese" : '2228',
"italian" : '2230',
"russian" : '2227',
"turkish" : '2235',
"spanish" : '2231'}
hope this helps
I think this problem occurs again.. If I run the following code,
import spotlight results = spotlight.annotate('http://spotlight.sztaki.hu:2222/rest/annotate', "World_War_II", confidence=0.4, support=20)
I get the below error:
requests.exceptions.ConnectionError: HTTPConnectionPool(host='spotlight.sztaki.hu', port=2222): Max retries exceeded with url: /rest/annotate (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x1108f3950>: Failed to establish a new connection: [Errno 60] Operation timed out',))
Does anyone know how to use dbpedia spotlight?
I am having the same issue as well. I tried to set spotter to default, and support to 0, but still got the timeout connection error message.
Is there another url I can use as host? Thanks.
My current code: HOST = 'http://spotlight.sztaki.hu:2222/rest/annotate' annotations = spotlight.annotate(HOST, text, confidence= 0.4, support= 0, spotter='Default')
hey @marvely, I'm afraid I don't know of any other public spotlight instances :(
I am having the same problem with the recommanded set ups: annotations = spotlight.annotate('http://spotlight.sztaki.hu:2222/rest/annotate',text,confidence=0.4, support=20, spotter='Default')
ConnectionError: HTTPConnectionPool(host='spotlight.sztaki.hu', port=2222): Max retries exceeded with url: /rest/annotate (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f4fca02b7b8>: Failed to establish a new connection: [Errno 110] Connection timed out',))
I am on python 3.4.3 and I just loaded spotlight. In order to test it, I try it
And I get an error :
Does somebody have an idea of what is going on ?