Awesome Open Source
Awesome Open Source


A natural language query engine on WikiData.


Who is Obama? 44th President of the United States
How tall is Yao Ming? 2.286m
Where was Obama born? Kapiolani Medical Center for Women and Children
When was Obama born? August 04, 1961
Who did Obama marry? Michelle Obama
Who is Obama's wife? Michelle Obama
Who is Barack Obama's wife? Michelle Obama
Who was Malcolm Little known as? Malcolm X
What is the birthday of Obama? August 04, 1961
What religion is Obama? Christianity
Who did Obama marry? Michelle Obama

How many countries are there? 196
Which countries have a population over 1000000000? People's Republic of China, India
Which books are written by Douglas Adams? The Hitchhiker's Guide to the Galaxy, ...
Who was POTUS in 1945? Harry S. Truman
Who was Prime Minister of Canada in 1945? William Lyon Mackenzie King
Who was CEO of Apple Inc in 1980? Steve Jobs


English query -> Parse Tree -> Matched Context -> Sparql Query -> Answer

Who did Obama marry?
     (WHNP (WP Who))
     (SQ (VBD did) (NP (NNP Obama)) (VP (VB marry)))
     (. ?))
-> {'subject': 'Obama', 'property': 'marry'}
-> SELECT ?valLabel
        WHERE {
                wd:Q76 p:P26 ?prop .
                ?prop ps:P26 ?val .
            SERVICE wikibase:label { bd:serviceParam wikibase:language "en"}
-> Michelle Obama


Download Stanford CoreNLP

Make sure you have Java installed for the Stanford CoreNLP to work.

Download Stanford CoreNLP

Run the Stanford CoreNLP server

Run the following command in the folder where you extracted Stanford CoreNLP

java -mx4g -cp "*" edu.stanford.nlp.pipeline.StanfordCoreNLPServer

Install nlquery

git clone
cd nlquery
pip install -r requirements.txt


Start the command line:


To run web app, go to nlquery-app/




Get A Weekly Email With Trending Projects For These Topics
No Spam. Unsubscribe easily at any time.
python (52,051
nlp (1,063
wikidata (27

Find Open Source By Browsing 7,000 Topics Across 59 Categories