Package org.languagetool.rules
Class ConfusionSet
- java.lang.Object
-
- org.languagetool.rules.ConfusionSet
-
public class ConfusionSet extends java.lang.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
-
-
Field Summary
Fields Modifier and Type Field Description private long
factor
private java.util.Set<ConfusionString>
set
-
Constructor Summary
Constructors Constructor Description ConfusionSet(long factor, java.lang.String... words)
ConfusionSet(long factor, java.util.List<ConfusionString> confusionStrings)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object o)
long
getFactor()
java.util.Set<ConfusionString>
getSet()
java.util.Set<ConfusionString>
getUppercaseFirstCharSet()
int
hashCode()
java.lang.String
toString()
-
-
-
Field Detail
-
set
private final java.util.Set<ConfusionString> set
-
factor
private final long factor
-
-
Constructor Detail
-
ConfusionSet
public ConfusionSet(long factor, java.util.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, java.lang.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 java.util.Set<ConfusionString> getSet()
-
getUppercaseFirstCharSet
public java.util.Set<ConfusionString> getUppercaseFirstCharSet()
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
-