剪辑python绑定

clipsp的Python项目详细描述


pythonCFFI用于“c”语言集成生产系统的绑定CLIPS6.30。

Source:https://github.com/noxdafox/clipspy
Documentation:https://clipspy.readthedocs.io
Download:https://pypi.python.org/pypi/clipspy

Build StatusDocumentation Status

CLIPS最初是在美国宇航局约翰逊航天中心开发的,是一种基于规则的编程语言,用于创建专家和生产系统,其中启发式解决方案比命令式解决方案更易于实现和维护clips旨在促进软件的开发,以模拟人类的知识或专长。

clipspy在python生态系统中带来了clips功能。

安装

窗口

CLIPSPy对于大多数Python版本和架构来说都是一个轮子因此,它可以从Pip安装

> pip install clipspy

Linux

借记和衍生

clip6.30在unstable中作为debian包提供。

# apt install libclips libclips-dev
# pip install clipspy

从源头建造

提供的makefile负责检索clips源代码并与之一起编译python绑定。

$ make
# make install

构建源代码需要以下工具。

  • gcc
  • make
  • wget
  • unzip
  • python
  • python-cffi

Makefile接受以下条件变量

  • PYTHON: Python interpreter to use, default python
  • CLIPS_SOURCE_URL: Location from where to retrieve CLIPS source code archive.
  • SHARED_LIBRARY_DIR: Path where to install CLIPS shared library, default /usr/lib

示例

fromclipsimportEnvironment,Symbolenvironment=Environment()# load constructs into the environmentenvironment.load('constructs.clp')# assert a fact as stringenvironment.assert_string('(a-fact)')# retrieve a fact templatetemplate=environment.find_template('a-fact')# create a new fact from the templatefact=template.new_fact()# implied (ordered) facts are accessed as listsfact.append(42)fact.extend(("foo","bar"))# assert the fact within the environmentfact.assertit()# retrieve another fact templatetemplate=environment.find_template('another-fact')fact=template.new_fact()# template (unordered) facts are accessed as dictionariesfact["slot-name"]=Symbol("foo")fact.assertit()# execute the activations in the agendaenvironment.run()

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java Android测试运行失败:没有测试结果   java设置JMenuItems与Nimbus LaF的边界   java是使用springboot、Crudepository和MySQL检查重复值的好方法吗   谷歌电子表格的Java时代日期   java向xml文件添加EditText不起作用   java ORA00933:SQL命令未正确结束WHERE子句   如何在java中防止JTextField上使用CTRL+C?   java绑定到TypeLiteral在google guice中是好的还是坏的做法   java找到了原始类型,缺少泛型类的返回参数   Kafka Streams API中ArrayList Serde的java问题   java在hibernate中,哪种持久化上下文的性能更好?   java通过本机查询获取数据库url、名称和模式版本   如何为Java枚举编写通用for循环?   在Java应用程序中播放MP3   如何使用VisualVM度量短时间运行的Java应用程序的性能?   java从当前日期获取datetime(秒)   简单JMH基准中的javagrpcoome和NPE   java如何加载Maven项目库中Spring jar的应用程序上下文   JavaCC XPath解析器   用于Scala和Java的类型安全生成器库