Function splitSentences

  • Splits text into sentences, handling 220+ common abbreviations, and infering acronyms, numbers, URLs, times, names, etc.

    Parameters

    • inputText: string

      The text to be split into sentences.

    • Optionaloptions: {
          splitOnHtmlTags: boolean;
          minSize: number;
          maxSize: number;
      } = {}
      • splitOnHtmlTags: boolean

        default=true - Split on HTML tags like P, DIV, UL, OL.

      • minSize: number

        default=20 - Minimum size for a sentence.

      • maxSize: number

        default=600 - Maximum size for a sentence.

    Returns string[]

    An array of sentences. *