a question about nltk.Mace.build_model()

9 views
Skip to first unread message

Jiun-Shiung Wu

unread,
Nov 4, 2016, 6:14:49 PM11/4/16
to nltk-users
Hi,

I am learning how to use nltk.Mace.build_model. I tried the example in the NLTK book.
When I try:

>>> print(mb.build_model(None, [a3, c1]))

I get the following error message:

Traceback (most recent call last):
  File "<pyshell#8>", line 1, in <module>
    print(mb.build_model(None, [a3, c1]))
  File "C:\Python34\lib\site-packages\nltk\inference\api.py", line 57, in build_model
    return self._build_model(goal, assumptions, verbose)[0]
  File "C:\Python34\lib\site-packages\nltk\inference\mace.py", line 202, in _build_model
    verbose=verbose)
  File "C:\Python34\lib\site-packages\nltk\inference\mace.py", line 215, in _call_mace4
    self._mace4_bin = self._find_binary('mace4', verbose)
  File "C:\Python34\lib\site-packages\nltk\inference\prover9.py", line 166, in _find_binary
    verbose=verbose)
  File "C:\Python34\lib\site-packages\nltk\internals.py", line 602, in find_binary
    binary_names, url, verbose))
  File "C:\Python34\lib\site-packages\nltk\internals.py", line 596, in find_binary_iter
    url, verbose):
  File "C:\Python34\lib\site-packages\nltk\internals.py", line 532, in find_file_iter
    path_to_file = os.path.join(directory, alternative)
  File "C:\Python34\lib\ntpath.py", line 108, in join
    result_drive, result_path = splitdrive(path)
  File "C:\Python34\lib\ntpath.py", line 161, in splitdrive
    normp = p.replace(_get_altsep(p), sep)
AttributeError: 'list' object has no attribute 'replace'

====
Could someone tell me what is going on here? Thank you!
Reply all
Reply to author
Forward
0 new messages