我下载语义网络处理器项目:
http://digital.cs.usu.edu/~vkulyukin/vkweb/software/snp/snp.html
听我说,
通过使用CLISP解释器,我将目录更改为文件夹,
并执行以下操作:
[3]> (load "snp-loader.lisp")
;; Loading file snp-loader.lisp ...
;; Loaded file snp-loader.lisp
T
[4]> (in-package "USER")
<PACKAGE COMMON-LISP-USER>
[5]> (snp-load-everything)
**- MAKE-PATHNAME: Illegal :DIRECTORY argument "D:\\snp-stable\\"**
The following restarts are available:
ABORT :R1 Abort main loop
有谁能告诉我出了什么问题,或者我怎样才能解决它,以便使项目运行?
最佳答案
在snp-loader.lisp中,您需要调用directory-namestring
,而不是pathname-directory
:
(defparameter parm-snp-load-dir
(pathname-directory *load-truename*))
但后来在定义
expectations-on-token
的方法时,又出现了另一个问题在c-snp-with-vars.lisp中,docstring格式不正确,这会触发错误连接两个字符串:(defmethod expectations-on-token ((this-snp c-snp-with-vars) (tok t))
"Overloaded expectations-on-token to process variables and tests.
Get all expectations waiting for the token tok."
`(,@(find-static-expectations this-snp tok)
,@(find-dynamic-expectations this-snp tok)))
重新加载snp-loader.lisp文件,然后重试
(snp-load-everything)
它应该正确装载。编辑我联系了原始作者;最新版本的代码现在托管在GitHub上https://github.com/VKEDCO/AI/tree/master/NL/SNP。