-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
40 lines (32 loc) · 1.98 KB
/
Copy pathmain.py
File metadata and controls
40 lines (32 loc) · 1.98 KB
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
38
39
40
from coptic.coptic import coptic_processing
from data_collection.sort_books import sort_books
from data_conversion.convert_pdf_eng_to_text import convert_pdf_eng_books_to_text
from graphs_construction.graphs_building import build_graphs
from text_processing.reduce_noise_and_preprocess import reduce_noise_and_preprocess
from utils.find_yadisk_files import get_yadisk_client
email = 'oleg36531@gmail.com'
token = 'Invalid token'
if __name__ == '__main__':
print('Добро пожаловать в Tree of knowledge')
client = get_yadisk_client(email, token)
# Этам обработки коптского языка
ans = input('[Шаг 1] Вы хотите начать обработку коптского языка? [y/N] ')
if ans.lower() == 'y':
coptic_processing()
# Этап сортировки полученных данных
ans = input('[Шаг 2] Вы хотите начать катологизацию книг? Это может занять много времени [y/N] ')
if ans.lower() == 'y':
sort_books(client)
# Этап конвертации файлов
ans = input('[Шаг 3] Вы хотите начать конвертацию англоязычных книг из PDF? Это может занять много времени [y/N] ')
if ans.lower() == 'y':
convert_pdf_eng_books_to_text(client)
# Этап очищения от шума
ans = input('[Шаг 4] Вы хотите начать препроцессинг англоязычных текстов? [y/N] ')
if ans.lower() == 'y':
reduce_noise_and_preprocess(client)
# Этап построения графа n-грамм и семантической сети
ans = input('[Шаг 5] Вы хотите начать построение графов на основе корпуса? [y/N] ')
if ans.lower() == 'y':
build_graphs()
print('Выполнение программы завершено')