- java.lang.Object
-
- com.uddernetworks.newocr.recognition.mergence.MergeRule
-
- com.uddernetworks.newocr.recognition.mergence.rules.OverDotMergeRule
-
public class OverDotMergeRule extends MergeRule
Merges dots above base characters for the letter i, j, and ;- Since:
- April 25, 2019
-
-
Field Summary
-
Fields inherited from class com.uddernetworks.newocr.recognition.mergence.MergeRule
databaseManager, similarityManager
-
-
Constructor Summary
Constructors Constructor Description OverDotMergeRule(DatabaseManager databaseManager, SimilarityManager similarityManager)
-
Method Summary
Modifier and Type Method Description MergePriority
getPriority()
Gets the priority of the current ruleboolean
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.
-
-
-
Constructor Detail
-
OverDotMergeRule
public OverDotMergeRule(DatabaseManager databaseManager, SimilarityManager similarityManager)
-
-
Method Detail
-
isHorizontal
public boolean isHorizontal()
Description copied from class:MergeRule
Gets if the current merge rule is based on horizontally aligned letters (true) or vertically aligned letters (true).- Specified by:
isHorizontal
in classMergeRule
- Returns:
- If the data given to
MergeRule.mergeCharacters(ImageLetter, List)
is horizontal (Full line) data
-
getPriority
public MergePriority getPriority()
Description copied from class:MergeRule
Gets the priority of the current rule- Specified by:
getPriority
in classMergeRule
- 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. IfMergeRule.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 classMergeRule
- Parameters:
target
- The base charcaterletterData
- The letter data- Returns:
- The
ImageLetter
that should be removed if the merge was successful
-
-