Module NewOCR

Class BasicSimilarityRule

    • Constructor Detail

      • BasicSimilarityRule

        public BasicSimilarityRule​(java.lang.String name,
                                   java.util.Set<Letter> characters)
      • BasicSimilarityRule

        public BasicSimilarityRule​(java.lang.String name,
                                   Letter... characters)
    • Method Detail

      • removeLetter

        public void removeLetter​(Letter letter)
      • getName

        public java.lang.String getName()
        Description copied from interface: SimilarRule
        Gets the name of the rule.
        Specified by:
        getName in interface SimilarRule
        Returns:
        The name of the rule
      • matchesLetter

        public boolean matchesLetter​(Letter first)
        Description copied from interface: SimilarRule
        Gets if the current rule matches with the given ImageLetter and is allowed to be processed.
        Specified by:
        matchesLetter in interface SimilarRule
        Parameters:
        first - The first Letter of the data
        Returns:
        If the given Letter can be processed by the current rule