Package org.languagetool.rules
Class ConfusionSet
- java.lang.Object
-
- org.languagetool.rules.ConfusionSet
-
public class ConfusionSet extends Object
Words that can easily be confused - for internal use only. Even though there can be more words in the set, usually there are two, as the factor is specific for this pair of words.- Since:
- 3.0
-
-
Constructor Summary
Constructors Constructor Description ConfusionSet(long factor, String... words)
ConfusionSet(long factor, List<ConfusionString> confusionStrings)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
long
getFactor()
Set<ConfusionString>
getSet()
Set<ConfusionString>
getUppercaseFirstCharSet()
int
hashCode()
String
toString()
-
-
-
Constructor Detail
-
ConfusionSet
public ConfusionSet(long factor, List<ConfusionString> confusionStrings)
- Parameters:
factor
- the factor that one string must be more probable than the other to be considered a correction, must be >= 1
-
ConfusionSet
public ConfusionSet(long factor, String... words)
- Parameters:
factor
- the factor that one string must be more probable than the other to be considered a correction, must be >= 1
-
-
Method Detail
-
getFactor
public long getFactor()
-
getSet
public Set<ConfusionString> getSet()
-
getUppercaseFirstCharSet
public Set<ConfusionString> getUppercaseFirstCharSet()
-
-