Module NewOCR

Class OverDotMergeRule


  • public class OverDotMergeRule
    extends MergeRule
    Merges dots above base characters for the letter i, j, and ;
    Since:
    April 25, 2019
    • Method Summary

      Modifier and Type Method Description
      MergePriority getPriority()
      Gets the priority of the current rule
      boolean isHorizontal()
      Gets if the current merge rule is based on horizontally aligned letters (true) or vertically aligned letters (true).
      java.util.Optional<java.util.List<ImageLetter>> mergeCharacters​(ImageLetter target, java.util.List<ImageLetter> letterData)
      Preforms the merging action with the current rule against the given data.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • getPriority

        public MergePriority getPriority()
        Description copied from class: MergeRule
        Gets the priority of the current rule
        Specified by:
        getPriority in class MergeRule
        Returns:
        The priority of the rule
      • mergeCharacters

        public java.util.Optional<java.util.List<ImageLetter>> mergeCharacters​(ImageLetter target,
                                                                               java.util.List<ImageLetter> letterData)
        Description copied from class: MergeRule
        Preforms the merging action with the current rule against the given data. If MergeRule.isHorizontal() is true, the given data will be a full line of data. If it returns false, the data will be all characters with a horizontal overlap in a column.
        Specified by:
        mergeCharacters in class MergeRule
        Parameters:
        target - The base charcater
        letterData - The letter data
        Returns:
        The ImageLetter that should be removed if the merge was successful