03-14-2022 11:18 AM
The tricky part is unambiguously defining what a word is. Suppose you encounter " Page-2 "; is that:
03-14-2022 11:28 AM
You might want special treatment for "-" followed by linefeed, because it might split a word (not implemented).
In any case, here's the MAP version. See if it makes sense.
03-25-2022 05:40 PM
Thank you! It looks like I was doing too much when a simpler answer was available.