Snippets tagged text processing

  • What word is most like the word "turtle"?

    A while ago I posted a snippet to calculate the 'Discrete Fréchet Distance' between two curves. If we treat a word as a 'curve' by giving each letter an index (with similar-sounding letters having closer indices) we can compare words by the Fréchet distance between them! An alternative to edit-distance...

    3 people like this

    Posted: 12 years ago by Kit Eason

  • Log file parsing

    File parsing, based on multiple lines, using recursive pattern matching with many :: (cons) operator

    2 people like this

    Posted: 10 years ago by Tuomas Hietanen

  • Levenshtein distance

    Computes Levenshtein (min edit) distance between two strings

    9 people like this

    Posted: 12 years ago by Lakret

  • Content spinner

    Given a string containing spinning expressions in the form "{string1|string2|...|stringN}", returns a string content randomly spinned. Spinning expressions can be nested. For instance, the spinned results of string "a{b|{c1|c2}}" will be one of the following : "ab" "ac1" "ac2"

    5 people like this

    Posted: 7 years ago by Didier Colin