Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Empty response #14

Open
YaserJaradeh opened this issue Oct 4, 2018 · 1 comment
Open

Empty response #14

YaserJaradeh opened this issue Oct 4, 2018 · 1 comment

Comments

@YaserJaradeh
Copy link

YaserJaradeh commented Oct 4, 2018

I have followed the instructions to run SQG with all the dependencies (with all the noted versions) and it seems to run smoothly and without any problem.

I am trying to run the example call you have provided in the README file but the response is returned as {}. I have played around with the query and tried

{
   "question":"What is the birth place of Barack Obama?",
   "relations":[
      {
         "surface":"",
         "uris":[
            {
               "confidence":1,
               "uri":"http://dbpedia.org/ontology/birthPlace"
            }
         ]
      }
   ],
   "entities":[
      {
         "surface":"",
         "uris":[
            {
               "confidence":1,
               "uri":"http://dbpedia.org/resource/Barack_Obama"
            }
         ]
      }
   ],
   "kb":"dbpedia"
}

and another query:

{
   "question":"Who is the wife of Barack Obama?",
   "relations":[
      {
         "surface":"",
         "uris":[
            {
               "confidence":1,
               "uri":"http://dbpedia.org/ontology/spouse"
            }
         ]
      }
   ],
   "entities":[
      {
         "surface":"",
         "uris":[
            {
               "confidence":1,
               "uri":"http://dbpedia.org/resource/Barack_Obama"
            }
         ]
      }
   ],
   "kb":"dbpedia"
}

I always get the same response (am empty set of queries):

{}

I have checked the errors.log and the info.log files and there is nothing out of the ordinary going on there, plus I am checking the python console for any errors/warnings and there is nothing to see also.
I am running the code on Ubuntu 18.04.1 LTS Desktop with Intel(R) Xeon(R) W-2133 CPU and 64GB of Ram.

If you could point me in the direction of what might be the cause of the problem or something like this?

@cbadenes
Copy link

I have the same behavior. It seems to start correctly, but I don't get any response

`$ curl -i -H "Content-Type: application/json" -X POST -d '{"question":"What is the hometown of Nader Guirat, where Josef Johansson was born too?","relations":[{"surface":"","uris":[{"confidence":1,"uri":"http://dbpedia.org/property/birthPlace"}]},{"surface":"","uris":[{"confidence":1,"uri":"http://dbpedia.org/ontology/hometown"}]}],"entities":[{"surface":"","uris":[{"confidence":0.7,"uri":"http://dbpedia.org/resource/Josef_Johansson"},{"confidence":0.3,"uri":"http://dbpedia.org/resource/Barack_Obama"}]},{"surface":"","uris":[{"confidence":1,"uri":"http://dbpedia.org/resource/Nader_Guirat"}]}],"kb":"dbpedia"}' http://localhost:5000/qg/api/v1.0/query
HTTP/1.1 201 CREATED
Content-Type: application/json
Content-Length: 49
Date: Fri, 20 Nov 2020 09:59:55 GMT

{"queries":[],"type":"list","type_confidence":0}`

And the logs on the server seem to be correct:

::1 - - [2020-11-20 10:59:39] "POST /qg/api HTTP/1.1" 404 145 0.000547 2020-11-20 10:59:54,713 - __main__ - INFO - What is the hometown of Nader Guirat, where Josef Johansson was born too? 100%|██████████████████████████████████████████████████████████████████████████████████████████| 8/8 [00:00<00:00, 5181.35it/s] 100%|████████████████████████████████████████████████████████████████████████████████████████████| 8/8 [00:00<00:00, 10.08it/s] 100%|████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:00<00:00, 11.68it/s] ::1 - - [2020-11-20 10:59:55] "POST /qg/api/v1.0/query HTTP/1.1" 201 162 0.888758

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants