2017 © Pedro Peláez
 

library smart-bot

Smart multilinguage bot responder implemented in PHP, with learning capabilities

image

flyingbono/smart-bot

Smart multilinguage bot responder implemented in PHP, with learning capabilities

  • Thursday, December 22, 2016
  • by flyingbono
  • Repository
  • 2 Watchers
  • 3 Stars
  • 20 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 1 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

SmartBot

Build Status Code Climate Test Coverage Issue Count Issue Count Listeners, (*1)

Multilinguage bot responder implemented in PHP, with learning capabilities, (*2)

Installation :

``` sh $ composer.phar require flyingbono/smart-bot, (*3)


### Basic usage : ```php <?php require_once '../vendor/autoload.php'; // Options : all are optionals $options = array( 'listener' => 'SmartBot\Bot\Listener\EnUSListener', // default listener (default: EnUSListener) 'innate' => 'file.php', // Innate memory data (default: null) 'entity' => 'CallerUID', // ID of the person talking to the bot (default: null) 'context' => ['Humor:Funny'], // List of the bot contexts (users-defined) ); $bot = new \SmartBot\Bot( // Data path for acquired memory storage) '/tmp/smartbot-data/', // Bot options $options ); // Load innate memory (optionnal) // @see (documentation : todo) $bot -> setInnateMemory( $memoryFilePath ); // Learn some data (optional) $bot -> learn('Weather', 'Sun shine'); $bot -> learn('Myself:name', 'Smart BOT'); // ... // Add custom listener (optionnal) $bot -> addListener( 'SmartBot\Bot\Listener\CustomListener' ); // Add custom contexts $bot -> addContext('Time:morning'); $bot -> addContext(array('Humor:Funny','...')); // Sets the user who's talking to the bot (required) // It may be the logged user in your app, // or simply the PHP Session ID $bot -> setEntity('Bruno VIBERT'); // Talk to the bot (optionnal, but recommanded ;)) $response = $bot -> talk('Hello !'); // Hello, Hi... $response = $bot -> talk('My name is John'); // Ok, John, I will remember that ! $response = $bot -> talk('Hi'); // Hello, John

The Versions

22/12 2016

dev-master

9999999-dev

Smart multilinguage bot responder implemented in PHP, with learning capabilities

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

by Bruno VIBERT

php bot chat learn multilinguage