A Sonnet about HMMs


A hidden Markov model generates
expressions of a most exquisite form.
So gracefully it leaps between its states,
its distributions far from uniform:
by EM's arts, transition tables know
the subtle dance from DET to N to V,
and from emission distributions flow
the words that it has grouped statistically.
But oh! this model's tragic flaw is clear:
it has but finite memory, no stacks.
And yet the HMM will persevere
despite its failure modeling syntax:
a CFG can match a close-paren,
but HMMs have runtime O(n)!