Module NewOCR

Interface SimilarityManager

    • Method Detail

      • getRule

        java.util.Optional<SimilarRule> getRule​(java.lang.String similarityRuleName)
        Gets the instance of SimilarRule with the given name.
        similarityRuleName - The name of the SimilarRule to get, if present
        A SimilarRule with the given name
      • getSafeRule

        void getSafeRule​(java.lang.String similarityRuleName,
                         java.util.function.Consumer<SimilarRule> ruleConsumer)
        Gets a rule from the given name, and if found, sends it through the consumer. A message is sent saying the SimilarRule is not found if one isn't found.
        similarityRuleName - The name of the SimilarRule to get
        ruleConsumer - The consumer to be given the SimilarRule if found
      • getSecondHighest

        java.util.Optional<it.unimi.dsi.fastutil.objects.Object2DoubleMap.Entry<ImageLetter>> getSecondHighest​(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 any of the added SimilarRules.
        data - The possible combination data
        If found, the second character