public class Match
extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
Match.CaseConversion
Possible string case conversions.
|
static class |
Match.IncludeRange |
| Constructor and Description |
|---|
Match(String posTag,
String posTagReplace,
boolean postagRegexp,
String regexMatch,
String regexReplace,
Match.CaseConversion caseConversionType,
boolean setPOS,
Match.IncludeRange includeSkipped) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
convertsCase()
Used to let LT know that it should change the case of the match.
|
AnalyzedTokenReadings |
filterReadings() |
String |
getTargetPosTag()
Format POS tag using parameters already defined in the class.
|
int |
getTokenRef()
Gets the token number referenced by the match.
|
boolean |
isInMessageOnly() |
boolean |
posRegExp()
Checks if the Match element uses regexp-based form of the POS tag.
|
void |
setInMessageOnly(boolean inMessageOnly) |
void |
setLemmaString(String lemmaString)
Sets a base form (lemma) that will be formatted, or synthesized, using the
specified POS regular expressions.
|
boolean |
setsPos()
Checks if the Match element is used for setting the part of speech Element.
|
void |
setSynthesizer(Synthesizer synth)
Sets a synthesizer used for grammatical synthesis of forms based on
formatted POS values.
|
void |
setToken(AnalyzedTokenReadings token)
Sets the token that will be formatted or otherwise used in the class.
|
void |
setToken(AnalyzedTokenReadings[] tokens,
int index,
int next)
Sets the token to be formatted etc. and includes the support for
including the skipped tokens.
|
void |
setTokenRef(int i)
Sets the token number referenced by the match.
|
String[] |
toFinalString()
Gets all strings formatted using the match element.
|
String |
toTokenString()
Method for getting the formatted match as a single string.
|
public Match(String posTag,
String posTagReplace,
boolean postagRegexp,
String regexMatch,
String regexReplace,
Match.CaseConversion caseConversionType,
boolean setPOS,
Match.IncludeRange includeSkipped)
public final void setToken(AnalyzedTokenReadings token)
public final void setToken(AnalyzedTokenReadings[] tokens, int index, int next)
tokens - Array of tokensindex - Index of the token to be formattednext - Position of the next token (the skipped tokens
are the ones between the tokens[index] and tokens[next]public final boolean setsPos()
public final boolean posRegExp()
public final void setLemmaString(String lemmaString)
lemmaString - String that specifies the base form.public final void setSynthesizer(Synthesizer synth)
synth - Synthesizer class.public final String[] toFinalString()
throws IOException
IOException - in case of synthesizer-related disk problems.public final String getTargetPosTag()
public final String toTokenString()
throws IOException
IOExceptionpublic final void setTokenRef(int i)
i - Token number.public final int getTokenRef()
public final boolean convertsCase()
public final AnalyzedTokenReadings filterReadings()
public void setInMessageOnly(boolean inMessageOnly)
inMessageOnly - the inMessageOnly to setpublic boolean isInMessageOnly()
Copyright © 2005-2011 Daniel Naber