Comparison of parsers in python?

andrew cooke andrew at
Sun Sep 20 13:50:53 CEST 2009

On Sep 19, 9:34 pm, Peng Yu <pengyu... at> wrote:
> On Sep 19, 6:05 pm, Robert Kern <robert.k... at> wrote:
> >
> This is more a less just a list of parsers. I would like some detailed
> guidelines on which one to choose for various parsing problems.

it would be simpler if you described what you want to do - parsers can
be used for a lot of problems.

also, the parsers do not exist in isolation - you need to worry about
whether they are supported, how good the documentation is, etc.

and different parsers handle different grammars - see - so if you already have a
particular grammar then your life is simpler if you choose a parser
that matches.

these are the three that i know most about - i think all three are
currently maintained:

for simple parsing problems, i think pyparsing is the most commonly
used -

my own lepl - - tries to combine ease of
use with some more advanced features

the nltk - - is particularly targeted at parsing
natural languages and includes a wide variety of tools.

but for parsing a large project you might be better interfacing to a
compiled parser (lepl has memoisation, so should scale quite well, but
it's not something i've looked at in detail yet).


More information about the Python-list mailing list