The StandardTokenizer type exposes the following members.

Constructors

  NameDescription
Public methodStandardTokenizer(TextReader) Obsolete.
Creates a new instance of the {@link StandardTokenizer}. Attaches the
CopyC#
input
to a newly created JFlex scanner.
Public methodStandardTokenizer(TextReader, Boolean) Obsolete.
Creates a new instance of the {@link Lucene.Net.Analysis.Standard.StandardTokenizer}. Attaches the
CopyC#
input
to the newly created JFlex scanner.
Public methodStandardTokenizer(Version, TextReader)
Creates a new instance of the {@link org.apache.lucene.analysis.standard.StandardTokenizer}. Attaches the
CopyC#
input
to the newly created JFlex scanner.
Public methodStandardTokenizer(AttributeSource, TextReader, Boolean) Obsolete.
Creates a new StandardTokenizer with a given {@link AttributeSource}.
Public methodStandardTokenizer(AttributeSource..::..AttributeFactory, TextReader, Boolean) Obsolete.
Creates a new StandardTokenizer with a given {@link Lucene.Net.Util.AttributeSource.AttributeFactory}
Public methodStandardTokenizer(Version, AttributeSource, TextReader)
Creates a new StandardTokenizer with a given {@link AttributeSource}.
Public methodStandardTokenizer(Version, AttributeSource..::..AttributeFactory, TextReader)
Creates a new StandardTokenizer with a given {@link org.apache.lucene.util.AttributeSource.AttributeFactory}

Methods

  NameDescription
Public methodAddAttribute
The caller must pass in a Class<? extends Attribute> value. This method first checks if an instance of that class is already in this AttributeSource and returns it. Otherwise a new instance is created, added to this AttributeSource and returned. Signature for Java 1.5:
CopyC#
public <T extends Attribute> T addAttribute(Class<T>)
(Inherited from AttributeSource.)
Public methodAddAttributeImpl
Adds a custom AttributeImpl instance with one or more Attribute interfaces.
(Inherited from AttributeSource.)
Public methodCaptureState
Captures the state of all Attributes. The return value can be passed to {@link #restoreState} to restore the state of this or another AttributeSource.
(Inherited from AttributeSource.)
Public methodClearAttributes
Resets all Attributes in this AttributeSource by calling {@link AttributeImpl#Clear()} on each Attribute implementation.
(Inherited from AttributeSource.)
Public methodCloneAttributes
Performs a clone of all {@link AttributeImpl} instances returned in a new AttributeSource instance. This method can be used to e.g. create another TokenStream with exactly the same attributes (using {@link #AttributeSource(AttributeSource)})
(Inherited from AttributeSource.)
Public methodClose
By default, closes the input Reader.
(Inherited from Tokenizer.)
Protected methodCorrectOffset
Return the corrected offset. If {@link #input} is a {@link CharStream} subclass this method calls {@link CharStream#CorrectOffset}, else returns
CopyC#
currentOff
.
(Inherited from Tokenizer.)
Public methodEnd (Overrides TokenStream..::..End()()()().)
Public methodEquals (Inherited from AttributeSource.)
Protected methodFinalize
Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetAttribute
The caller must pass in a Class<? extends Attribute> value. Returns the instance of the passed in Attribute contained in this AttributeSource Signature for Java 1.5:
CopyC#
public <T extends Attribute> T getAttribute(Class<T>)
(Inherited from AttributeSource.)
Public methodGetAttributeClassesIterator
Returns a new iterator that iterates the attribute classes in the same order they were added in. Signature for Java 1.5:
CopyC#
public Iterator<Class<? extends Attribute>> getAttributeClassesIterator()
Note that this return value is different from Java in that it enumerates over the values and not the keys
(Inherited from AttributeSource.)
Public methodGetAttributeFactory
returns the used AttributeFactory.
(Inherited from AttributeSource.)
Public methodGetAttributeImplsIterator
Returns a new iterator that iterates all unique Attribute implementations. This iterator may contain less entries that {@link #getAttributeClassesIterator}, if one instance implements more than one Attribute interface. Signature for Java 1.5:
CopyC#
public Iterator<AttributeImpl> getAttributeImplsIterator()
(Inherited from AttributeSource.)
Public methodGetHashCode (Inherited from AttributeSource.)
Public methodGetMaxTokenLength
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodHasAttribute
The caller must pass in a Class<? extends Attribute> value. Returns true, iff this AttributeSource contains the passed-in Attribute. Signature for Java 1.5:
CopyC#
public boolean hasAttribute(Class<? extends Attribute>)
(Inherited from AttributeSource.)
Public methodHasAttributes
Returns true, iff this AttributeSource has any attributes
(Inherited from AttributeSource.)
Public methodIncrementToken (Overrides TokenStream..::..IncrementToken()()()().)
Public methodIsReplaceInvalidAcronym Obsolete.
Prior to https://issues.apache.org/jira/browse/LUCENE-1068, StandardTokenizer mischaracterized as acronyms tokens like www.abc.com when they should have been labeled as hosts instead.
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodNext()()()() Obsolete. (Overrides TokenStream..::..Next()()()().)
Public methodNext(Token) Obsolete. (Overrides TokenStream..::..Next(Token).)
Public methodReset()()()()
Resets this stream to the beginning. This is an optional operation, so subclasses may or may not implement this method. {@link #Reset()} is not needed for the standard indexing process. However, if the tokens of a
CopyC#
TokenStream
are intended to be consumed more than once, it is necessary to implement {@link #Reset()}. Note that if your TokenStream caches tokens and feeds them back again after a reset, it is imperative that you clone the tokens when you store them away (on the first pass) as well as when you return them (on future passes after {@link #Reset()}).
(Inherited from TokenStream.)
Public methodReset(TextReader) (Overrides Tokenizer..::..Reset(TextReader).)
Public methodRestoreState
Restores this state by copying the values of all attribute implementations that this state contains into the attributes implementations of the targetStream. The targetStream must contain a corresponding instance for each argument contained in this state (e.g. it is not possible to restore the state of an AttributeSource containing a TermAttribute into a AttributeSource using a Token instance as implementation). Note that this method does not affect attributes of the targetStream that are not contained in this state. In other words, if for example the targetStream contains an OffsetAttribute, but this state doesn't, then the value of the OffsetAttribute remains unchanged. It might be desirable to reset its value to the default, in which case the caller should first call {@link TokenStream#ClearAttributes()} on the targetStream.
(Inherited from AttributeSource.)
Public methodSetMaxTokenLength
Set the max allowed token length. Any token longer than this is skipped.
Public methodSetReplaceInvalidAcronym Obsolete.
Public methodToString (Inherited from AttributeSource.)

Fields

  NameDescription
Public fieldStatic memberACRONYM
Public fieldStatic memberACRONYM_DEP Obsolete.
Public fieldStatic memberALPHANUM
Public fieldStatic memberAPOSTROPHE
Public fieldStatic memberCJ
Public fieldStatic memberCOMPANY
Public fieldStatic memberEMAIL
Public fieldStatic memberHOST
Protected fieldinput
The text source for this Tokenizer.
(Inherited from Tokenizer.)
Public fieldStatic memberNUM
Public fieldStatic memberTOKEN_TYPES
String token types that correspond to token type int constants
Public fieldStatic membertokenImage Obsolete.

See Also