Module NewOCR
Class BasicSimilarityRule
- java.lang.Object
-
- com.uddernetworks.newocr.recognition.similarity.rules.BasicSimilarityRule
-
- All Implemented Interfaces:
SimilarRule
- Direct Known Subclasses:
DotSimilarityRule,HorizontalLineSimilarityRule,PercentDotSimilarityRule,VerticalLineSimilarityRule
public class BasicSimilarityRule extends java.lang.Object implements SimilarRule
- Since:
- April 25, 2019
-
-
Constructor Summary
Constructors Constructor Description BasicSimilarityRule(java.lang.String name, Letter... characters)BasicSimilarityRule(java.lang.String name, java.util.Set<Letter> characters)
-
Method Summary
Modifier and Type Method Description BasicSimilarityRuleaddLetter(Letter letter)java.lang.StringgetName()Gets the name of the rule.booleanmatchesLetter(ImageLetter first)Gets if the current rule matches with the givenImageLetterand is allowed to be processed.booleanmatchesLetter(Letter first)Gets if the current rule matches with the givenImageLetterand is allowed to be processed.voidremoveLetter(Letter letter)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.uddernetworks.newocr.recognition.similarity.SimilarRule
process
-
-
-
-
Method Detail
-
addLetter
public BasicSimilarityRule addLetter(Letter letter)
-
removeLetter
public void removeLetter(Letter letter)
-
getName
public java.lang.String getName()
Description copied from interface:SimilarRuleGets the name of the rule.- Specified by:
getNamein interfaceSimilarRule- Returns:
- The name of the rule
-
matchesLetter
public boolean matchesLetter(ImageLetter first)
Description copied from interface:SimilarRuleGets if the current rule matches with the givenImageLetterand is allowed to be processed.- Specified by:
matchesLetterin interfaceSimilarRule- Parameters:
first- The firstImageLetterof the data- Returns:
- If the given
ImageLettercan be processed by the current rule
-
matchesLetter
public boolean matchesLetter(Letter first)
Description copied from interface:SimilarRuleGets if the current rule matches with the givenImageLetterand is allowed to be processed.- Specified by:
matchesLetterin interfaceSimilarRule- Parameters:
first- The firstLetterof the data- Returns:
- If the given
Lettercan be processed by the current rule
-
-