<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -13,6 +13,10 @@ class Boop &lt; CampfireBot::Plugin
     @word_count = 0
   end
   
+  def debug
+    p @phrases
+  end
+  
   def listen(msg)
     add_words(msg[:message])
   end
@@ -28,21 +32,25 @@ class Boop &lt; CampfireBot::Plugin
   
   def load_transcripts(msg)
     speak(&quot;Filling my brain with transcripts...&quot;)
+    
     bot.room.available_transcripts.each do |date|
       transcript = bot.room.transcript(date)
+      
       transcript.each do |message|
-        filtered_text = strip_messages(message)
+        filtered_text = strip_message(message)
         add_words(filtered_text.gsub(/([^\.])$/, '\1.')) unless filtered_text.blank?
+        
         puts filtered_text.gsub(/([^\.])$/, '\1.') unless filtered_text.blank?
       end
     end
+    
     speak(&quot;Primed!&quot;)
   end
   
   private
     
   def add_line(line)
-    words        = line.scan(/\S+/))
+    words        = line.scan(/\S+/)
     @word_count += words.length
     
     words.each_with_index do |word, index|
@@ -66,7 +74,7 @@ class Boop &lt; CampfireBot::Plugin
       output &lt;&lt; phrase.shift
 
       # select at random and add it to our phrase
-      phrase.push options[rand(options.length)]
+      phrase.push(options.rand)
 
       # the last phrase of the input text will map to an empty array of
       # possibilities so exit cleanly.
@@ -81,11 +89,12 @@ class Boop &lt; CampfireBot::Plugin
     @phrases.keys.rand.first
   end
   
+  # amount of state (order-k)
   def phrase_length
     1
   end
   
-  def strip_messages(msg)
+  def strip_message(msg)
     str = msg[:message].to_s
     
     return '' if str.blank?</diff>
      <filename>plugins/boop.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>372567b253437bbc8c55d547bfc143f12c602587</id>
    </parent>
  </parents>
  <author>
    <name>Tim Riley</name>
    <email>tim@openmonkey.com</email>
  </author>
  <url>http://github.com/timriley/campfire-bot/commit/6fce4bfdf4fc27294caa28e9265011719e3f79fe</url>
  <id>6fce4bfdf4fc27294caa28e9265011719e3f79fe</id>
  <committed-date>2008-10-30T23:06:35-07:00</committed-date>
  <authored-date>2008-10-30T23:06:35-07:00</authored-date>
  <message>cleanups and syntax fixes to markov plugin</message>
  <tree>b511eb452045e78e3a42352b53a2eeb29d8e7950</tree>
  <committer>
    <name>Tim Riley</name>
    <email>tim@openmonkey.com</email>
  </committer>
</commit>
