MCPcopy Create free account
hub / github.com/OpenRaiser/PaperFlow / _split_sentences

Function _split_sentences

agents/reading-agent/main.py:735–746  ·  view source on GitHub ↗
(text: Any)

Source from the content-addressed store, hash-verified

733
734def _split_sentences(text: Any) -> List[str]:
735 normalized = _clean_pdf_evidence_text(text)
736 if not normalized:
737 return []
738
739 parts = re.split(r"(?<=[。!?!?\.])\s+|(?<=;)\s+", normalized)
740 sentences: List[str] = []
741 for part in parts:
742 sentence = re.sub(r"\s+", " ", part).strip()
743 if len(sentence) >= 12 and not _is_noisy_pdf_evidence_text(sentence, min_chars=12):
744 sentences.append(sentence)
745 return sentences
746
747
748def _first_non_empty(*values: Any) -> str:
749 for value in values:

Callers 2

_pick_sentencesFunction · 0.85

Calls 2

_clean_pdf_evidence_textFunction · 0.85

Tested by

no test coverage detected