public class IlrBRLDefaultPredictionConfiguration extends java.lang.Object implements IlrBRLMutablePredictionConfiguration
IlrBRLDefaultPredictionConfiguration is the default
implementation of the IlrBRLPredictionConfigurationDef and
IlrBRLMutablePredictionConfiguration interfaces.
Use this class to control the BRL prediction engine when you use a BRL
parser.| Constructor and Description |
|---|
IlrBRLDefaultPredictionConfiguration(int offset)
Builds a new default prediction configuration to make predictions at the
given offset.
|
| Modifier and Type | Method and Description |
|---|---|
IlrBRLSemanticFilter |
getGlobalSemanticFilter()
Returns a global semantic filter that can be used to filter out
predictions generated by the prediction engine.
|
int |
getPredictionOffset()
Returns where the prediction engine will predict in the parser input.
|
java.util.Set |
getPredictions()
Returns the prediction set calculated after the BRL parser was invoked
with this prediction configuration.
|
boolean |
isAcceptingPlaceHolders()
Checks if the prediction engine is generating predictions for placeholders.
|
boolean |
isFullMode()
Tests if the prediction engine is generating all available predictions.
|
boolean |
isTemplateMode()
Checks if the prediction engine is generating predictions in template
mode.
|
void |
setAcceptingPlaceHolders(boolean acceptPlaceHolders)
Changes the place-holder prediction setting in the prediction engine.
|
void |
setFullMode(boolean mode)
Switches the prediction engine to full mode.
|
void |
setGlobalSemanticFilter(IlrBRLSemanticFilter globalSemanticFilter)
Sets the global semantic filter used to filter predictions generated by
the prediction engine.
|
void |
setPredictionOffset(int offset)
Sets the prediction offset.
|
void |
setTemplateMode(boolean mode)
Switches the prediction engine to template mode.
|
void |
setValuesAndConstantsOnly(boolean valuesConstantsOnly)
Changes the value and constant prediction settings.
|
boolean |
valuesAndConstantsOnly()
Checks if the prediction engine is generating value and constant
predictions only.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitsetExpectedConceptsgetExpectedConceptspublic IlrBRLDefaultPredictionConfiguration(int offset)
offset - public int getPredictionOffset()
IlrBRLPredictionConfigurationDef0, a
prediction set must be supplied.getPredictionOffset in interface IlrBRLPredictionConfigurationDef-1 is returned.IlrBRLPredictionConfigurationDef.getPredictions()public java.util.Set getPredictions()
getPredictions in interface IlrBRLPredictionConfigurationDefIlrParserPrediction
objects.IlrBRLPredictionConfigurationDef.getPredictionOffset()public void setPredictionOffset(int offset)
IlrBRLMutablePredictionConfigurationsetPredictionOffset in interface IlrBRLMutablePredictionConfigurationoffset - The new prediction offset.public IlrBRLSemanticFilter getGlobalSemanticFilter()
IlrBRLPredictionConfigurationDefgetGlobalSemanticFilter in interface IlrBRLPredictionConfigurationDefnull is returned the default
filter declared in the language is used.public void setGlobalSemanticFilter(IlrBRLSemanticFilter globalSemanticFilter)
IlrBRLMutablePredictionConfigurationsetGlobalSemanticFilter in interface IlrBRLMutablePredictionConfigurationglobalSemanticFilter - The new semantic filter.public boolean isFullMode()
IlrBRLPredictionConfigurationDefisFullMode in interface IlrBRLPredictionConfigurationDeftrue is returned.
If relevant predictions only are generated, false is
returned.public boolean isTemplateMode()
IlrBRLPredictionConfigurationDefisTemplateMode in interface IlrBRLPredictionConfigurationDeftrue
is returned.public boolean valuesAndConstantsOnly()
IlrBRLPredictionConfigurationDefvaluesAndConstantsOnly in interface IlrBRLPredictionConfigurationDeftrue
is returned.public boolean isAcceptingPlaceHolders()
IlrBRLPredictionConfigurationDefisAcceptingPlaceHolders in interface IlrBRLPredictionConfigurationDeftrue
is returned.public void setFullMode(boolean mode)
IlrBRLMutablePredictionConfigurationsetFullMode in interface IlrBRLMutablePredictionConfigurationmode - Set to true to change to full mode.public void setTemplateMode(boolean mode)
IlrBRLMutablePredictionConfigurationsetTemplateMode in interface IlrBRLMutablePredictionConfigurationmode - Set to true to change to template mode.public void setValuesAndConstantsOnly(boolean valuesConstantsOnly)
IlrBRLMutablePredictionConfigurationsetValuesAndConstantsOnly in interface IlrBRLMutablePredictionConfigurationvaluesConstantsOnly - Set to true for the prediction
engine to generate value and constant predictions only.public void setAcceptingPlaceHolders(boolean acceptPlaceHolders)
IlrBRLMutablePredictionConfigurationsetAcceptingPlaceHolders in interface IlrBRLMutablePredictionConfigurationacceptPlaceHolders - Set to true so the prediction
engine generates predictions for place holders.© Copyright IBM Corp. 1987, 2017