Package com.yahoo.prelude.semantics.rule
Class TermProduction
java.lang.Object
com.yahoo.prelude.semantics.rule.Production
com.yahoo.prelude.semantics.rule.TermProduction
- Direct Known Subclasses:
LiteralPhraseProduction,LiteralTermProduction,ReferenceTermProduction
A new term produced by a production rule
- Author:
- bratseth
-
Field Summary
Fields inherited from class com.yahoo.prelude.semantics.rule.Production
replacing -
Constructor Summary
ConstructorsConstructorDescriptionCreates a produced template term with no label and the default typeTermProduction(TermType termType) Creates a produced template term with no labelTermProduction(String label) Creates a produced template term with the default term typeTermProduction(String label, TermType termType) -
Method Summary
Modifier and TypeMethodDescriptiongetLabel()Sets the label of this.protected StringReturns the type of term to produce, never null.protected voidinsertMatch(RuleEvaluation e, Match matched, List<Item> newItems, int offset) Inserts newItems at the position of this match TODO: Move to ruleevaluationvoidReturns the label of this, or null if none (the default)voidsetTermType(TermType termType) Sets the term type to producefinal StringAll instances of this produces a parseable string outputprotected abstract StringMethods inherited from class com.yahoo.prelude.semantics.rule.Production
getPosition, getWeight, produce, setPosition, setReplacing, setWeight, toString
-
Constructor Details
-
TermProduction
public TermProduction()Creates a produced template term with no label and the default type -
TermProduction
Creates a produced template term with the default term type -
TermProduction
Creates a produced template term with no label -
TermProduction
-
-
Method Details
-
getLabel
Sets the label of this. Set to null to use the default -
setLabel
Returns the label of this, or null if none (the default) -
getTermType
Returns the type of term to produce, never null. Default is DEFAULT -
setTermType
Sets the term type to produce -
insertMatch
Inserts newItems at the position of this match TODO: Move to ruleevaluation -
getLabelString
-
toInnerString
All instances of this produces a parseable string output- Specified by:
toInnerStringin classProduction
-
toInnerTermString
-