How do I do dependency parsing in NLTK?

前端 未结 7 995
醉梦人生
醉梦人生 2020-11-29 20:53

Going through the NLTK book, it\'s not clear how to generate a dependency tree from a given sentence.

The relevant section of the book: sub-chapter on dependency gra

7条回答
  •  生来不讨喜
    2020-11-29 21:20

    I think you could use a corpus-based dependency parser instead of the grammar-based one NLTK provides.

    Doing corpus-based dependency parsing on a even a small amount of text in Python is not ideal performance-wise. So in NLTK they do provide a wrapper to MaltParser, a corpus based dependency parser.

    You might find this other question about RDF representation of sentences relevant.

提交回复
热议问题