Constructor and Description |
---|
NullParser() |
Modifier and Type | Method and Description |
---|---|
Locale |
getLanguage()
Returns the language which the parser can parse.
|
String |
getName()
Returns the name of the parser in a user-presentable form.
|
int |
getParsePosition()
Returns the position in the text the parser is currently parsing.
|
boolean |
isAnnotateFirstOccurrenceOnly()
Return if only the first occurrence of a word should be annotated.
|
boolean |
isIgnoreNewlines()
Return if the parser skips newlines in the imported text.
|
List<TextAnnotation> |
parse(char[] text,
int start,
int length)
Parses the text, returning a list with annotations for words in the text.
|
void |
reset()
Clears any caches which may have been filled during parsing.
|
void |
setAnnotateFirstOccurrenceOnly(boolean firstOccurrence)
Set if only the first occurrence of a word should be annotated.
|
void |
setIgnoreNewlines(boolean ignoreNewlines)
Set if the parser should skip newlines in the imported text.
|
public List<TextAnnotation> parse(char[] text, int start, int length) throws SearchException
Parser
parse
in interface Parser
text
- The text to parse.text annotations
. If no annotations were created, the empty
list will be returned.SearchException
- If an error occurrs during a dictionary lookup.public int getParsePosition()
Parser
getParsePosition
in interface Parser
public void reset()
Parser
setAnnotateFirstOccurenceOnly
is set to
true
.public void setIgnoreNewlines(boolean ignoreNewlines)
Parser
setIgnoreNewlines
in interface Parser
public boolean isIgnoreNewlines()
Parser
isIgnoreNewlines
in interface Parser
public void setAnnotateFirstOccurrenceOnly(boolean firstOccurrence)
Parser
true
, an annotated word will be cached and further occurrences will be ignored.
The cache of annotated words will be cleared when reset
is called.setAnnotateFirstOccurrenceOnly
in interface Parser
public boolean isAnnotateFirstOccurrenceOnly()
Parser
isAnnotateFirstOccurrenceOnly
in interface Parser
public String getName()
Parser
public Locale getLanguage()
Parser
getLanguage
in interface Parser
Copyright © 2001-2013 the JGloss developers. All Rights Reserved.