سؤال

I have a text corpus that contains sentences represented as trees with their Part of Speech tags. I want to build a system that can probably learn a probabilistic grammar from this tree structure. Are there any inbuilt python modules than can tackle this or do I have to have to build a parser?

هل كانت مفيدة؟

المحلول

Couldnt find one. Had to implement my own parser using stacks. Honestly wasnt too much of a pain.

نصائح أخرى

You have to create a grammer for parsing your text. http://nltk.googlecode.com/svn/trunk/doc/book/ch08.html#fig-depgraph0

then parse your text using nltk parser with this grammer.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top