-
Hi, I'm going through the demo notebook but using SQLite linker vs. DuckDB. According to documentation, SQLite backend supports distance_function_at_thresholds, exact_match, and levenshtein_at_thresholds. My attempt to use this setting:
fails with the error message: SQLite Linker - OperationalError: no such function: levenshtein. Attempt to use "distance_function_at_thresholds" comparison fails with: AttributeError: 'distance_function_at_thresholds' object has no attribute '_distance_level' at linker initialization. Please let me know if I'm doing something wrong. Thanks |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
Sorry - this isn't well documented, but sqlite doesn't include the levenstein function so you have to register it: from rapidfuzz.distance.Levenshtein import distance
conn = sqlite3.connect(":memory:")
conn.create_function("levenshtein", 2, distance) |
Beta Was this translation helpful? Give feedback.
-
Thanks, the custom level definition worked. |
Beta Was this translation helpful? Give feedback.
Sorry - this isn't well documented, but sqlite doesn't include the levenstein function so you have to register it: