The data can be used as is, for generation (or use on custom datasets) Python >= 3.7 is required. The bundeled datalog interpreter used for answer retrieval requires node.js >= v15.5.
# create environment
python3 -m venv .venv
# activate environment
source .venv/bin/activate
# install dependencies
pip install -r requirements.txtcd dltools/nodeinterp/
npm install .The sqlite database can be obtained via Kaggle. It should be placed in the data directory as database.sqlite.
output_rulecount.pyMakes sure the transformations indata/transformationscan be loaded properly.kbtransform.pyContains most of the transformation logic and can be invoked directly to syntax check the rulesets. The syntax check also outputs all placeholders or "fillers" defined per ruleset.execdatalog.pyRuns the datalog interpreter for answer retrieval, can be directly invoked to test communication.soccerdb.pyContains the data model and SQL queries for matches, players, and events. Can be invoked directly to show the event dump of a random match in the database.write_textrep.pyApplies textual representations to matches and events, output is written todata/generated/reports/write_datalog.pySimilar to the above, generates datalog representations.write_questions.pyGenerates questions in textual and datalog form, the datalog query is then tested against the knowledge base. Output is written todata/generated/questions.generate_unanswerable.pyGenerates adverserial unanswerable questions in addition to those indata/generated/questions, output is saved todata/generated/questionsfull.export_squad.pyGenerates a new squad-like 60-20-20 split from the generated content.
data/generated-content/The fully generated train/dev/test splits.data/transformations/The rulesets for transformations of match reports and questions into text and datalog.