errfree is a factoid & Markov chain text processing bot that features semi- intelligent conversation and the ability to discern question/answer phrases.
- Basic Functions
| #!/usr/bin/ruby | |
| # Viewing as a Gist? See rubytask.md at the bottom | |
| ARGV.push 'help' if ARGV.empty? | |
| command = ARGV.shift.downcase | |
| Taskfile = '/home/'+ENV['USER']+'/.rtasks' | |
| system "touch #{Taskfile}" if !File.exist? Taskfile |
| #!/usr/bin/ruby | |
| RLSP_VERSION = "1.4.2" | |
| class Lambda | |
| attr_accessor :args, :body | |
| def initialize(args=[],body="") | |
| @args = (args.class == Array) ? args : [args] | |
| @body = body | |
| end |
| class Canine | |
| VERSION = '1.3' | |
| def initialize(&block) | |
| @commands = Hash.new | |
| @default = @latest = :commands | |
| @empty = nil | |
| @auto = { | |
| :commands => hash_command("commands","Show a list of commands",Proc.new { | |
| @commands.each { |cmd| c = cmd[1] | |
| name = c[:name].to_s |