nltk/nltk — Issue #128: Generalize the Viterbi parser to semirings
Author: alexrudnick
Created: 2012-01-17 06:26:43+00:00
State: open

Suggestion to modify nltk.parse.viterbi to do n-best parsing; by Jeremy Kahn on the nltk-users list:

If the semiring may be subclassed, then substituting an N-best method for the Viterbi method should be a few lines' change.

I don't believe that the semiring is itself exposed for this purpose, though. (Does anyone who knows this part of the code know whether the semiring is exposed for tinkering?)

I'm referring to Joshua Goodman's really excellent "Semiring Parsing" paper:

Joshua Goodman, Semiring parsing, Computational Linguistics, v.25 n.4, p.573-605

available here:

http://www.ldc.upenn.edu/acl/J/J99/J99-4004.pdf

Recommended reading to anyone thinking about all these chart questions.

--Jeremy

Migrated from http://code.google.com/p/nltk/issues/detail?id=608