Class JaroWinklerSimilarityBuiltin

java.lang.Object
com.semedy.reasoner.builtin.filter.JaroWinklerSimilarityBuiltin
All Implemented Interfaces:
Builtin, FilterBuiltin

public class JaroWinklerSimilarityBuiltin extends Object implements FilterBuiltin
  • Constructor Details

    • JaroWinklerSimilarityBuiltin

      public JaroWinklerSimilarityBuiltin()
  • Method Details

    • clear

      public void clear()
      Description copied from interface: Builtin
      frees up allocated resources
      Specified by:
      clear in interface Builtin
    • cloneBuiltin

      public Builtin cloneBuiltin()
      Description copied from interface: Builtin
      clone the builtin
      Specified by:
      cloneBuiltin in interface Builtin
      Returns:
      the cloned built-in
    • evaluationFinished

      public void evaluationFinished()
      Description copied from interface: Builtin
      call back function. Is called when the whole evaluation has been finished
      Specified by:
      evaluationFinished in interface Builtin
    • getArgumentDescriptions

      public String[] getArgumentDescriptions()
      Description copied from interface: Builtin
      get descriptions for the different arguments
      Specified by:
      getArgumentDescriptions in interface Builtin
      Returns:
      a description of the arguments of the built-in
    • getArity

      public int getArity()
      Description copied from interface: Builtin
      get the arity of the builtin
      Specified by:
      getArity in interface Builtin
      Returns:
      the arity of the built-in
    • getDescription

      public String getDescription()
      Description copied from interface: Builtin
      get a description for the builtin
      Specified by:
      getDescription in interface Builtin
      Returns:
      a description of the built-in
    • getName

      public String getName()
      Description copied from interface: Builtin
      get the name of the builtin
      Specified by:
      getName in interface Builtin
      Returns:
      the name of the built-in
    • getType

      public BuiltinType getType()
      Description copied from interface: Builtin
      get the type of the builtin
      Specified by:
      getType in interface Builtin
      Returns:
      the type of the built-in
    • getWeight

      public long getWeight(BitSet arg0, BitSet arg1, Object[] arg2)
      Description copied from interface: Builtin
      the weight of the builtin. Determines when the builtin is executed in a rule
      Specified by:
      getWeight in interface Builtin
      Parameters:
      arg0 - , ground arguments
      arg1 - , instantiated variables
      arg2 - , arguments of the builtin
      Returns:
      the weight of the builtin (influences the position in the rule)
    • init

      public void init(Object[] arg0)
      Description copied from interface: Builtin
      initialize the builtin
      Specified by:
      init in interface Builtin
      Parameters:
      arg0 - , the builtin arguments
    • isEvaluable

      public boolean isEvaluable(BitSet arg0, BitSet arg1, Object[] arg2)
      Description copied from interface: Builtin
      is builtin evaluable with a certain instantiation of variables
      Specified by:
      isEvaluable in interface Builtin
      Parameters:
      arg0 - , which arguments are ground
      arg1 - , which variables are instantiated
      arg2 - , the arguments
      Returns:
      was it evaluable
    • isInternal

      public boolean isInternal()
      Description copied from interface: Builtin
      is it a builtin for internal use only
      Specified by:
      isInternal in interface Builtin
      Returns:
    • objectGeneratingArguments

      public BitSet objectGeneratingArguments(BitSet arg0, BitSet arg1, Object[] arg2)
      Description copied from interface: Builtin
      In which argument position are new objects created
      Specified by:
      objectGeneratingArguments in interface Builtin
      Parameters:
      arg0 - , ground argument positions
      arg1 - , instantiated variables
      arg2 - , arguments of the literal
      Returns:
      each bit indicates the argument position where new objects are created
    • readsSymbolTable

      public boolean readsSymbolTable()
      Description copied from interface: Builtin
      does the builtin read the symbol table
      Specified by:
      readsSymbolTable in interface Builtin
      Returns:
      true if it reads the symbol table
    • setProperties

      public void setProperties(Properties arg0)
      Description copied from interface: Builtin
      set the sytem properties
      Specified by:
      setProperties in interface Builtin
      Parameters:
      arg0 - , properties
    • setSymbolTable

      public void setSymbolTable(SymbolTable arg0)
      Description copied from interface: Builtin
      set the symbol table
      Specified by:
      setSymbolTable in interface Builtin
      Parameters:
      arg0 - , the symbol table
    • writesSymbolTable

      public boolean writesSymbolTable()
      Description copied from interface: Builtin
      does the builtin write into the symbol table
      Specified by:
      writesSymbolTable in interface Builtin
      Returns:
      true if it writes to the symbol table
    • isTrue

      public boolean isTrue(long[] input) throws InterruptedException, IOException, SemReasonerException
      Description copied from interface: FilterBuiltin
      is built-in true for given arguments
      Specified by:
      isTrue in interface FilterBuiltin
      Parameters:
      input - , the arguments
      Returns:
      Throws:
      InterruptedException
      IOException
      ReasoningException
      SemReasonerException