rag.core.text_quality¶
Heuristics to skip figure-dump and boilerplate PDF text.
Attributes¶
Functions¶
|
Return True when text looks like readable paper prose. |
Module Contents¶
- rag.core.text_quality.is_prose_text(*, text: str) bool[source]¶
Return True when text looks like readable paper prose.
Drops short dedications, chart-axis dumps, pyLDAvis chrome, and PDF
/uni00figure encodings that pypdf extracts as glyph salad.- Parameters:
text (str) – Extracted page or chunk text.
- Returns:
True when the text is worth indexing or citing.
- Return type:
bool