Skip to content

Documentation

Syst3ms edited this page Jan 5, 2018 · 7 revisions

Definitions :

  • Levenshtein distance : A number representing the number of edits needed to go from one string to another. The smaller this number is, the closest are the two strings. An edit consists of one of the following actions :
    • Adding a letter
    • Replacing a letter
    • Removing a letter

Syntaxes :

  • Effects :
    • Register Constant :
register [new] constant [[with] symbol] %string% [(and|with)] value %number%

Registers a constant (duh), which can be used in the evaluate expression (described in Evaluating Expressions). A constant name must consist of one letter optionally followed by one or more letters or digits. If that's any clearer to you, the regex skript-math uses is [A-Za-z][A-Za-z\\d]*.

  • Expressions :
    • Levenshtein distance : (levenshtein|string) distance between %string% and %string% [(ignor(e|ing) case)].

      Calculates the levenshtein distance between two strings. If the ignore case part is included, then the algorithm will, well... ignore case. I think you get the terminology here !

Clone this wiki locally