All Projects → ayoungprogrammer → Nlquery

ayoungprogrammer / Nlquery

Licence: gpl-2.0
Natural Language Engine on WikiData

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Nlquery

transparencia-dados-abertos-brasil
A survey of Brazilian states' and municipalities' transparency and open data portals, as well as institutional websites, obtained from several public data sources. 🇧🇷 Levantamento de portais estaduais e municipais de transparência e dados abertos, bem como os portais institucionais, obtido a partir de diversas fontes públicas de dados.
Stars: ✭ 46 (-88.86%)
Mutual labels:  wikidata
ate-onde-chega-cultura
Mapa interativo dos equipamentos culturais em Portugal
Stars: ✭ 18 (-95.64%)
Mutual labels:  wikidata
OA-signalling
A project to coordinate implementing a system to signal whether references cited on Wikipedia are free to reuse
Stars: ✭ 19 (-95.4%)
Mutual labels:  wikidata
ann
A repository for brainstorming and prototyping ideas related to the eLifeSprint project Annotate them all (https://sprint.elifesciences.org/annotate-them-all/)
Stars: ✭ 13 (-96.85%)
Mutual labels:  wikidata
aletheia
https://aletheiafact.org a Crowd-sourced fact checking platform.
Stars: ✭ 36 (-91.28%)
Mutual labels:  wikidata
WikidataQueryServiceR
An R package for the Wikidata Query Service API
Stars: ✭ 23 (-94.43%)
Mutual labels:  wikidata
lc-wikidata
Library Carpentry Wikidata
Stars: ✭ 17 (-95.88%)
Mutual labels:  wikidata
Jivesearch
A search engine that doesn't track you.
Stars: ✭ 364 (-11.86%)
Mutual labels:  wikidata
SPARQL
Lib PHP for SPARQL 1.1
Stars: ✭ 23 (-94.43%)
Mutual labels:  wikidata
heritage-connector
Heritage Connector: Transforming text into data to extract meaning and make connections
Stars: ✭ 18 (-95.64%)
Mutual labels:  wikidata
scholia
Wikidata-based scholarly profiles
Stars: ✭ 166 (-59.81%)
Mutual labels:  wikidata
wikidata-corpus
Train Wikidata with word2vec for word embedding tasks
Stars: ✭ 109 (-73.61%)
Mutual labels:  wikidata
pywikibot-scripts
Own pywikibot scripts (for Wikimedia projects)
Stars: ✭ 16 (-96.13%)
Mutual labels:  wikidata
wikiapi
JavaScript MediaWiki API for node.js
Stars: ✭ 28 (-93.22%)
Mutual labels:  wikidata
sling
SLING - A natural language frame semantics parser
Stars: ✭ 91 (-77.97%)
Mutual labels:  wikidata
wdumper
Tool for generating filtered Wikidata RDF exports
Stars: ✭ 25 (-93.95%)
Mutual labels:  wikidata
osm-wikidata
Match OSM entities with Wikidata items
Stars: ✭ 72 (-82.57%)
Mutual labels:  wikidata
Wptools
Wikipedia tools (for Humans): easily extract data from Wikipedia, Wikidata, and other MediaWikis
Stars: ✭ 371 (-10.17%)
Mutual labels:  wikidata
Wikidata Toolkit
Java library to interact with Wikibase
Stars: ✭ 287 (-30.51%)
Mutual labels:  wikidata
wikidata-taxonomy
command-line tool to extract taxonomies from Wikidata
Stars: ✭ 100 (-75.79%)
Mutual labels:  wikidata

NLQuery

A natural language query engine on WikiData.

Examples:

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

Architecture

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

Example:
Who did Obama marry?
-> (SBARQ
     (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

Install

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 https://github.com/ayoungprogrammer/nlquery
cd nlquery
pip install -r requirements.txt

Run

Start the command line:

python main.py

To run web app, go to nlquery-app/readme.md

Tests

Run

py.test
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].