Using the pre-prepared MaltParser model with NLTK

Can someone tell me how to use the pre-prepared MaltParser model (http://maltparser.org/mco/english_parser/engmalt.html) in nltk.parse.malt? The only option seems to be to train from a file (if someone can point me towards a good, publicly accessible training file, that would be great too).

+5
source share
2 answers

The MaltParser interface in older versions of NLTK is used to hard-code the model path. This has been committed to commit e9e443 . Now you can do the following:

maltparser = MaltParser(mco="/path/to/your/model.mco")

easy_install pip - NLTK, (2.0.1rc4). , :

maltparser = MaltParser()
maltparser.mco = "/path/to/your/model.mco"

MaltParser.

+3


- , (, , ), nltk dev: https://github.com/nltk/nltk/issues/145

, , , :

" mco , API, , , ."

.

- SO:

NLTK ?

+1

All Articles