diff --git a/easynmt/EasyNMT.py b/easynmt/EasyNMT.py index 52a58df..5a7cee7 100755 --- a/easynmt/EasyNMT.py +++ b/easynmt/EasyNMT.py @@ -351,7 +351,7 @@ def language_detection(self, text: str) -> str: http_get('https://dl.fbaipublicfiles.com/fasttext/supervised-models/lid.176.ftz', model_path) self._fasttext_lang_id = fasttext.load_model(model_path) - return self._fasttext_lang_id.predict(text.replace("\r\n", " ").replace("\n", " ").strip())[0][0].split('__')[-1] + return self._fasttext_lang_id.predict(text.lower().replace("\r\n", " ").replace("\n", " ").strip())[0][0].split('__')[-1] def sentence_splitting(self, text: str, lang: str = None): if lang == 'th': diff --git a/easynmt/__init__.py b/easynmt/__init__.py index 796c08d..d8dd2c5 100755 --- a/easynmt/__init__.py +++ b/easynmt/__init__.py @@ -1,4 +1,4 @@ -__version__ = "1.0.0" +__version__ = "1.0.1" __DOWNLOAD_SERVER__ = 'http://easynmt.net/models' diff --git a/setup.py b/setup.py index e25a761..660e51a 100755 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ setup( name="EasyNMT", - version="1.0.0", + version="1.0.1", author="Nils Reimers", author_email="info@nils-reimers.de", description="Easy to use state-of-the-art Neural Machine Translation",