Package com.yahoo.prelude.semantics.rule
Class LiteralPhraseProduction
java.lang.Object
com.yahoo.prelude.semantics.rule.Production
com.yahoo.prelude.semantics.rule.TermProduction
com.yahoo.prelude.semantics.rule.LiteralPhraseProduction
A literal phrase produced by a production rule
- Author:
- bratseth
-
Field Summary
Fields inherited from class com.yahoo.prelude.semantics.rule.Production
replacing
-
Constructor Summary
ConstructorDescriptionCreates a new produced literal phraseLiteralPhraseProduction
(String label) Creates a new produced literal phrase -
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds a term to this phrasegetTerms()
Returns a read only view of the terms produced by this, never nullvoid
produce
(RuleEvaluation e, int offset) Produces this at the current matchMethods inherited from class com.yahoo.prelude.semantics.rule.TermProduction
getLabel, getLabelString, getTermType, insertMatch, setLabel, setTermType, toInnerString
Methods inherited from class com.yahoo.prelude.semantics.rule.Production
getPosition, getWeight, setPosition, setReplacing, setWeight, toString
-
Constructor Details
-
LiteralPhraseProduction
public LiteralPhraseProduction()Creates a new produced literal phrase -
LiteralPhraseProduction
Creates a new produced literal phrase- Parameters:
label
- the label of the produced term
-
-
Method Details
-
addTerm
Adds a term to this phrase -
getTerms
Returns a read only view of the terms produced by this, never null -
produce
Description copied from class:Production
Produces this at the current match- Specified by:
produce
in classProduction
- Parameters:
e
- the evaluation context containing the current match and the queryoffset
- the offset position at which to produce this. Offsets are used to produce multiple items at one position, inserted in the right order.
-
toInnerTermString
- Specified by:
toInnerTermString
in classTermProduction
-