Coder Social home page Coder Social logo

asknowqa / sqg Goto Github PK

View Code? Open in Web Editor NEW
49.0 49.0 26.0 98.94 MB

Query Generation for Question Answering over Knowledge Bases

License: GNU General Public License v3.0

Python 94.07% Shell 0.09% Java 5.54% Dockerfile 0.30%
dbpedia knowledgebase lc-quad query-builder

sqg's People

Contributors

hamidzafar avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sqg's Issues

Unknown files

Hello.
I tried to run this codes but I found I don't have some files for running, though I downloaded the dataset, model, and bloom filter which you wrote in README.
For example, in orchestrator.Orchestrator.rank, it requires various files for running it.
Some files, for example %s.pt (maybe lcquad.pt?) can be downloaded from your google drive.
And I know stanford-parser.jar is stanford nlp parser file.
But other cases, for example dataset.vocab, dataset_embed.pth are unknown files, I think.

I found build_vocab function at learning/lstm/scripts/preprocess-lcquad.py,
But I'm not sure it is directly related to dataset.vocab file.
About dataset_embed.pth, I can't find any related codes in this repository.

Would you share those files for me, or tell how to generate those files?
Thanks for reading.

Could you please share lc_quad_gold.json

Hi @hamidzafar

I am trying to replicate your repository locally but I am not able to generate lc_quad_gold.json since the SPARQL endpoint you are using seems to be unavailable. Would it be possible to share this generated dataset so that I would be able to replicate your work.

Thanks

Error on KB down

If dbpedia is not accessible please throw an error with a message that explains to the user that the KB is unreachable.

Requirements.txt

Creating a Requirements(dependencies) text file at the root of the code would help a lot, specially to dockerize the code
Listing all the Python packages that SQG uses

Bloom files missing

Hi,
I tried out SQG but realized that there should be two bloom files, spo1.bloom and spo2.bloom. However, they are missing in the master branch.
Can you provide them or explain how to create them?

Thanks!

Move completely to blooms

The current implementation takes a long time in fetching the answer due to 2-hop queries from the knowledge base. Due to this delay this module can not be used in a real-time human-facing QA system. I would request the author to move 2-hop queries to blooms as well.

Remove duplicate queries

There are cases like below that are the same queries but with different name for the variables:

?u_0 <http://dbpedia.org/property/awards> <http://dbpedia.org/resource/Goethe_Prize> .?u_0 <http://dbpedia.org/property/awards> ?u_1
and
?u_1 <http://dbpedia.org/property/awards> <http://dbpedia.org/resource/Goethe_Prize> .?u_1 <http://dbpedia.org/property/awards> ?u_0

Return question type in api response

It would be nice if you could return the question type in your api response, like count, boolean, list (array of uris), resource (single uri return). Since you already have a query classifier and the views on the web differ based on the query type this would be a useful return to have from your api.

Empty response

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?

Missing data/LC-QUAD/EARL/output.json file

Hi,

I am trying to replicate your repository locally and I am trying to run the query_gen.py file by setting linker=1. However, it seems that the required file "data/LC-QUAD/EARL/output.json" is missing. Could you tell me how to generate that file so that I can replicate your result?

Thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.