format of raw
Refrainlhy opened this issue · 9 comments
could you give the format of the parameters in the evaluation function? Thanks
I can run 'print(process_word_E_long('Who painted The Storm on the Sea of Galilee?') )' successfully. But for the function evaluation, the string and simple list cannot be run successfully.
Thank you.
if i run evaluate(["what is the capital of germany"])
I meet the following bug:
(base) ✘ haoyang ~/Projects/falcon master ● python main.py
Traceback (most recent call last):
File "/Users/haoyang/anaconda3/lib/python3.6/urllib/request.py", line 1318, in do_open
encode_chunked=req.has_header('Transfer-encoding'))
File "/Users/haoyang/anaconda3/lib/python3.6/http/client.py", line 1239, in request
self._send_request(method, url, body, headers, encode_chunked)
File "/Users/haoyang/anaconda3/lib/python3.6/http/client.py", line 1285, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "/Users/haoyang/anaconda3/lib/python3.6/http/client.py", line 1234, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "/Users/haoyang/anaconda3/lib/python3.6/http/client.py", line 1026, in _send_output
self.send(msg)
File "/Users/haoyang/anaconda3/lib/python3.6/http/client.py", line 964, in send
self.connect()
File "/Users/haoyang/anaconda3/lib/python3.6/http/client.py", line 936, in connect
(self.host,self.port), self.timeout, self.source_address)
File "/Users/haoyang/anaconda3/lib/python3.6/socket.py", line 704, in create_connection
for res in getaddrinfo(host, port, 0, SOCK_STREAM):
File "/Users/haoyang/anaconda3/lib/python3.6/socket.py", line 745, in getaddrinfo
for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno 8] nodename nor servname provided, or not known
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "main.py", line 989, in
evaluate(["what is the capital of germany"])
File "main.py", line 800, in evaluate
countryImprovement=realtions_entities_country_improvement(term)
File "main.py", line 564, in realtions_entities_country_improvement
results1 = sparql.query().convert()
File "/Users/haoyang/anaconda3/lib/python3.6/site-packages/SPARQLWrapper/Wrapper.py", line 798, in query
return QueryResult(self._query())
File "/Users/haoyang/anaconda3/lib/python3.6/site-packages/SPARQLWrapper/Wrapper.py", line 766, in _query
response = urlopener(request)
File "/Users/haoyang/anaconda3/lib/python3.6/urllib/request.py", line 223, in urlopen
return opener.open(url, data, timeout)
File "/Users/haoyang/anaconda3/lib/python3.6/urllib/request.py", line 526, in open
response = self._open(req, data)
File "/Users/haoyang/anaconda3/lib/python3.6/urllib/request.py", line 544, in _open
'_open', req)
File "/Users/haoyang/anaconda3/lib/python3.6/urllib/request.py", line 504, in _call_chain
result = func(*args)
File "/Users/haoyang/anaconda3/lib/python3.6/urllib/request.py", line 1346, in http_open
return self.do_open(http.client.HTTPConnection, req)
File "/Users/haoyang/anaconda3/lib/python3.6/urllib/request.py", line 1320, in do_open
raise URLError(err)
urllib.error.URLError: <urlopen error [Errno 8] nodename nor servname provided, or not known>
Thanks
The SPARQL endpoint for DBpedia is not configured. The service can not connect to the SPARQL endpoint. You need to have a SPARQL endpoint for DBpedia.
You can specify the endpoint URL in main.py (line 22 and 23)
Thanks. But I am confused about how to set a DBpedia endpoint. Do I need to download DBpedia firstly and store it in a SPARQL format? or could I use some public DBpedia endpoint? Thanks
It's better to have your own DBpedia endpoint. The public DBpedia endpoint is
https://dbpedia.org/sparql
But it won't allow too many connections to the endpoint, and FALCON send a lot of queries to the SPARQL endpoint.
But, anyway you can use the public DBpedia endpoint for playing around.
Thanks, is the raw format list? like ["what is the capital of germany"]?
yes it's a list
Thank you very much!
The last question is when will you update the program completely. I think it is a very good project.
We are working on that. You can find our demo here
https://labs.tib.eu/falcon/