Simple Python Statistical Parser
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
stat_parser Merge pull request #10 from CrazyPython/patch-1 Sep 18, 2017
LICENSE Initial commit Jul 21, 2013 Update Jul 28, 2013 cleanup API Jul 28, 2013 Add basic file. Jan 31, 2014 Removed python-future dependency, added Oct 6, 2014


Simple Python statistical (CKY) parser together with scripts for learning the PCFG from the QuestionBank and Penn treebanks.

>>> from stat_parser import Parser
>>> parser = Parser()
>>> print parser.parse("How can the net amount of entropy of the universe be massively decreased?")
  (WHADVP (WRB how))
    (MD can)
      (NP (DT the) (JJ net) (NN amount))
        (IN of)
          (NP (NNS entropy))
          (PP (IN of) (NP (DT the) (NN universe))))))
    (VP (VB be) (ADJP (RB massively) (VBN decreased))))
  (. ?))