pemistahl / lingua-py

The most accurate natural language detection library for Python, suitable for short text and mixed-language text
Apache License 2.0
1.08k stars 44 forks source link

get_language_of takes too long #157

Closed Vasiliy566 closed 1 year ago

Vasiliy566 commented 1 year ago

I im profiling my code and find that get_language_of takes too long, maybe in lib it can be flag as example fast=True to ignore logic inside with detecting two languages and detect just one and return in? It would be helpful for users that needs fast analyse.

OR

I analyse huge texts, maybe someone have experiance with analyse just peace of text to speed up?

pemistahl commented 1 year ago

Hi, I'm working on creating Python bindings for my Rust port of Lingua. As soon as this is done, you probably won't have any performance problems anymore.