lucene-java-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dna...@apache.org
Subject svn commit: r178880 - in /lucene/java/trunk/contrib/spellchecker/src/java/org/apache/lucene/search/spell: LuceneDictionary.java PlainTextDictionary.java SpellChecker.java SuggestWord.java
Date Sat, 28 May 2005 19:21:50 GMT
Author: dnaber
Date: Sat May 28 12:21:49 2005
New Revision: 178880

URL: http://svn.apache.org/viewcvs?rev=178880&view=rev
Log:
javadoc fixes

Modified:
    lucene/java/trunk/contrib/spellchecker/src/java/org/apache/lucene/search/spell/LuceneDictionary.java
    lucene/java/trunk/contrib/spellchecker/src/java/org/apache/lucene/search/spell/PlainTextDictionary.java
    lucene/java/trunk/contrib/spellchecker/src/java/org/apache/lucene/search/spell/SpellChecker.java
    lucene/java/trunk/contrib/spellchecker/src/java/org/apache/lucene/search/spell/SuggestWord.java

Modified: lucene/java/trunk/contrib/spellchecker/src/java/org/apache/lucene/search/spell/LuceneDictionary.java
URL: http://svn.apache.org/viewcvs/lucene/java/trunk/contrib/spellchecker/src/java/org/apache/lucene/search/spell/LuceneDictionary.java?rev=178880&r1=178879&r2=178880&view=diff
==============================================================================
--- lucene/java/trunk/contrib/spellchecker/src/java/org/apache/lucene/search/spell/LuceneDictionary.java
(original)
+++ lucene/java/trunk/contrib/spellchecker/src/java/org/apache/lucene/search/spell/LuceneDictionary.java
Sat May 28 12:21:49 2005
@@ -26,7 +26,7 @@
 import java.io.*;
 
 /**
- * Lucene Dictionnary
+ * Lucene Dictionary
  *
  * @author Nicolas Maisonneuve
  */

Modified: lucene/java/trunk/contrib/spellchecker/src/java/org/apache/lucene/search/spell/PlainTextDictionary.java
URL: http://svn.apache.org/viewcvs/lucene/java/trunk/contrib/spellchecker/src/java/org/apache/lucene/search/spell/PlainTextDictionary.java?rev=178880&r1=178879&r2=178880&view=diff
==============================================================================
--- lucene/java/trunk/contrib/spellchecker/src/java/org/apache/lucene/search/spell/PlainTextDictionary.java
(original)
+++ lucene/java/trunk/contrib/spellchecker/src/java/org/apache/lucene/search/spell/PlainTextDictionary.java
Sat May 28 12:21:49 2005
@@ -25,11 +25,12 @@
 
 
 /**
- * dictionary represented by a file text
- * Format allowed: 1 word per line:
- * word1
- * word2
- * word3
+ * Dictionary represented by a file text.
+ * 
+ * <p>Format allowed: 1 word per line:<br>
+ * word1<br>
+ * word2<br>
+ * word3<br>
  *
  * @author Nicolas Maisonneuve
  */

Modified: lucene/java/trunk/contrib/spellchecker/src/java/org/apache/lucene/search/spell/SpellChecker.java
URL: http://svn.apache.org/viewcvs/lucene/java/trunk/contrib/spellchecker/src/java/org/apache/lucene/search/spell/SpellChecker.java?rev=178880&r1=178879&r2=178880&view=diff
==============================================================================
--- lucene/java/trunk/contrib/spellchecker/src/java/org/apache/lucene/search/spell/SpellChecker.java
(original)
+++ lucene/java/trunk/contrib/spellchecker/src/java/org/apache/lucene/search/spell/SpellChecker.java
Sat May 28 12:21:49 2005
@@ -42,15 +42,16 @@
  * (initially inspired by the David Spencer code).
  *  </p>
  *  
- *  <p>
- *  Spell Checker spellchecker= new SpellChecker (spellDirectory);<br/>
- *  <br/>
- *  //To index a field of a user index <br/>
- *  spellchecker.indexDictionary(new LuceneDictionary(my_lucene_reader, a_field));<br/>
- *<br/>
- *   //To index a file containing words  <br/>
- *  spellchecker.indexDictionary(new PlainTextDictionary(new File("myfile.txt")));<br/>
- *</p>
+ *  <p>Example Usage:
+ * 
+ * <pre>
+ *  SpellChecker spellchecker = new SpellChecker(spellIndexDirectory);
+ *  // To index a field of a user index:
+ *  spellchecker.indexDictionary(new LuceneDictionary(my_lucene_reader, a_field));
+ *  // To index a file containing words:
+ *  spellchecker.indexDictionary(new PlainTextDictionary(new File("myfile.txt")));
+ *  String[] suggestions = spellchecker.suggestSimilar("misspelt", 5);
+ * </pre>
  * 
  * @author Nicolas Maisonneuve
  * @version 1.0
@@ -83,8 +84,7 @@
 
 
     /**
-     *  Set the accuraty 0<min<1 default 0.5
-     * @param min float
+     *  Set the accuracy 0 &lt; min &lt; 1; default 0.5
      */
     public void setAccuraty (float min) {
         this.min=min;
@@ -109,17 +109,17 @@
 
 
     /**
-     * Suggest similar words (restricted or not of a field of a user index)
+     * Suggest similar words (restricted or not to a field of a user index)
      * @param word String the word you want a spell check done on
      * @param num_sug int the number of suggest words
      * @param ir the indexReader of the user index (can be null see field param)
-     * @param field String the field of the user index: if field is not null ,the suggest
+     * @param field String the field of the user index: if field is not null, the suggested
      * words are restricted to the words present in this field.
      * @param morePopular boolean return only the suggest words that are more frequent than
the searched word
      * (only if restricted mode = (indexReader!=null and field!=null)
      * @throws IOException
-     * @return String[] the sorted list of the suggest words with this 2 criteri
-     * first criteria : the edit distance, second criteria (only if restricted mode): the
popularity
+     * @return String[] the sorted list of the suggest words with this 2 criteria:
+     * first criteria: the edit distance, second criteria (only if restricted mode): the
popularity
      * of the suggest words in the field of the user index
      */
     public String[] suggestSimilar (String word, int num_sug, IndexReader ir, String field
@@ -249,10 +249,10 @@
 
 
     /**
-     * if the word exist in the index
+     * Check whether the word exists in the index.
      * @param word String
      * @throws IOException
-     * @return boolean
+     * @return true iff the word exists in the index
      */
     public boolean exist (String word) throws IOException {
         if (reader==null) {
@@ -319,7 +319,6 @@
             return 3;
         }
         return 2;
-
     }
 
 

Modified: lucene/java/trunk/contrib/spellchecker/src/java/org/apache/lucene/search/spell/SuggestWord.java
URL: http://svn.apache.org/viewcvs/lucene/java/trunk/contrib/spellchecker/src/java/org/apache/lucene/search/spell/SuggestWord.java?rev=178880&r1=178879&r2=178880&view=diff
==============================================================================
--- lucene/java/trunk/contrib/spellchecker/src/java/org/apache/lucene/search/spell/SuggestWord.java
(original)
+++ lucene/java/trunk/contrib/spellchecker/src/java/org/apache/lucene/search/spell/SuggestWord.java
Sat May 28 12:21:49 2005
@@ -18,8 +18,8 @@
  */
 
 /**
- *  SuggestWord Class
- *  used in suggestSimilat method in SpellChecker class
+ *  SuggestWord Class, used in suggestSimilar method in SpellChecker class.
+ * 
  *  @author Nicolas Maisonneuve
  */
  final class SuggestWord {



Mime
View raw message