{"id":13813760,"url":"https://github.com/ayoungprogrammer/nlquery","last_synced_at":"2026-02-06T01:25:52.687Z","repository":{"id":73669672,"uuid":"65896024","full_name":"ayoungprogrammer/nlquery","owner":"ayoungprogrammer","description":"Natural Language Engine on WikiData","archived":false,"fork":false,"pushed_at":"2016-10-13T16:04:47.000Z","size":45,"stargazers_count":436,"open_issues_count":5,"forks_count":72,"subscribers_count":20,"default_branch":"master","last_synced_at":"2024-08-04T04:04:35.237Z","etag":null,"topics":["dbpedia","nlp","wikidata"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ayoungprogrammer.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"license.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2016-08-17T09:47:40.000Z","updated_at":"2024-08-04T04:04:35.238Z","dependencies_parsed_at":"2023-11-10T23:30:44.126Z","dependency_job_id":null,"html_url":"https://github.com/ayoungprogrammer/nlquery","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ayoungprogrammer%2Fnlquery","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ayoungprogrammer%2Fnlquery/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ayoungprogrammer%2Fnlquery/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ayoungprogrammer%2Fnlquery/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ayoungprogrammer","download_url":"https://codeload.github.com/ayoungprogrammer/nlquery/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225319335,"owners_count":17455751,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dbpedia","nlp","wikidata"],"created_at":"2024-08-04T04:01:29.247Z","updated_at":"2026-02-06T01:25:52.633Z","avatar_url":"https://github.com/ayoungprogrammer.png","language":"Python","funding_links":[],"categories":["Uncategorized","Python"],"sub_categories":["Uncategorized"],"readme":"# NLQuery\n\nA natural language query engine on WikiData. \n\n* [Demo](http://nlquery.ayoungprogrammer.com)\n* [Blogpost](http://blog.ayoungprogrammer.com/2016/10/creating-natural-language-query-engine.html/)\n\nExamples:\n```\nWho is Obama? 44th President of the United States\nHow tall is Yao Ming? 2.286m\nWhere was Obama born? Kapiolani Medical Center for Women and Children\nWhen was Obama born? August 04, 1961\nWho did Obama marry? Michelle Obama\nWho is Obama's wife? Michelle Obama\nWho is Barack Obama's wife? Michelle Obama\nWho was Malcolm Little known as? Malcolm X\nWhat is the birthday of Obama? August 04, 1961\nWhat religion is Obama? Christianity\nWho did Obama marry? Michelle Obama\n\nHow many countries are there? 196\nWhich countries have a population over 1000000000? People's Republic of China, India\nWhich books are written by Douglas Adams? The Hitchhiker's Guide to the Galaxy, ...\nWho was POTUS in 1945? Harry S. Truman\nWho was Prime Minister of Canada in 1945? William Lyon Mackenzie King\nWho was CEO of Apple Inc in 1980? Steve Jobs\n```\n\n# Architecture\n\n```\nEnglish query -\u003e Parse Tree -\u003e Matched Context -\u003e Sparql Query -\u003e Answer\n\nExample:\nWho did Obama marry?\n-\u003e (SBARQ\n     (WHNP (WP Who))\n     (SQ (VBD did) (NP (NNP Obama)) (VP (VB marry)))\n     (. ?))\n-\u003e {'subject': 'Obama', 'property': 'marry'}\n-\u003e SELECT ?valLabel\n        WHERE {\n           {\n                wd:Q76 p:P26 ?prop .\n                ?prop ps:P26 ?val .\n            }\n            SERVICE wikibase:label { bd:serviceParam wikibase:language \"en\"}\n        }\n-\u003e Michelle Obama\n```\n\n## Install\n\n### Download Stanford CoreNLP\n\nMake sure you have Java installed for the Stanford CoreNLP to work.\n\n[Download Stanford CoreNLP](http://stanfordnlp.github.io/CoreNLP/#download)\n\n### Run the Stanford CoreNLP server\n\nRun the following command in the folder where you extracted Stanford CoreNLP\n```\njava -mx4g -cp \"*\" edu.stanford.nlp.pipeline.StanfordCoreNLPServer\n```\n\n### Install nlquery\n\n```\ngit clone https://github.com/ayoungprogrammer/nlquery\ncd nlquery\npip install -r requirements.txt\n```\n\n## Run\n\nStart the command line:\n\n```\npython main.py\n```\n\nTo run web app, go to nlquery-app/readme.md\n\n\n## Tests\n\nRun\n```\npy.test\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fayoungprogrammer%2Fnlquery","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fayoungprogrammer%2Fnlquery","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fayoungprogrammer%2Fnlquery/lists"}