fasttext-langdetect
fasttext-langdetect copied to clipboard
Change default path of language identifier binary
Hi, I think having os.path.dirname(__file__)
as the default directory for storing the binary would be a better default than "/tmp/fasttext-langdetect"
, since some systems might not have a working tmp directory. In any case, thanks for your library, it has been useful to me.
Instead of replacing the default value, you can define FTLANG_CACHE
environment variable dynamically before importing fasttext-langdetect like this:
import os
os.environ["FTLANG_CACHE"] = os.path.dirname(__file__)