Generating paragraphs from a text file

I have a text file input.txt with 20 pages of nothing but sentences, without any line spaces. How can I automate grouping these sentences into meaning paragraphs?

I would either just do this by hand (tedious but wouldn’t take long) or use the ChatGPT API - chunk the txt file into inputs that fit within ChatGPT’s context window and for each chunk, call ChatGPT asking it to do its best to break the sentence into reasonable paragraphs. Then combine everything ChatGPT sends back to you.