paragraphs_dict, par_ids, meta_info, sent_counter_dict = reader.get_paragraphs(db_path)
Browse files
utils.py
CHANGED
@@ -56,7 +56,14 @@ def align_text(txt1: str, txt2: str, lang1: str, lang2: str) -> pd.DataFrame:
|
|
56 |
if len(rest) == 0:
|
57 |
break
|
58 |
|
59 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
60 |
|
61 |
data = []
|
62 |
for from_paragraph, to_paragraph in zip(paragraphs_from, paragraphs_to):
|
|
|
56 |
if len(rest) == 0:
|
57 |
break
|
58 |
|
59 |
+
paragraphs_dict, par_ids, meta_info, sent_counter_dict = reader.get_paragraphs(db_path)
|
60 |
+
|
61 |
+
paragraphs_from = paragraphs_dict[lang1]
|
62 |
+
paragraphs_to = paragraphs_dict[lang2]
|
63 |
+
|
64 |
+
# Debug prints to understand the structure
|
65 |
+
print("paragraphs_from:", paragraphs_from)
|
66 |
+
print("paragraphs_to:", paragraphs_to)
|
67 |
|
68 |
data = []
|
69 |
for from_paragraph, to_paragraph in zip(paragraphs_from, paragraphs_to):
|