From abadccdfb533ec41e2f60846429f6445dfea52d2 Mon Sep 17 00:00:00 2001 From: Adriane Boyd Date: Tue, 17 Jan 2023 17:59:45 +0100 Subject: [PATCH] Fix fuzzy examples --- website/docs/usage/v3-5.mdx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/website/docs/usage/v3-5.mdx b/website/docs/usage/v3-5.mdx index 923d07a25..9e7400e0e 100644 --- a/website/docs/usage/v3-5.mdx +++ b/website/docs/usage/v3-5.mdx @@ -72,17 +72,17 @@ distance of 2 and up to 30% of the pattern string length. `FUZZY1`..`FUZZY9` can be used to specify the exact number of allowed edits. ```python -# Match lowercase with fuzzy matching (allows up to 2 edits) +# Match lowercase with fuzzy matching (allows up to 3 edits) pattern = [{"LOWER": {"FUZZY": "definitely"}}] -# Match custom attribute values with fuzzy matching (allows up to 2 edits) +# Match custom attribute values with fuzzy matching (allows up to 3 edits) pattern = [{"_": {"country": {"FUZZY": "Kyrgyzstan"}}}] -# Match with exact Levenshtein edit distance limits (allows up to 3 edits) -pattern = [{"_": {"country": {"FUZZY3": "Kyrgyzstan"}}}] +# Match with exact Levenshtein edit distance limits (allows up to 4 edits) +pattern = [{"_": {"country": {"FUZZY4": "Kyrgyzstan"}}}] ``` -Note that `FUZZY` is using Levenshtein edit distance rather than +Note that `FUZZY` uses Levenshtein edit distance rather than Damerau-Levenshtein edit distance, so a transposition like `teh` for `the` counts as two edits, one insertion and one deletion.