Git Product home page Git Product logo

programr's Introduction

ProgramR

Aside:

This is just a simple port of http://aiml-programr.rubyforge.org/ (authored in 2007), to something a tiny bit more usable. No new code really, I just sorta took the necessary parts to turn it into a gem for curiosity's sake.

AIML itself seems pretty simple, and weak as far as pattern matching goes, but the ALICE bot has won the Loebner prize, so there's that.

About:

ProgramR is a Ruby implementation of an interpreter for the Artificial Intelligence Markup Language (AIML) based on the work of Dr. Wallace and defined by the Alicebot and AIML Architecture Committee of the A.L.I.C.E. AI Foundation http://alicebot.org

Some of the ALICE AIML files have thrown parse errors with certain caraters in my tests, so a subset is available here: https://github.com/robertjwhitney/alice-programr

Original Authors:

Mauro Cicio, Nicholas H.Tollervey and Ben Minton

Installation

Add this line to your application's Gemfile:

gem 'programr'

And then execute:

$ bundle

Or install it yourself as:

$ gem install programr

You can find a set of ALICE AIML files hosted at http://code.google.com/p/aiml-en-us-foundation-alice

Some of them have thrown errors in my tests so a subset is available here: https://github.com/robertjwhitney/alice-programr

Usage

#programr_test.rb

require 'bundler'
Bundler.setup :default

require 'programr'

if ARGV.empty?
  puts 'Please pass a list of AIMLs and/or directories as parameters'
  puts 'Usage: ruby programr_test.rb {aimlfile|dir}[{aimlfile|dir}]...'
  exit
end

robot = ProgramR::Facade.new
robot.learn(ARGV)

while true
  print '>> '
  s = STDIN.gets.chomp
  reaction = robot.get_reaction(s)
  STDOUT.puts "<< #{reaction}"
end

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Added some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

programr's People

Contributors

robertjwhitney avatar drusepth avatar boykoc avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.