Class LiteralPhraseProduction


  • public class LiteralPhraseProduction
    extends TermProduction
    A literal phrase produced by a production rule
    Author:
    bratseth
    • Constructor Detail

      • LiteralPhraseProduction

        public LiteralPhraseProduction()
        Creates a new produced literal phrase
      • LiteralPhraseProduction

        public LiteralPhraseProduction​(java.lang.String label)
        Creates a new produced literal phrase
        Parameters:
        label - the label of the produced term
    • Method Detail

      • addTerm

        public void addTerm​(java.lang.String term)
        Adds a term to this phrase
      • getTerms

        public java.util.List<java.lang.String> getTerms()
        Returns a read only view of the terms produced by this, never null
      • produce

        public void produce​(RuleEvaluation e,
                            int offset)
        Description copied from class: Production
        Produces this at the current match
        Specified by:
        produce in class Production
        Parameters:
        e - the evaluation context containing the current match and the query
        offset - the offset position at which to produce this. Offsets are used to produce multiple items at one position, inserted in the right order.