1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-07-03 18:53:28 +00:00
TiddlyWiki5/editions/tw5.com/tiddlers/filters/examples/levenshtein Operator (Examples).tid
Jeremy Ruston 11ffc83493
Introduce new levenshtein, makepatches, applypatches operators (#7290)
* Initial Commit

* Fix crash with invalid patches

See https://github.com/Jermolene/TiddlyWiki5/pull/7290#issuecomment-1453155311

Thanks @yaisog

* Add words and lines options to makepatches (#7326)

* Prevent infinite loop for single-word texts (#7327)

* Add docs and examples for the new operators (#7328)

* Create makepatches Operator.tid

* Improve wording

* Doc and examples for the new operators

---------

Co-authored-by: yaisog <m@rcuswinter.de>
2023-03-04 21:16:26 +00:00

21 lines
632 B
Plaintext

created: 20230304183158728
modified: 20230304183159654
tags: [[levenshtein Operator]] [[Operator Examples]]
title: levenshtein Operator (Examples)
type: text/vnd.tiddlywiki
Determine the Levenshtein distance between two words:
<<.operator-example 1 "[[motel]levenshtein[money]]">>
List the 10 tiddler titles with the smallest Levenstein distance to "~TiddlyWiki":
<$macrocall $name='wikitext-example-without-html'
src="""<ul>
<$list filter="[all[tiddlers]!is[system]] :sort:number[levenshtein[TiddlyWiki]] :and[first[10]]">
<li>
<$link /> (<$text text={{{ [all[current]levenshtein[TiddlyWiki]] }}} />)
</li>
</$list>
</ul>
"""/>