定制 ridesoft/aiml 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

ridesoft/aiml

Composer 安装命令:

composer require ridesoft/aiml

包简介

Parser library for aiml files

README 文档

README

Build Status

Aiml Php library for php, compatible with Php 7.3>=.

AIML stands for Artificial Intelligence Modelling Language. AIML is an XML based markup language meant to create artificial intelligent applications.

AIML Reference

Supported language tags

  • <pattern>
  • <template>
  • <star>
  • <srai>

How install it

composer require ridesoft/aiml:~0.1.0

Base usage example

You can find this example in the robot.php file. Run it with docker run -v ${PWD}:/var/www/html --rm -it php:7.4-fpm-alpine sh -c "php tests/robot.php"

<?php

require 'vendor/autoload.php';

$file = new \Ridesoft\AIML\File();

echo "Hello Aiml\n";
echo $file->setAimlFile(__DIR__ . '/files/simple.aiml')
        ->getCategory('Hello Aiml')
        ->getTemplate() . "\n";

$file2 = new \Ridesoft\AIML\File();
$category = $file2->setAimlFile(__DIR__ . '/files/srai.aiml')
    ->getCategory('Who Mauri is?');

echo "Who Mauri is? \n";
if ($category->isTemplateSrai()) {
    echo $file2->getCategory($category->getTemplate($category->getStars()))
        ->getTemplate(). "\n";
}

Contributing

I develop this library in my free time: any help is really welcome: i would like in any case to follow the best practise using a TDD approach or at least write unit tests for the code.

The code follow PSR2 standards.

Check coding standards

docker run -v ${PWD}:/var/www/html --rm -it php:7.4-fpm-alpine vendor/bin/phpcs --standard=PSR2 /var/www/html/src

Run unit test (using docker)

Spin up php7.4 container with:

docker run -v ${PWD}:/var/www/html --rm -it php:7.4-fpm-alpine vendor/bin/phpunit

统计信息

  • 总下载量: 10
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 3
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 2
  • Watchers: 1
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2020-02-14

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固