diff --git a/CHANGES.txt b/CHANGES.txt
index ff6a1fa649b..86718b34e3b 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -150,6 +150,9 @@ Optimizations
Documentation
+* LUCENE-2008: Javadoc improvements for TokenStream/Tokenizer/Token
+ (Luke Nezda via Mike McCandless)
+
Build
* LUCENE-486: Remove test->demo dependencies. (Michael Busch)
diff --git a/src/java/org/apache/lucene/analysis/CharArraySet.java b/src/java/org/apache/lucene/analysis/CharArraySet.java
index 5d350caa11c..99cb0317f74 100644
--- a/src/java/org/apache/lucene/analysis/CharArraySet.java
+++ b/src/java/org/apache/lucene/analysis/CharArraySet.java
@@ -32,7 +32,7 @@ import java.util.Iterator;
* is in the set without the necessity of converting it
* to a String first.
*
- * Please note: This class implements {@link Set} but
+ * Please note: This class implements {@link java.util.Set Set} but
* does not behave like it should in all cases. The generic type is
* {@code Set
diff --git a/src/java/org/apache/lucene/analysis/TokenFilter.java b/src/java/org/apache/lucene/analysis/TokenFilter.java
index ec4e75355a2..63dbb2dd817 100644
--- a/src/java/org/apache/lucene/analysis/TokenFilter.java
+++ b/src/java/org/apache/lucene/analysis/TokenFilter.java
@@ -19,15 +19,10 @@ package org.apache.lucene.analysis;
import java.io.IOException;
-/** A TokenFilter is a TokenStream whose input is another token stream.
+/** A TokenFilter is a TokenStream whose input is another TokenStream.
- This is an abstract class.
- NOTE: subclasses must override
- {@link #incrementToken()} if the new TokenStream API is used
- and {@link #next(Token)} or {@link #next()} if the old
- TokenStream API is used.
-
- See {@link TokenStream}
+ This is an abstract class; subclasses must override {@link #incrementToken()}.
+ @see TokenStream
*/
public abstract class TokenFilter extends TokenStream {
/** The source of tokens for this filter. */
diff --git a/src/java/org/apache/lucene/analysis/TokenStream.java b/src/java/org/apache/lucene/analysis/TokenStream.java
index 96b0ed99cdd..c3b4e7c5980 100644
--- a/src/java/org/apache/lucene/analysis/TokenStream.java
+++ b/src/java/org/apache/lucene/analysis/TokenStream.java
@@ -31,14 +31,14 @@ import org.apache.lucene.util.AttributeSource;
* A TokenStream enumerates the sequence of tokens, either from
* {@link Field}s of a {@link Document} or from query text.
*
- * This is an abstract class. Concrete subclasses are:
+ * This is an abstract class; concrete subclasses are:
*
*
{@link Tokenizer}, a TokenStream whose input is a Reader; and
*
{@link TokenFilter}, a TokenStream whose input is another
* TokenStream.
*
* A new TokenStream API has been introduced with Lucene 2.9. This API
- * has moved from being {@link Token} based to {@link Attribute} based. While
+ * has moved from being {@link Token}-based to {@link Attribute}-based. While
* {@link Token} still exists in 2.9 as a convenience class, the preferred way
* to store the information of a {@link Token} is to use {@link AttributeImpl}s.
*
Instantiation of TokenStream/{@link TokenFilter}s which add/get
* attributes to/from the {@link AttributeSource}.
*
The consumer calls {@link TokenStream#reset()}.
- *
the consumer retrieves attributes from the stream and stores local
- * references to all attributes it wants to access
- *
The consumer calls {@link #incrementToken()} until it returns false and
- * consumes the attributes after each call.
+ *
The consumer retrieves attributes from the stream and stores local
+ * references to all attributes it wants to access.
+ *
The consumer calls {@link #incrementToken()} until it returns false
+ * consuming the attributes after each call.
*
The consumer calls {@link #end()} so that any end-of-stream operations
* can be performed.
*
The consumer calls {@link #close()} to release any resource when finished
- * using the TokenStream
+ * using the TokenStream.
*
* To make sure that filters and consumers know which attributes are available,
* the attributes must be added during instantiation. Filters and consumers are
@@ -72,7 +72,7 @@ import org.apache.lucene.util.AttributeSource;
* Javadoc.
*
* Sometimes it is desirable to capture a current state of a TokenStream,
- * e.g. for buffering purposes (see {@link CachingTokenFilter},
+ * e.g., for buffering purposes (see {@link CachingTokenFilter},
* {@link TeeSinkTokenFilter}). For this usecase
* {@link AttributeSource#captureState} and {@link AttributeSource#restoreState}
* can be used.
@@ -101,7 +101,7 @@ public abstract class TokenStream extends AttributeSource implements Closeable {
}
/**
- * Consumers (ie {@link IndexWriter}) use this method to advance the stream to
+ * Consumers (i.e., {@link IndexWriter}) use this method to advance the stream to
* the next token. Implementing classes must implement this method and update
* the appropriate {@link AttributeImpl}s with the attributes of the next
* token.
diff --git a/src/java/org/apache/lucene/analysis/Tokenizer.java b/src/java/org/apache/lucene/analysis/Tokenizer.java
index 962d9f69c81..62bdc0ff173 100644
--- a/src/java/org/apache/lucene/analysis/Tokenizer.java
+++ b/src/java/org/apache/lucene/analysis/Tokenizer.java
@@ -24,20 +24,14 @@ import java.io.IOException;
/** A Tokenizer is a TokenStream whose input is a Reader.
- This is an abstract class.
-
- NOTE: subclasses must override
- {@link #incrementToken()} if the new TokenStream API is used
- and {@link #next(Token)} or {@link #next()} if the old
- TokenStream API is used.
+ This is an abstract class; subclasses must override {@link #incrementToken()}
NOTE: Subclasses overriding {@link #incrementToken()} must
call {@link AttributeSource#clearAttributes()} before
setting attributes.
- Subclasses overriding {@link #next(Token)} must call
+ Subclasses overriding {@link #incrementToken()} must call
{@link Token#clear()} before setting Token attributes.
*/
-
public abstract class Tokenizer extends TokenStream {
/** The text source for this Tokenizer. */
protected Reader input;