public interface IlrVerbalizer
extends java.lang.Cloneable
IlrVerbalizable element or an IlrSentence.
It is also responsible for producing some default phrase templates.
A verbalizer is attached to a locale.
This interface should not be implemented directly. Implementation of verbalizer should subclass IlrDefaultVerbalizer.| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
clone()
Clones this
IlrVerbalizer instance. |
java.lang.String |
generateTemplate(IlrSentence sentence,
java.util.List synRoles)
Produces the default template for
sentence, according to its category. |
IlrArticleBuilder |
getArticleBuilder()
Returns the article builder of this verbalizer.
|
IlrGender |
getDefaultGender()
Returns the default gender for the language of the verbalizer.
|
IlrLabelBuilder |
getLabelBuilder()
Gets the label builder.
|
IlrPluralBuilder |
getPluralBuilder()
Returns the plural builder of this verbalizer.
|
IlrGender[] |
getSupportedGenders()
Returns the list of genders used for the current locale.
|
IlrTermBuilder |
getTermBuilder()
Gets the term builder
|
void |
setLabelBuilder(IlrLabelBuilder labelBuilder)
Sets the label builder.
|
java.lang.String |
verbalize(IlrSentence sentence,
IlrVerbalizationContext context)
Verbalizes a
sentence, using the specified context. |
java.lang.String |
verbalize(IlrVerbalizable verbalizable,
IlrVerbalizationContext context)
Verbalizes a
verbalizable element, using the specified context. |
java.lang.String verbalize(IlrVerbalizable verbalizable, IlrVerbalizationContext context) throws IlrVerbalizationException
verbalizable element, using the specified context.
Note: make sure that the verbalization context is not modified.IlrVerbalizationExceptionverbalizable - The verbalizable element to verbalize.context - The verbalization context.verbalizable element, as specified in the context.java.lang.String verbalize(IlrSentence sentence, IlrVerbalizationContext context) throws IlrVerbalizationException
sentence, using the specified context.
Note: make sure that the verbalization context is not modified.IlrVerbalizationExceptionsentence - The sentence to verbalize.context - The verbalization context.sentence as specified in context.IlrArticleBuilder getArticleBuilder()
IlrPluralBuilder getPluralBuilder()
void setLabelBuilder(IlrLabelBuilder labelBuilder)
labelBuilder - The new label builder.IlrLabelBuilder getLabelBuilder()
IlrTermBuilder getTermBuilder()
IlrGender getDefaultGender()
IlrGender[] getSupportedGenders()
IlrGender constants or null
if gender is not used for this locale.java.lang.Object clone()
IlrVerbalizer instance.java.lang.String generateTemplate(IlrSentence sentence, java.util.List synRoles)
sentence, according to its category.sentence - The sentence for which the template is produced.synRoles - The list of the syntactic roles of sentence
that should appear in the template as placeholders.© Copyright IBM Corp. 1987, 2017