Split out the context analysis from tts::word_stream into a separate class.