I am currently working with the DiscourseTester implemented in NLTK. I have the recent version of NLTK (3.8.1) and work with Python 3.8. The DiscourseTester fails when I set the informchk=True, but works if it is set to False.
Does anyone know what could be the reason? The consistency check works without issues.
So, the following code works:
import nltk
dt = nltk.inference.DiscourseTester(['A student dances', 'Every student is a person'])
dt.add_sentence('A person dances', consistchk=True, informchk=False)
But this code fails:
import nltk
dt = nltk.inference.DiscourseTester(['A student dances', 'Every student is a person'])
dt.add_sentence('A person dances', consistchk=True, informchk=True)
Here is the error message I get:
---------------------------------------------------------------------------
Prover9FatalException Traceback (most recent call last)
<ipython-input-19-f87e52dc8488> in <module>
----> 1 dt.add_sentence('A person dances', consistchk=True, informchk=True)
3 frames
/usr/local/lib/python3.8/dist-packages/nltk/inference/prover9.py in _call_prover9(self, input_str, args, verbose)
368 raise Prover9LimitExceededException(returncode, errormsg)
369 else:
--> 370 raise Prover9FatalException(returncode, errormsg)
371
372 return stdout, returncode
Prover9FatalException: (FATAL)
%%ERROR: Flag not recognized:
%%START ERROR%%
clear(auto_denials).
%%END ERROR%%
Fatal error: Flag not recognized