jamesturk / jellyfish

🪼 a python library for doing approximate and phonetic matching of strings.
https://jamesturk.github.io/jellyfish/
MIT License
2.07k stars 159 forks source link

Error in jellyfish due to some special characters #200

Closed joumaico closed 1 year ago

joumaico commented 1 year ago

The error is caused by a special single quotation mark () in the code. The error message is as follows:

pyo3_runtime.PanicException: called `Option::unwrap()` on a `None` value

To reproduce the issue, you can run the following code:

import jellyfish

str1 = "i’m going home"
str2 = "i go home"

print(jellyfish.match_rating_comparison(str1, str2))

Resolution:

Ensure that the library correctly handles character encoding and escaping to support a wide range of characters and special symbols, including but not limited to the special single quotation mark (). The library should process these characters without causing exceptions.

jamesturk commented 1 year ago

Thanks for this report, adding a test and taking a look now.