Skip to content

Latest commit

 

History

History
executable file
·
16 lines (11 loc) · 980 Bytes

README.md

File metadata and controls

executable file
·
16 lines (11 loc) · 980 Bytes

NL2FOL: Translating Natural Language to First Order Logic for Logical Fallacy Detection

Paper

Necessary packages to run the code:

  • transformers
  • torch
  • accelerate

Run instructions:

  • For converting natural language to first order logic on the given dataset: python3 src/nl_to_fol.py --model_name <your_model_name> --nli_model_name <your_nli_model_name> --run_name <run_name> --dataset --length

  • For converting first order logic to SMT files and generate results use: python3 fol_to_cvc.py

  • For getting the final result metrics run: python3 get_metrics.py

  • To interpret the SMT results use: python3 interpret_smt_result.py <output_of_smt_file_path> <json to relevant sentence data with Claim, Implication, Referring expressions, Properties and Formula>