Skip to content

Commit 62bddd8

Browse files
committed
fixed the files in document translation and shows the bleu for every translation
1 parent e519bc4 commit 62bddd8

10 files changed

+12419
-12518
lines changed

DutchtoEnglish.py

-51
This file was deleted.

EnglishOutput(30%).txt

+6,278-6,071
Large diffs are not rendered by default.

EnglishtoDutch.py

-51
This file was deleted.

EnglishtoTagalog.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,14 @@ def translate():
4040
for word in current_line:
4141
english_sentences.append(word)
4242

43-
output_file = open("EnglishOutput(30%).txt", "w+", encoding="utf-8")
43+
output_file = open("TagalogOutput(30%).txt", "w+", encoding="utf-8")
4444
for index in range(len(english_sentences)):
4545
current_sentence = english_sentences[index]
4646
translated_sentence = ModelTester.test_data(current_sentence, 2)
4747
output_file.write(translated_sentence)
4848
output_file.write("\n")
4949

50-
print("\nSuccessfully translated! Translated document is 'EnglishOutput(30%).txt' ")
50+
print("\nSuccessfully translated! Translated document is 'TagalogOutput(30%).txt' ")
5151

5252
# Get BLEU Score
53-
bleu.solve_for_bleu("EnglishOutput(30%).txt", "TagalogTest(30%).txt")
53+
bleu.solve_for_bleu("TagalogOutput(30%).txt", "EnglishTest(30%).txt")

Main.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,9 @@
2020

2121
elif mode == 2:
2222
try:
23-
translate_option = int(input('Select translation option: \n\t1: '
24-
'tagalog to English \n\t2: English to tagalog\n'))
23+
translate_option = int(input('Select translation option: \n\t'
24+
'1: tagalog to English \n\t'
25+
'2: English to tagalog\n'))
2526
except ValueError:
2627
print("Not a number")
2728
if translate_option > 2 or translate_option < 1:

changes.txt Notes/changes.txt

+41-41
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,41 @@
1-
Changes:
2-
3-
File: (DutchtoEnglish.py)
4-
5-
DutchtoEnglish.py ->TagalogtoEnglish.py
6-
7-
final_list -> f_list
8-
index -> index_list
9-
output_sentence -> otp_sentence
10-
final_output -> f_output
11-
current_sen -> current_sentence
12-
curr_translated_sen -> translated_sentence
13-
out_file -> otp_file
14-
15-
File: (EnglishtoTagalog.py)
16-
17-
EnglishtoDutch.py ->EnglishtoTagalog.py
18-
final_list -> f_list
19-
index -> index_list
20-
l -> curr_line
21-
current_sen -> current_sentence
22-
curr_translated_sen -> translated_sentence
23-
out_file -> otp_file
24-
25-
File: (utlis.py)
26-
27-
nCr -> n_factorial_r
28-
f -> factorial
29-
30-
31-
32-
33-
34-
35-
36-
37-
38-
39-
40-
41-
1+
Changes:
2+
3+
File: (DutchtoEnglish.py)
4+
5+
DutchtoEnglish.py ->TagalogtoEnglish.py
6+
7+
final_list -> f_list
8+
index -> index_list
9+
output_sentence -> otp_sentence
10+
final_output -> f_output
11+
current_sen -> current_sentence
12+
curr_translated_sen -> translated_sentence
13+
out_file -> otp_file
14+
15+
File: (EnglishtoTagalog.py)
16+
17+
EnglishtoDutch.py ->EnglishtoTagalog.py
18+
final_list -> f_list
19+
index -> index_list
20+
l -> curr_line
21+
current_sen -> current_sentence
22+
curr_translated_sen -> translated_sentence
23+
out_file -> otp_file
24+
25+
File: (utlis.py)
26+
27+
nCr -> n_factorial_r
28+
f -> factorial
29+
30+
31+
32+
33+
34+
35+
36+
37+
38+
39+
40+
41+

tasks.txt Notes/tasks.txt

+14-14
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
Program:
2-
• Test other data sets for training model
3-
• Create an algorithm that will get the BLEU score (Cedric, Miguel, Hakob)
4-
• Change the variable, method, and file names of the programs (Note* yung main, model_trainer, ibm1_em, at utils ay napalitan ko na yung iba so yung mga di pa na lang ang gawin siguro) (Cedric)
5-
update (nabago na ni cedric yung tagalogtoenglish at englishtotagalog) ✔
6-
• Disseminate the train, test, and validation of data
7-
• Document the results
8-
• Try to improve the accuracy
9-
• Edit the input and output text. Make sure the system will work
10-
11-
Document:
12-
• Chapter 1 - Abstract, motivation (Ruffy) ✔
13-
• Chapter 2 - RRL (Jessie, Miguel) ✔
14-
• Chapter 4 - Implementation
1+
Program:
2+
• Test other data sets for training model
3+
• Create an algorithm that will get the BLEU score (Cedric, Miguel, Hakob)
4+
• Change the variable, method, and file names of the programs (Note* yung main, model_trainer, ibm1_em, at utils ay napalitan ko na yung iba so yung mga di pa na lang ang gawin siguro) (Cedric)
5+
update (nabago na ni cedric yung tagalogtoenglish at englishtotagalog) ✔
6+
• Disseminate the train, test, and validation of data
7+
• Document the results
8+
• Try to improve the accuracy
9+
• Edit the input and output text. Make sure the system will work
10+
11+
Document:
12+
• Chapter 1 - Abstract, motivation (Ruffy) ✔
13+
• Chapter 2 - RRL (Jessie, Miguel) ✔
14+
• Chapter 4 - Implementation
1515
• Chapter 5 - Conclusion

0 commit comments

Comments
 (0)