| Modifier and Type | Field and Description |
|---|---|
protected LinkedList<IWord> |
wordPool |
CHECK_CE_MASk, CHECK_CF_MASK, CHECK_EC_MASK, START_SS_MASK| Constructor and Description |
|---|
DelimiterSeg(JcsegTaskConfig config,
ADictionary dic)
method to create a new ISegment
|
DelimiterSeg(Reader input,
JcsegTaskConfig config,
ADictionary dic)
method to create a new ISegment
|
| Modifier and Type | Method and Description |
|---|---|
JcsegTaskConfig |
getConfig()
get the current JcsegTaskConfig instance
|
char |
getDelimiter()
get the current delimiter
|
ADictionary |
getDic()
get the current dictionary instance
|
int |
getStreamPosition()
get the current length of the stream
|
IWord |
next()
segment a word from a char array
from a specified position.
|
protected void |
pushBack(int data)
push back the data to the stream
|
protected int |
readNext()
read the next char from the current position
|
void |
reset(Reader input)
reset the reader
|
void |
setConfig(JcsegTaskConfig config)
set the current configuration
|
void |
setDelimiter(char delimiter)
set the delimiter default to whitespace
|
void |
setDic(ADictionary dic)
set the current dictionary
|
protected LinkedList<IWord> wordPool
public DelimiterSeg(JcsegTaskConfig config, ADictionary dic) throws IOException
input - maxLen - IOExceptionpublic DelimiterSeg(Reader input, JcsegTaskConfig config, ADictionary dic) throws IOException
input - delimiter - maxLen - IOExceptionpublic void reset(Reader input) throws IOException
ISegmentreset in interface ISegmentIOExceptionpublic int getStreamPosition()
ISegmentgetStreamPosition in interface ISegmentprotected int readNext()
throws IOException
IOExceptionprotected void pushBack(int data)
throws IOException
data - IOExceptionpublic IWord next() throws IOException
ISegmentnext in interface ISegmentIOExceptionpublic char getDelimiter()
public void setDelimiter(char delimiter)
delimiter - public ADictionary getDic()
public void setDic(ADictionary dic)
dic - public JcsegTaskConfig getConfig()
public void setConfig(JcsegTaskConfig config)
config - Copyright © 2017. All Rights Reserved.