Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mbrioski/aiml
PHP >=7.3 library for AIML files
https://github.com/mbrioski/aiml
aiml aiml-interpreter php php73
Last synced: 1 day ago
JSON representation
PHP >=7.3 library for AIML files
- Host: GitHub
- URL: https://github.com/mbrioski/aiml
- Owner: mbrioski
- License: mit
- Created: 2020-02-09T18:17:18.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2020-02-18T09:10:29.000Z (almost 5 years ago)
- Last Synced: 2024-11-18T22:39:59.724Z (1 day ago)
- Topics: aiml, aiml-interpreter, php, php73
- Language: PHP
- Homepage:
- Size: 38.1 KB
- Stars: 1
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
AIML library for php
---
[![Build Status](https://travis-ci.org/ridesoft/AIML.svg?branch=master)](https://travis-ci.org/ridesoft/Aiml-parser)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](https://www.pandorabots.com/docs/aiml-reference/)
## Supported language tags
* ``
* ``
* ``
* ``## How install it
`composer require ridesoft/aiml:~0.1.0`
## Base usage example
You can find this example in the [robot.php](tests/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"````
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
```