(sentences: list[str], section: str)
| 61 | |
| 62 | |
| 63 | def build_items(sentences: list[str], section: str) -> list[dict]: |
| 64 | items = [] |
| 65 | for sentence in sentences: |
| 66 | cleaned = normalize_whitespace(sentence) |
| 67 | if not cleaned: |
| 68 | continue |
| 69 | items.append( |
| 70 | { |
| 71 | "claim": cleaned, |
| 72 | "evidence": cleaned, |
| 73 | "source_section": section, |
| 74 | "page_hint": "", |
| 75 | } |
| 76 | ) |
| 77 | return items |
| 78 | |
| 79 | |
| 80 | def language_hint_for_text(text: str) -> str: |
no test coverage detected