This is the code for the Conversational Neuro-Symbolic Commonsense Reasoning.
- PyTorch
- Spacy
- higgingface en_coref_lg model: https://github.com/huggingface/neuralcoref-models/releases/download/en_coref_lg-3.0.0/en_coref_lg-3.0.0.tar.gz
- python2
- numpy
- py
- rpython
- logging/
folder to store user interaction logs under
<USER_NAME>
exaplained below. - testnet/ contains the code for our neuro-symbolic theorem prover built on top of spyrolog
- data/ contains our proposed commonsense reasoning benchmark. Look at data/REAME.md for a data description.
- net.py, attention.py, config.py, modeltest.py are files relevant to the inference for our neuro-symbolic theorem prover
- TypeDict.json modified dictionary of types built on top of Aristo tuple KB v1.03 Mar 2017 Release
- prolog_info-reasoning-17.pkl, model_testing-reasoning-17.tch pretrained models for the neuro-symbolic theorem prover
- facts7.txt, functor_arity7.txt knowledge base of commonsense facts
- user-study-data.txt statements used in the user study
in order to run the code use prompt:
python2 reasoning.py --user <USER_NAME> --engine /testnet
additional arguments are:
--verbose true
(can be used for debugging purposes to see more printouts)--resume <STATEMENT_NUMBER>
(can be used to resume the study at a certain statement if needed)