eclipse安装JessTab

本文详细介绍了如何在Eclipse中安装JessTab插件,包括从官网下载、解压并复制必要文件到Eclipse目录的过程。通过创建.clp文件并运行示例代码,验证了安装成功。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

@JessTab

eclipse安装JessTab

本体推理需要用到jess,所以第一步先进行安装jess插件,再说学习!我在eclipse和protege都进行了jesstab插件的安装。

eclipse

1.在jess官网https://jessrules.com/下载jesstab插件,我下载的是试用30天。
选择DownloadNow!

2.解压文件Jess71p2
把该文件下的eclipse目录下的五个压缩文件依次解压得到两个文件夹:features和plugins。
3.打开eclipse
eclipse下也有features和plugins(若没有features,是eclipse版本问题,我开始用的最新版eclipse,安装失败,换成2008版的eclipse问题解决),把jess的features文件下的一个文件复制到eclipse的features文件中,把jess的plugins文件下的四个文件复制到eclipse的plugins文件中。
4.测试
打开eclipse,点击help,选择about eclipse,多了jess的图标。

点击jess图标,选择features Plug-in,可以看到列表有三行

5.创建.clp文件
new一个File,名字取“1.clp”,此时文件图标是右下角有个“J”的图标,在文件中写:“(printout t “hello,world!” crlf)”,运行,得到:
成功
另外,我在jess的百度百科下找到了一个例子,运行了一下,代码如下:
(deftemplate male “” (declare (ordered TRUE)))
(deftemplate female “” (declare (ordered TRUE)))
(deftemplate parent “” (declare (ordered TRUE)))
(deftemplate father “” (declare (ordered TRUE)))
(deftemplate mother “” (declare (ordered TRUE)))
(deffacts initialFacts
(male bill)
(female jane)
(female sally)
(parent bill sally)
(parent jane sally)
)
(defrule father
(parent ?x ?y)
(male ?x)
=>
(printout t crlf ?x " is the father of " ?y crlf)
)
(defrule mother
(parent ?x ?y)
(female ?x)
=>
(printout t crlf ?x " is the mother of " ?y crlf)
)
(reset)
(facts)
(run)
(printout t crlf)
运行结果:

评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值