public class ChasenParser extends AbstractParser
annotatedWords, exclusions, firstOccurrenceOnly, ignoreNewlines, parsePosition
Constructor and Description |
---|
ChasenParser(Set<String> exclusions) |
ChasenParser(Set<String> exclusions,
boolean firstOccurrenceOnly) |
ChasenParser(String chasenExecutable,
Set<String> exclusions,
boolean firstOccurrenceOnly) |
Modifier and Type | Method and Description |
---|---|
protected boolean |
annotate(String partOfSpeech)
Test if annotations should be generated for a particular part of speech.
|
protected String |
constructGrammaticalType(String partOfSpeech,
String inflectionType,
String inflectedForm) |
protected void |
finalize()
Overridden to terminate a chasen process if it is still running.
|
Locale |
getLanguage()
Returns the language which the parser can parse.
|
String |
getName()
Returns the name of the parser in a user-presentable form.
|
List<TextAnnotation> |
parse(char[] text,
int start,
int length)
Parses the text, returning a list with annotations for words in the text.
|
void |
reset()
Ends the chasen application and clears the lookup cache.
|
getParsePosition, ignoreWord, isAnnotateFirstOccurrenceOnly, isIgnoreNewlines, setAnnotateFirstOccurrenceOnly, setIgnoreNewlines
public String getName()
Parser
public Locale getLanguage()
Parser
public List<TextAnnotation> parse(char[] text, int start, int length) throws SearchException
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.protected boolean annotate(String partOfSpeech)
protected String constructGrammaticalType(String partOfSpeech, String inflectionType, String inflectedForm)
public void reset()
reset
in interface Parser
reset
in class AbstractParser
Copyright © 2001-2013 the JGloss developers. All Rights Reserved.