本文介绍了nltk无法找到mace4的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在执行以下代码时,出现上述错误.
While executing below code, I am getting error as mentioned.
我从 http://www.cs.unm下载了所需的软件包. edu/〜mccune/prover9/download/并进行配置.但是仍然是同样的问题.
I downloaded the required package from http://www.cs.unm.edu/~mccune/prover9/download/ and configure. But still same issue.
我收到此错误:
>>> import nltk
>>> dt = nltk.DiscourseTester(['A student dances', 'Every student is a person'])
>>> dt.readings()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python2.7/dist-packages/nltk/inference/discourse.py", line 351, in readings
self._construct_threads()
File "/usr/local/lib/python2.7/dist-packages/nltk/inference/discourse.py", line 297, in _construct_threads
consistency_checked = self._check_consistency(self._threads)
File "/usr/local/lib/python2.7/dist-packages/nltk/inference/discourse.py", line 393, in _check_consistency
modelfound = mb.build_model()
File "/usr/local/lib/python2.7/dist-packages/nltk/inference/api.py", line 333, in build_model
verbose)
File "/usr/local/lib/python2.7/dist-packages/nltk/inference/mace.py", line 202, in _build_model
verbose=verbose)
File "/usr/local/lib/python2.7/dist-packages/nltk/inference/mace.py", line 215, in _call_mace4
self._mace4_bin = self._find_binary('mace4', verbose)
File "/usr/local/lib/python2.7/dist-packages/nltk/inference/prover9.py", line 166, in _find_binary
verbose=verbose)
File "/usr/local/lib/python2.7/dist-packages/nltk/internals.py", line 544, in find_binary
binary_names, url, verbose))
File "/usr/local/lib/python2.7/dist-packages/nltk/internals.py", line 538, in find_binary_iter
url, verbose):
File "/usr/local/lib/python2.7/dist-packages/nltk/internals.py", line 517, in find_file_iter
raise LookupError('\n\n%s\n%s\n%s' % (div, msg, div))
LookupError:
===========================================================================
NLTK was unable to find the mace4 file!
Use software specific configuration paramaters or set the PROVER9HOME environment variable.
Searched in:
- /usr/local/bin/prover9
- /usr/local/bin/prover9/bin
- /usr/local/bin
- /usr/bin
- /usr/local/prover9
- /usr/local/share/prover9
通过make all
配置LADR-2009-11时,操作以
While configuring the LADR-2009-11 through make all
, ended process with
.o utilities.o provers.o foffer.o ../ladr/libladr.a
search.o: In function `search':
search.c:(.text+0x6e54): undefined reference to `round'
../ladr/libladr.a(avltree.o): In function `avl_item_at_position':
avltree.c:(.text+0x7cb): undefined reference to `ceil'
collect2: error: ld returned 1 exit status
make[1]: *** [prover9] Error 1
make[1]: Leaving directory `/root/Desktop/karim/software/LADR-2009-11A/provers.src'
make: *** [all] Error 2
推荐答案
这对我有用.我在github 问题193
Here is what worked for me. I found it on github issue 193
简介
- 下载 gui
- 下载 dll
- 将下载的dll放在
C:\Program Files (x86)\Prover9-Mace4
中 - 创建Windows系统环境变量PROVER9并将其设置为
C:\Program Files (x86)\Prover9-Mace4\bin-win32
- download gui
- download dll
- place downloaded dll in
C:\Program Files (x86)\Prover9-Mace4
- create Windows system environment variable PROVER9 and set it to
C:\Program Files (x86)\Prover9-Mace4\bin-win32
这篇关于nltk无法找到mace4的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!