* {{Code|string:levenshtein("flower", "lewes")}} returns {{Code|0.5}}
* In the following query, the input is first normalized (words are stemmed, converted to lower case, and diacritics are removed). It returns {{Code|1}}:
<syntaxhighlight pre lang="'xquery"'>
let $norm := ft:normalize(?, map { 'stemming': true() })
return string:levenshtein($norm("HOUSES"), $norm("house"))
</syntaxhighlightpre>
|}