feat: Add language detection for all text

This commit is contained in:
Namu
2026-05-22 16:51:47 +02:00
parent a794e12636
commit 22381791c8
2 changed files with 49 additions and 14 deletions

10
main.py
View File

@@ -41,3 +41,13 @@ if __name__ == '__main__':
print('Résultat backward ---------------------------------------------------')
print(f'FR={proba_back_fr}, EN={proba_back_en}, IT={proba_back_it}, Conclusion={max(proba_back_fr, proba_back_en, proba_back_it)}')
words_text_1 = data_preparation.prepare_data('texte_1.txt')
words_text_2 = data_preparation.prepare_data('texte_2.txt')
words_text_3 = data_preparation.prepare_data('texte_3.txt')
text_1_result = utils.forward_detection_with_text(lambda_fr, lambda_en, lambda_it, words_text_1)
text_2_result = utils.forward_detection_with_text(lambda_fr, lambda_en, lambda_it, words_text_2)
text_3_result = utils.forward_detection_with_text(lambda_fr, lambda_en, lambda_it, words_text_3)
print(f'texte 1 {text_1_result}, texte 2 {text_2_result}, texte 3 {text_3_result}')