No description or website provided.
Ruby
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
lib
seed_files
.gitignore
Gemfile
LICENSE
README.md
Rakefile
cervello.gemspec
seed_test.rb
test.rb

README.md

Cervello

AI thingy of some sort. I guess it's a markov chain? I'm not even sure! It's been in the works since 2010, so who knows what horrible monsters are lurking in the source.

Installation

Add this line to your application's Gemfile:

gem 'cervello'

And then execute:

$ bundle

Or install it yourself as:

$ gem install cervello

Usage

require 'cervello.rb'
cervello = Cervello.new(group_size: 4) # the 4 makes it use groups of 4 words, default is 3
cervello.add_phrase "This is a test of cervello"
cervello.add_phrase "This is a test of cervello's AI"
p cervello.words # hash of word phrases
# >> cervello.words
# => {"this"=>{"is"=>{"a"=>{"test"=>{"sentence"=>{"for"=>2}}}}}, "is"=>{"a"=>{"test"=>{"sentence"=>{"for"=>{"cervello"=>1, "cervello's"=>1}}}}}, "a"=>{"test"=>{"sentence"=>{"for"=>{"cervello's"=>{"AI"=>1}}}}}}

Seed files, copyrights for them, etc

I claim no right to any of the texts, they are provided solely as example text for cervello to learn from.

Introduction To Machine Learning by Nils J. Nilsson seed_files/Machine_Learning.txt

A Short Introduction to Operating Systesm by Mark Burgess seed_files/A_Short_Introduction_To_Operating_Systems.txt

Alice In Wonderland by Lewis Carrol seed_files/Alice_In_Wonderland.txt http://www.gutenberg.org/files/19033/19033-h/19033-h.htm

The Big Trip Up Yonder by Kurt Vonnegut seed_files/The_Big_Trip_Up_Yonder.txt http://www.gutenberg.org/files/30240/30240.txt

Moby Dick (The Whale) by Herman Melville seed_files/Moby_Dick.txt http://www.gutenberg.org/files/2701/2701.txt

Arch Linux - snippets from http://archlinux.org and http://wiki.archlinux.org/ seed_files/ArchLinux.txt http://archlinux.org http://wiki.archlinux.org/index.php/Arch_Linux

Contributing

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