Not instanciating the TrueCaser() in init.py at import decreases the import time of the library from 2s to 1s on my setup (the remaining second coming mostly from importing NLTK).
Now the TrueCaser is instanciated lazily at the first call to get_true_case.
I checked that the get_true_case method still works correctly after the change.
Not instanciating the TrueCaser() in init.py at import decreases the import time of the library from 2s to 1s on my setup (the remaining second coming mostly from importing NLTK).
Now the TrueCaser is instanciated lazily at the first call to
get_true_case
. I checked that theget_true_case
method still works correctly after the change.