(path: Path, lowercase: bool)
| 32 | |
| 33 | |
| 34 | def load_text_lines(path: Path, lowercase: bool) -> Tuple[List[str], Counter]: |
| 35 | raw = path.read_text(encoding="utf-8", errors="ignore").splitlines() |
| 36 | normalized = [normalize_line(line, lowercase) for line in raw] |
| 37 | normalized = [line for line in normalized if line] |
| 38 | return normalized, Counter(normalized) |
| 39 | |
| 40 | |
| 41 | def normalize_json(value: Any) -> Any: |
no test coverage detected