octimot/StoryToolkitAI

Smart splitting if "Split on Punctuation" and "Split at n words" are enabled at the same time

Opened this issue · 1 comments

Is your feature request related to a problem? Please describe.

Right now, if you split after n words AND enable split on punctuation, the split will split at n words, and if there's 1 word left afterwards it will create a new segment with just this 1 word:

The quick brown fox

jumps.

Describe the solution you'd like

It would be nice if there was a "Smart Splitting" option, where StoryToolkit will break a sentence up if it's 1 word too long.

So we'd either have 2 smaller segments:

The quick brown

fox jumps.

Or 1 longer segment:

The quick brown fox jumps.

Essentially the same as #179