feat: Add language detection for all text
This commit is contained in:
10
main.py
10
main.py
@@ -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}')
|
||||
|
||||
Reference in New Issue
Block a user