chore
Browse files- en-ja-align.py +8 -8
en-ja-align.py
CHANGED
@@ -66,17 +66,17 @@ def parse_html_table(path: Path):
|
|
66 |
text_en, _, text_ja = (preprocess(td.text) for td in tr.find_all("td"))
|
67 |
text_ja = unicodedata.normalize("NFKC", text_ja)
|
68 |
|
69 |
-
cur_left_parens +=
|
70 |
-
cur_right_parens +=
|
71 |
|
72 |
-
cur_left_quote +=
|
73 |
-
cur_right_quote +=
|
74 |
|
75 |
-
cur_left_parens_ja +=
|
76 |
-
cur_right_parens_ja +=
|
77 |
|
78 |
-
cur_left_parens_ja2 +=
|
79 |
-
cur_right_parens_ja2 +=
|
80 |
|
81 |
if (
|
82 |
text_ja.strip().endswith("。")
|
|
|
66 |
text_en, _, text_ja = (preprocess(td.text) for td in tr.find_all("td"))
|
67 |
text_ja = unicodedata.normalize("NFKC", text_ja)
|
68 |
|
69 |
+
cur_left_parens += text_en.count("(")
|
70 |
+
cur_right_parens += text_en.count(")")
|
71 |
|
72 |
+
cur_left_quote += len(list(re.findall(r"``", text_en)))
|
73 |
+
cur_right_quote += len(list(re.findall(r"''", text_en)))
|
74 |
|
75 |
+
cur_left_parens_ja += text_ja.count("「")
|
76 |
+
cur_right_parens_ja += text_ja.count("」")
|
77 |
|
78 |
+
cur_left_parens_ja2 += text_ja.count("『")
|
79 |
+
cur_right_parens_ja2 += text_ja.count("』")
|
80 |
|
81 |
if (
|
82 |
text_ja.strip().endswith("。")
|