An interesting thought to use sets. I like it, though in really large blocks of text you might run into some very common three-word combinations which you'd want a higher chance of repeating if you run into the first two? Just depending on what your output goal was. Very cool.