(text)
| 364 | |
| 365 | |
| 366 | def normalize(text): |
| 367 | text = text.strip() |
| 368 | |
| 369 | text = re.sub("\(\d+일\)", "", text) |
| 370 | text = re.sub("\([⺀-⺙⺛-⻳⼀-⿕々〇〡-〩〸-〺〻㐀-䶵一-鿃豈-鶴侮-頻並-龎]+\)", "", text) |
| 371 | |
| 372 | text = normalize_with_dictionary(text, etc_dictionary) |
| 373 | text = normalize_english(text) |
| 374 | text = re.sub("[a-zA-Z]+", normalize_upper, text) |
| 375 | |
| 376 | text = normalize_quote(text) |
| 377 | text = normalize_number(text) |
| 378 | |
| 379 | return text |
| 380 | |
| 381 | |
| 382 | def normalize_with_dictionary(text, dic): |
no test coverage detected