Skip to main content

split_sentences

Function split_sentences 

Source
pub fn split_sentences(text: &str) -> Vec<String>
Expand description

Split text into sentences.

Handles:

  • Western punctuation: . ! ? (followed by space or end)
  • Japanese punctuation: 。!?
  • Chinese punctuation: 。!?
  • Newlines/paragraph breaks
  • Quoted speech (“Hello.” he said)
  • Abbreviations (Mr. Dr. etc. - don’t split these)