(text)
| 195 | |
| 196 | |
| 197 | def normalize_whitespace(text): |
| 198 | text = _HORIZONTAL_WS_RE.sub(" ", text) |
| 199 | text = _TRAILING_WS_RE.sub("\n", text) |
| 200 | text = _REPEAT_PLACEHOLDER_RE.sub(INLINE_SKIP_PLACEHOLDER, text) |
| 201 | text = _ARTICLE_PLACEHOLDER_RE.sub(INLINE_SKIP_PLACEHOLDER, text) |
| 202 | text = _HORIZONTAL_WS_RE.sub(" ", text) |
| 203 | return text |
| 204 | |
| 205 | |
| 206 | def extract_text(html_path): |