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

README.md

pyStatParser

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?")
(SBARQ
  (WHADVP (WRB how))
  (SQ
    (MD can)
    (NP
      (NP (DT the) (JJ net) (NN amount))
      (PP
        (IN of)
        (NP
          (NP (NNS entropy))
          (PP (IN of) (NP (DT the) (NN universe))))))
    (VP (VB be) (ADJP (RB massively) (VBN decreased))))
  (. ?))