Class TrigramFunction

java.lang.Object
com.aquima.interactions.dtree.impl.TrigramFunction

public final class TrigramFunction extends Object
Implementation of trigram matching. For internal use only. This can later be replaced with a decent match engine implementation.
Since:
5.1
Author:
F. van der Meer.
  • Constructor Details

    • TrigramFunction

      protected TrigramFunction(String text, boolean caseInsensitive)
    • TrigramFunction

      public TrigramFunction(String text)

      Constructs the trigram function with the string that should be matched against.

      Note: This method is public to allow test-cases to access it, but the class is internal and should not be used outside the decision tree engine.

      Parameters:
      text - The string that should be matched against.
  • Method Details

    • match

      public double match(String other)

      This method will match the given string to the string this match function contains.

      Note: This method is public to allow test-cases to access it, but the class is internal and should not be used outside the decision tree engine.

      Parameters:
      other - The string that should be matched.
      Returns:
      Double containing the result of the match, a percentage between zero and 100.