Package org.basex.util.ft
Class WesternTokenizer
- java.lang.Object
-
- org.basex.util.ft.FTIterator
-
- org.basex.util.ft.Tokenizer
-
- org.basex.util.ft.WesternTokenizer
-
- All Implemented Interfaces:
Comparable<org.basex.util.ft.LanguageImpl>
,Iterator<FTSpan>
public final class WesternTokenizer extends Tokenizer
Full-text tokenizer.- Author:
- BaseX Team 2005-24, BSD License, Christian Gruen
-
-
Constructor Summary
Constructors Constructor Description WesternTokenizer(FTOpt fto)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compareTo(org.basex.util.ft.LanguageImpl o)
boolean
equals(Object obj)
int
hashCode()
boolean
hasNext()
WesternTokenizer
init(byte[] txt)
Initializes the iterator.FTSpan
next()
byte[]
nextToken()
Returns the next token.protected byte
prec()
Returns the precedence of the processor.boolean
supports(Language ln)
Checks if the specified language is supported.String
toString()
-
Methods inherited from class org.basex.util.ft.Tokenizer
supportFor
-
Methods inherited from class org.basex.util.ft.FTIterator
remove
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Iterator
forEachRemaining
-
-
-
-
Constructor Detail
-
WesternTokenizer
public WesternTokenizer(FTOpt fto)
Constructor.- Parameters:
fto
- full-text options
-
-
Method Detail
-
init
public WesternTokenizer init(byte[] txt)
Description copied from class:FTIterator
Initializes the iterator.- Specified by:
init
in classFTIterator
- Parameters:
txt
- text- Returns:
- self reference
-
hasNext
public boolean hasNext()
-
next
public FTSpan next()
-
nextToken
public byte[] nextToken()
Description copied from class:FTIterator
Returns the next token. May be called as an alternative toIterator.next()
to avoid the creation of newFTSpan
instances.- Specified by:
nextToken
in classFTIterator
- Returns:
- token
-
prec
protected byte prec()
Returns the precedence of the processor. If two language implementations support the same language, the processor with the higher precedence will be selected.- Returns:
- precedence
-
supports
public boolean supports(Language ln)
Checks if the specified language is supported.- Parameters:
ln
- language- Returns:
- true if language is supported
-
compareTo
public final int compareTo(org.basex.util.ft.LanguageImpl o)
- Specified by:
compareTo
in interfaceComparable<org.basex.util.ft.LanguageImpl>
-
-