Class DisambiguationPatternRule


  • public class DisambiguationPatternRule
    extends AbstractPatternRule
    A Rule that describes a pattern of words or part-of-speech tags used for disambiguation.
    Author:
    Marcin MiƂkowski
    • Method Detail

      • setNewInterpretations

        public final void setNewInterpretations​(AnalyzedToken[] newReadings)
        Used to add new interpretations.
        Parameters:
        newReadings - An array of AnalyzedTokens. The length of the array should be the same as the number of the tokens matched and selected by <marker>...</marker> elements.
      • setUntouchedExamples

        public void setUntouchedExamples​(List<String> untouchedExamples)
      • getUntouchedExamples

        public List<String> getUntouchedExamples()
      • getNewTokenReadings

        public AnalyzedToken[] getNewTokenReadings()
        Since:
        2.3
      • getMatchElement

        @Nullable
        public @Nullable Match getMatchElement()
        Since:
        2.3
      • getDisambiguatedPOS

        @Nullable
        public @Nullable String getDisambiguatedPOS()
        Since:
        2.3