<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -11,7 +11,6 @@
 //
 //  * kwt.find_each (&quot;str&quot;) {|r| .. }
 //  * kwt.find_first(&quot;str&quot;)
-//  * kwt.find_all  (&quot;str&quot;)
 //
 // TODO: change last_id and dictionary_size to long
 //
@@ -40,11 +39,21 @@ struct kwt_struct_data {
 // ResultFilter interface
 //
 
+/*
+ * call-seq: initialize
+ *
+ * Does nothing.
+ */ 
 static VALUE 
 rb_rf_init(VALUE self) {
   return self;
 }
 
+/*
+ * call-seq: valid?(result, string)
+ *
+ * Only defines the signature for this method.
+ */ 
 static VALUE
 rb_rf_valid(int argc, VALUE *argv, VALUE self) {
   VALUE result;
@@ -85,7 +94,6 @@ rb_kwt_init(VALUE self)
 }
 
 /*
- * Document-method: make
  * call-seq: make
  *
  * It freezes the current KeywordTree.
@@ -118,16 +126,15 @@ rb_kwt_make(VALUE self)
 }
 
 /*
- * Document-method: find_all
- * call-seq: find_all
+ * call-seq: find_all(string)
  *
  * Search the current tree.
  *
  * It returns an array on hashes, e.g.
  *
- *   [ { :id =&gt; int, :value =&gt; int, :starts_at =&gt; int, :ends_at =&gt; int}, { ... } ]
+ *   [ { :id =&gt; int, :value =&gt; string, :starts_at =&gt; int, :ends_at =&gt; int}, { ... } ]
  * 
- * Returns an empty array when the search didn't return any result.
+ * Or an empty array if it did not find anything.
  *
  *   # assuming a valid KeywordTree kwt object:
  *   kwt.add_string(&quot;one&quot;)
@@ -193,7 +200,6 @@ rb_kwt_find_all(int argc, VALUE *argv, VALUE self)
 }
 
 /*
- * Document-method: size
  * call-seq: size
  *
  * Returns the size of this KeywordTree
@@ -213,8 +219,7 @@ rb_kwt_size(VALUE self)
 }
 
 /*
- * Document-method: add_string
- * call-seq: add_string
+ * call-seq: add_string(string, id= nil)
  *
  * Adds a sequence to this KeywordTree.
  *
@@ -238,13 +243,11 @@ rb_kwt_add_string(int argc, VALUE *argv, VALUE self)
 { 
   VALUE v_string, v_id;
   struct kwt_struct_data *kwt_data;
-  // char * string;
   int id;
 
   rb_scan_args(argc, argv, &quot;11&quot;, &amp;v_string, &amp;v_id);
  
   Check_Type(v_string, T_STRING);
-  // string= StringValuePtr(v_string);
   KeywordTree(self, kwt_data);
 
   if(kwt_data-&gt;is_frozen == 1)
@@ -267,6 +270,14 @@ rb_kwt_add_string(int argc, VALUE *argv, VALUE self)
   return INT2FIX(id);
 }
 
+/*
+ * call-seq: filter=(AhoCorasick::ResultFilter)
+ *
+ * Attach a &lt;tt&gt;filter&lt;/tt&gt; to this KeywordTree.
+ *
+ * A &lt;tt&gt;filter&lt;/tt&gt; should extend AhoCorasick::ResultFilter and implement &lt;tt&gt;valid?&lt;/tt&gt; method.
+ *
+ */
 static VALUE
 rb_kwt_set_filter(int argc, VALUE *argv, VALUE self) {
   struct kwt_struct_data *kwt_data;
@@ -283,6 +294,12 @@ rb_kwt_set_filter(int argc, VALUE *argv, VALUE self) {
   return filter;
 }
 
+/*
+ * call-seq: filter
+ *
+ * It gets the &lt;tt&gt;filter&lt;/tt&gt;. D'oh.
+ *
+ */
 static VALUE
 rb_kwt_get_filter(VALUE self) {
   VALUE filter;
@@ -294,17 +311,9 @@ rb_kwt_get_filter(VALUE self) {
 }
 
 /*
- * call-seq: from_file
+ * call-seq: _from_file
  *
- * Creates a new KeywordTree and loads the dictionary from a file
- * 
- *    % cat dict0.txt
- *    foo
- *    bar
- *    base
- *     
- *    k= AhoCorasick::KeywordTree.from_file &quot;dict0.txt&quot;
- *    k.search(&quot;basement&quot;).size # =&gt; 1
+ * ==== Note: It's not safe to use this method, but rather from_file.
  *
  */
 static VALUE</diff>
      <filename>ext/ahocorasick/ruby-ahocorasick.c</filename>
    </modified>
    <modified>
      <diff>@@ -2,15 +2,33 @@
 require 'ahocorasick/native'
 
 module AhoCorasick
-  VERSION='0.6.1'
+  VERSION='0.6.2'
   
   class KeywordTree
 
+    #
+    # Loads the contents of file into the KeywordTree
+    #
+    #     k= AhoCorasick::KeywordTree.new
+    #     k.from_file &quot;dictionary.txt&quot;
+    #
+    #
     def from_file file
       File.read(file).each { | string | self.add_string string }
       self
     end
 
+    #
+    # Creates a new KeywordTree and loads the dictionary from a file
+    # 
+    #    % cat dict0.txt
+    #    foo
+    #    bar
+    #    base
+    #     
+    #    k= AhoCorasick::KeywordTree.from_file &quot;dict0.txt&quot;
+    #    k.find_all(&quot;basement&quot;).size # =&gt; 1
+    #
     def self.from_file filename
       self._from_file filename
     end</diff>
      <filename>lib/ahocorasick.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>16da806e5a5f65027e23a87a89c508e5225c73f1</id>
    </parent>
  </parents>
  <author>
    <name>aurelian</name>
    <email>oancea@gmail.com</email>
  </author>
  <url>http://github.com/aurelian/ruby-ahocorasick/commit/e62a71d1d2bec5af9cffc105e69bce78c74a6785</url>
  <id>e62a71d1d2bec5af9cffc105e69bce78c74a6785</id>
  <committed-date>2009-01-02T07:10:03-08:00</committed-date>
  <authored-date>2009-01-02T07:10:03-08:00</authored-date>
  <message> * documented some methods</message>
  <tree>d3cd3909c76144afeecefa7b9939d4a2da046203</tree>
  <committer>
    <name>aurelian</name>
    <email>oancea@gmail.com</email>
  </committer>
</commit>
