Function normalizeLineLengths

  • Normalize line lengths. Tries to merge sentences with its neighboring sentences onto the same line if they are short.

    Parameters

    • sentences: string[]

      Array of sentences

    • Optional lowerBound: number

      Will try to merge sentences if the length of the current sentence is less than this value. If no user input is given, this value is automatically determined by calculating statistics on the data.

    • Optional upperBound: number

      Will not merge sentences if the conbined length of the sentences is greater than this value. If no user input is given, this value is automatically determined by calculating statistics on the data.

    Returns string[]

Generated using TypeDoc