You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The module-level function 'classify' is just a convenience wrapper of a LanguageIdentifier instance, which checks if a global instance exists. If not, it unpacks one - this is why it takes time for the first run. If you want to invoke the unpacking manually, call langid.load_model() first. This will cause the model to be loaded into memory (which can then be accessed as langid.identifier). No other caching occurs.
Running
import langid
langid.classify("India is a country") ## statement number 1
takes a lot of time to run "statement number 1".
but,
import langid
langid.classify("I like cricket")
langid.classify("India is a country") ## statement number 2
does not take a lot of time to run "statement number 2".
So, Does langid.classify caches some information? Can we manage that? Thanks
The text was updated successfully, but these errors were encountered: