Module NewOCR

Interface SimilarRule

    • Method Summary

      Modifier and Type Method Description
      java.lang.String getName()
      Gets the name of the rule.
      boolean matchesLetter​(ImageLetter first)
      Gets if the current rule matches with the given ImageLetter and is allowed to be processed.
      boolean matchesLetter​(Letter first)
      Gets if the current rule matches with the given ImageLetter and is allowed to be processed.
      default java.util.Optional<it.unimi.dsi.fastutil.objects.Object2DoubleMap.Entry<ImageLetter>> process​(java.util.List<it.unimi.dsi.fastutil.objects.Object2DoubleMap.Entry<ImageLetter>> data)
      When given a list of the potential results of a character (Irrelevant what character it is), this will find the character lowest in the list that does not match the first character's letter and modifier to the current rule.
    • Method Detail

      • matchesLetter

        boolean matchesLetter​(ImageLetter first)
        Gets if the current rule matches with the given ImageLetter and is allowed to be processed.
        Parameters:
        first - The first ImageLetter of the data
        Returns:
        If the given ImageLetter can be processed by the current rule
      • matchesLetter

        boolean matchesLetter​(Letter first)
        Gets if the current rule matches with the given ImageLetter and is allowed to be processed.
        Parameters:
        first - The first Letter of the data
        Returns:
        If the given Letter can be processed by the current rule
      • getName

        java.lang.String getName()
        Gets the name of the rule.
        Returns:
        The name of the rule
      • process

        default java.util.Optional<it.unimi.dsi.fastutil.objects.Object2DoubleMap.Entry<ImageLetter>> process​(java.util.List<it.unimi.dsi.fastutil.objects.Object2DoubleMap.Entry<ImageLetter>> data)
        When given a list of the potential results of a character (Irrelevant what character it is), this will find the character lowest in the list that does not match the first character's letter and modifier to the current rule.
        Parameters:
        data - The possible combination data
        Returns:
        If found, the second character