(s)
| 189 | |
| 190 | # Lowercase, trim, and remove non-letter characters |
| 191 | def normalizeString(s): |
| 192 | s = unicodeToAscii(s.lower().strip()) |
| 193 | s = re.sub(r"([.!?])", r" \1", s) |
| 194 | s = re.sub(r"[^a-zA-Z!?]+", r" ", s) |
| 195 | return s.strip() |
| 196 | |
| 197 | |
| 198 | ###################################################################### |
no test coverage detected