Benestar / ask-wikidata

Do you have a question? Ask Wikidata! This tool lets you enter a question and tries to parse it. If it understands what you want to know, it will search for this information on Wikidata.
http://tools.wmflabs.org/bene/ask/
GNU General Public License v2.0
44 stars 12 forks source link

Brief overview? #9

Open waldyrious opened 9 years ago

waldyrious commented 9 years ago

@Benestar, can you provide a very short overview of how ask-wikidata works? It would help for contributors to add new patterns. Specifically, how does the parseQuestion function in src/parser.js work with the patterns/*.json files to interpret the question, and what exactly does the handleParsed function in src/index.js do with the result?

You could either provide this as a high-level quick overview in the README, or add comments to the relevant lines in those functions and json files.