LISP MAKE

编程入门 行业动态 更新时间:2024-10-28 20:27:17
LISP MAKE-PATHNAME:非法:DIRECTORY论点(LISP MAKE-PATHNAME: Illegal :DIRECTORY argument)

我下载语义网络处理器项目: 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

任何人都可以告诉我什么是错的,或者我如何修复它以使项目运行?

I download Semantic Network Processor project: http://digital.cs.usu.edu/~vkulyukin/vkweb/software/snp/snp.html

and following it's read me, By using CLISP interpreter I change the directory to the folder, and do the following:

[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

can anybody tells me what's wrong or how I can fix it in order to make the project run?

最满意答案

snp-loader.lisp中 ,您需要调用pathname-directory而不是directory-namestring :

(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

In snp-loader.lisp, instead of directory-namestring, you need to call pathname-directory:

(defparameter parm-snp-load-dir (pathname-directory *load-truename*))

But then another problem occurs later, when defining a method for expectations-on-token. In c-snp-with-vars.lisp, the docstring is malformed, which triggers an error. Join both strings:

(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)))

Reload the snp-loader.lisp file, and retry (snp-load-everything). It should load properly.

Edit. I contacted the original author; the latest version of the code is now hosted on GitHub at https://github.com/VKEDCO/AI/tree/master/NL/SNP.

更多推荐

本文发布于:2023-07-07 04:00:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1058633.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:LISP

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!