mirror of
https://github.com/ail-project/ail-framework.git
synced 2024-11-26 15:57:16 +00:00
fix: [Language] Updated the language detector to return a empty list when no language is detected
This commit is contained in:
parent
35502d955f
commit
1d1671c00f
1 changed files with 2 additions and 2 deletions
|
@ -493,10 +493,10 @@ class LanguagesDetector:
|
||||||
|
|
||||||
def detect(self, content, force_gcld3=False): # TODO detect length between 20-200 ????
|
def detect(self, content, force_gcld3=False): # TODO detect length between 20-200 ????
|
||||||
if not content:
|
if not content:
|
||||||
return None
|
return []
|
||||||
content = _clean_text_to_translate(content, html=True)
|
content = _clean_text_to_translate(content, html=True)
|
||||||
if not content:
|
if not content:
|
||||||
return None
|
return []
|
||||||
# DEBUG
|
# DEBUG
|
||||||
# print('-------------------------------------------------------')
|
# print('-------------------------------------------------------')
|
||||||
# print(content)
|
# print(content)
|
||||||
|
|
Loading…
Reference in a new issue