‘Twas the Night Before Christmas (II)

Here I will post a series of (mostly) simple challenges to amuse you in the run-up to Christmas. I'll try to post one each weekday.
DDRM
Posts: 398
Joined: Mon 02 Apr 2018, 18:04

‘Twas the Night Before Christmas (II)

Post by DDRM »

Taking the same text as shown in challenge 8, can you (a) compile a dictionary of all the words, and find the commonest, and (b) find out the average sentence length in words?

You can strip out all punctuation, and treat variations of the same word as different (so “night” and “nights” would be distinct, but “night’s” would be the same as “nights” (and indeed “nights’”!)