feat : zero shot router for other lang

This commit is contained in:
martin legrand
2025-03-24 20:22:30 +01:00
parent a289ddf1fd
commit af168d2c57
7 changed files with 62 additions and 16 deletions
+1 -1
View File
@@ -19,7 +19,7 @@ class LanguageUtility:
text: string to analyze
Returns: ISO639-1 language code
"""
langid.set_languages(['fr', 'en', 'zh', 'es']) # ISO 639-1 codes
langid.set_languages(['fr', 'en', 'zh', 'es'])
lang, score = langid.classify(text)
return lang