(text)
| 388 | |
| 389 | |
| 390 | def normalize_english(text): |
| 391 | def fn(m): |
| 392 | word = m.group() |
| 393 | if word in english_dictionary: |
| 394 | return english_dictionary.get(word) |
| 395 | else: |
| 396 | return word |
| 397 | |
| 398 | text = re.sub("([A-Za-z]+)", fn, text) |
| 399 | return text |
| 400 | |
| 401 | |
| 402 | def normalize_upper(text): |