Class 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 Detail

      • 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()
      • getUppercaseFirstCharSet

        public java.util.Set<ConfusionString> getUppercaseFirstCharSet()
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object