-
Notifications
You must be signed in to change notification settings - Fork 1
/
main.py
37 lines (34 loc) · 1.25 KB
/
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
import data_preprocess
import text_summarization
import paraphrasing_augmentation
import synonym_rep_augmentation
import transfer_learning
from config import DataProcessorConfig
def run_all() -> None:
var = DataProcessorConfig
print('+' * 28)
print('+' * 8 + 'BEGIN PROCESS' + '+' * 7)
print('+' * 28)
print()
print('+' * 5 + 'DATA PRE-PROCESSING' + '+' * 5)
data = data_preprocess.run_data_preprocessing(var.TEXT_COL, var.SOURCE_FILE)
print('PROCESS COMPLETED')
print()
print('+' * 5 + 'TEXTS SUMMARIZATION' + '+' * 5)
preprocessed = text_summarization.run_text_summarization(data, var.SOURCE_FILE)
print('PROCESS COMPLETED')
print()
print('+' * 5 + 'PEGASUS AUGMENTATION' + '+' * 4)
pegasus_data = paraphrasing_augmentation.execute_pegasus_augmentation(preprocessed, var.SOURCE_FILE)
print('PROCESS COMPLETED')
print()
print('+' * 5 + 'SYNONYM AUGMENTATION' + '+' * 4)
generated_path = synonym_rep_augmentation.execute_synonym_replacement(pegasus_data, var.SOURCE_FILE)
print('PROCESS COMPLETED')
print()
print('+' * 7 + 'MODEL TRAINING' + '+' * 7)
transfer_learning.train_model(generated_path)
print('PROCESS COMPLETED')
print()
if __name__ == '__main__':
run_all()