⚪️ A RiveScript interpreter for PHP. RiveScript is a scripting language for chatterbots.
Switch branches/tags
Nothing to show
Clone or download
kaidesu Apply fixes from StyleCI (#8)
[ci skip] [skip ci]
Latest commit ed328d6 Apr 27, 2017
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
logs Added logging Jun 15, 2016
resources Updates Feb 19, 2017
src Apply fixes from StyleCI (#8) Apr 27, 2017
tests Apply fixes from StyleCI (#8) Apr 27, 2017
.gitattributes Added Travis CI support Dec 28, 2015
.gitignore Improve tests Feb 19, 2017
LICENSE Initial commit Dec 24, 2015
README.md Updated readme Oct 24, 2016
composer.json Lets get to testing! Feb 15, 2017
failed.png Improve tests Feb 19, 2017
gulpfile.js Improve tests Feb 19, 2017
package.json Improve tests Feb 19, 2017
phpunit.xml Improve tests Feb 19, 2017
rivescript Various updates May 26, 2016
success.png Improve tests Feb 19, 2017

README.md

RiveScript-PHP

Source License

This is a RiveScript interpreter library for PHP. See the below Working Draft section for more information.

The package follows the FIG standards PSR-1, PSR-2, and PSR-4 to ensure a high level of interoperability between shared PHP code.

Screenshot

Quick Installation

Simply install the package through Composer.

composer require vulcan/rivescript

Integration

The RiveScript PHP interpreter is framework agnostic. As such, the interpreter can be used as is with native PHP, or with your favorite framework.


Working Draft

The RiveScript Working Draft (WD) is a document that defines the standards for how RiveScript should work, from an implementation-agnostic point of view. The Working Draft should be followed when contributing to the RiveScript-PHP interpreter. If any of the current implementations don't do what the Working Draft says they should, this is considered to be a bug and you can file a bug report or send a pull request.

A copy of the working draft can be found within the resources directory of this repository. You may also find the latest version on the RiveScript website at http://www.rivescript.com/wd/RiveScript.

Roadmap

Interpreter

  • Format
  • Whitespace
  • Standard Global Variables
  • Sort +Triggers
  • Sort %Previous
  • Sort Replies
  • Syntax Checking

Tag Priority

  • Within BEGIN/Request
  • Within +Trigger
  • Within Replies

Commands

  • % Previous
  • ^ Continue
  • @ Redirect
  • * Condition
  • // Comment

! Definition

  • version
  • global
  • var
  • array
  • sub
  • person

> Label

  • begin
  • topic
  • object

+ Trigger

  • Atomic
  • Wildcard
  • Alternation
  • Optional
  • Arrays
  • Priority

- Response

  • Atomic
  • Random
  • Weighted Random

Tags

  • <star>
  • <star1> - <starN>
  • <botstar>
  • <botstar1> - <botstarN>
  • <input1> - <input9>
  • <reply1> - <reply9
  • <id>
  • <bot>
  • <env>
  • <get>
  • <set>
  • <add>
  • <sub>
  • <mult>
  • <div>
  • {topic=...}
  • {weight=...}
  • {@...}
  • <@>
  • {random}...{/random}
  • {person}...{/person}
  • <person>
  • {formal}...{/formal}
  • <formal>
  • {sentence}...{/sentence}
  • <sentence>
  • {uppercase}...{/uppercase}
  • <uppercase>
  • {lowercase}...{/lowercase}
  • <lowercase>
  • {ok}
  • \s
  • \n
  • \/
  • \#