aiml-ruby-example
About
This is an extremely simple example of how to use AIML files in Ruby through the terminal. It uses the ProgramR gem to parse the .aiml
files and to get an response of our questions.
This example uses the Sara Spanish set of AIMLs that you could find here. You could try to download another set to play with it.
Usage
To test this example, you should follow this steps:
-
Install Ruby version 2.2.3 e.g. (using RVM or RBenv or whatever).
-
Clone the repo and make the
bot.rb
file executable:
user@computer:~$ git clone [email protected]:dreamingechoes/aiml-ruby-example.git
user@computer:~$ cd aiml-ruby-example
user@computer:/aiml-ruby-example$ chmod +x bot.rb
- Install the
ProgramR
gem by executing:
user@computer:/aiml-ruby-example$ gem install programr
- Then you are ready to test this by executing the file and starting to type some questions to get an answer:
user@computer:/aiml-ruby-example$ ./bot.rb
When you've tired of talking to the bot, type quit
to exit.
Contributing
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Added some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request
License
aiml-ruby-example is released under the MIT License.