Closed PalmerAL closed 7 months ago
Hi @PalmerAL,
Hi, thanks for writing this library, it's really useful!
Nice of you to say that, thank you. :) That motivates me to maintain and improve the library further on.
The cause of your exception is that, whenever detect_multiple_languages_of()
returns exactly one DetectionResult
, the end index is erroneously calculated as the character offset for Rust. This should be the byte offset instead which then gets converted to character offset for the Python bindings. I'm going to release version 2.0.2 shortly which will fix it.
Fixed in https://github.com/pemistahl/lingua-rs/commit/72f2d89da9be38a6c0ed0773b01c35df55c75aee. Will be released as soon as all issues in milestone 2.0.2 have been resolved.
Thanks!
Hi, thanks for writing this library, it's really useful!
I'm seeing a crash with particular emoji input on the latest version installed from PyPI, here's a testcase: