Package cc.mallet.util
Class CharSequenceLexer
- java.lang.Object
-
- cc.mallet.util.CharSequenceLexer
-
- All Implemented Interfaces:
Lexer
,java.io.Serializable
,java.util.Iterator
public class CharSequenceLexer extends java.lang.Object implements Lexer, java.io.Serializable
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static java.util.regex.Pattern
LEX_ALPHA
static java.util.regex.Pattern
LEX_NONWHITESPACE_CLASSES
static java.util.regex.Pattern
LEX_NONWHITESPACE_TOGETHER
static java.util.regex.Pattern
LEX_WORD_CLASSES
static java.util.regex.Pattern
LEX_WORDS
static java.util.regex.Pattern
UNICODE_LETTERS
-
Constructor Summary
Constructors Constructor Description CharSequenceLexer()
CharSequenceLexer(java.lang.CharSequence input, java.lang.String regex)
CharSequenceLexer(java.lang.CharSequence input, java.util.regex.Pattern regex)
CharSequenceLexer(java.lang.String regex)
CharSequenceLexer(java.util.regex.Pattern regex)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.CharSequence
getCharSequence()
int
getEndOffset()
java.lang.String
getPattern()
int
getStartOffset()
java.lang.String
getTokenString()
boolean
hasNext()
static void
main(java.lang.String[] args)
java.lang.Object
next()
void
remove()
void
setCharSequence(java.lang.CharSequence input)
void
setPattern(java.lang.String reg)
-
-
-
Field Detail
-
LEX_ALPHA
public static final java.util.regex.Pattern LEX_ALPHA
-
LEX_WORDS
public static final java.util.regex.Pattern LEX_WORDS
-
LEX_NONWHITESPACE_TOGETHER
public static final java.util.regex.Pattern LEX_NONWHITESPACE_TOGETHER
-
LEX_WORD_CLASSES
public static final java.util.regex.Pattern LEX_WORD_CLASSES
-
LEX_NONWHITESPACE_CLASSES
public static final java.util.regex.Pattern LEX_NONWHITESPACE_CLASSES
-
UNICODE_LETTERS
public static final java.util.regex.Pattern UNICODE_LETTERS
-
-
Constructor Detail
-
CharSequenceLexer
public CharSequenceLexer()
-
CharSequenceLexer
public CharSequenceLexer(java.util.regex.Pattern regex)
-
CharSequenceLexer
public CharSequenceLexer(java.lang.String regex)
-
CharSequenceLexer
public CharSequenceLexer(java.lang.CharSequence input, java.util.regex.Pattern regex)
-
CharSequenceLexer
public CharSequenceLexer(java.lang.CharSequence input, java.lang.String regex)
-
-
Method Detail
-
setCharSequence
public void setCharSequence(java.lang.CharSequence input)
-
getCharSequence
public java.lang.CharSequence getCharSequence()
-
getPattern
public java.lang.String getPattern()
-
setPattern
public void setPattern(java.lang.String reg)
-
getStartOffset
public int getStartOffset()
- Specified by:
getStartOffset
in interfaceLexer
-
getEndOffset
public int getEndOffset()
- Specified by:
getEndOffset
in interfaceLexer
-
getTokenString
public java.lang.String getTokenString()
- Specified by:
getTokenString
in interfaceLexer
-
hasNext
public boolean hasNext()
-
next
public java.lang.Object next()
-
remove
public void remove()
-
main
public static void main(java.lang.String[] args)
-
-