Return the first complete sentence from a prose paragraph, suitable
for use as a fallback editorial title when the artefact H1 is
categorical (e.g. # EU Parliament Committee Reports) and the
resolver must derive <title> from the BLUF / lede summary instead.
A "sentence" is the prefix up to the first sentence-terminator
(. , ! , ? , ; ) inside the [HEADLINE_SOFT_MIN, TITLE_MAX_LENGTH] window. Common abbreviations (Q1., Q2.,
H1., H2., Mr., Mrs., e.g., i.e., vs.) are skipped
so they don't terminate the sentence prematurely. When no
acceptable terminator exists in the window, returns '' so the
resolver falls through to the next tier instead of feeding an
over-budget paragraph into truncateTitle (which would also
return '').
Parameters
paragraph: string
Prose paragraph (post-stripInlineMarkdown)
Returns string
First sentence, or '' when none can be identified within
the soft-min window
Return the first complete sentence from a prose paragraph, suitable for use as a fallback editorial title when the artefact H1 is categorical (e.g.
# EU Parliament Committee Reports) and the resolver must derive<title>from the BLUF / lede summary instead.A "sentence" is the prefix up to the first sentence-terminator (
.,!,?,;) inside the[HEADLINE_SOFT_MIN, TITLE_MAX_LENGTH]window. Common abbreviations (Q1.,Q2.,H1.,H2.,Mr.,Mrs.,e.g.,i.e.,vs.) are skipped so they don't terminate the sentence prematurely. When no acceptable terminator exists in the window, returns''so the resolver falls through to the next tier instead of feeding an over-budget paragraph into truncateTitle (which would also return'').