Storing and reading an NLTK Chunk Tree in a file

28 views
Skip to first unread message

Min Jun Park

unread,
Mar 27, 2015, 9:54:37 AM3/27/15
to nltk-...@googlegroups.com
I'm struggling with making a custom chunked corpus.

Is there any proper way to save/read an NLTK Tree object in a file?

http://stackoverflow.com/questions/29302267/stroring-and-reading-an-nltk-chunk-tree-in-a-file

Thank you!

Min Jun Park

unread,
Mar 28, 2015, 8:38:50 AM3/28/15
to nltk-...@googlegroups.com
So my Question in short,

>>> print(tree)
(S
(NP Rapunzel/NNP)
let/VBD
down/RP
(NP her/PP$ long/JJ golden/JJ hair/NN))

I want to save this tree object in a file, and want to load it with any NLTK corpus reader.
I CANNOT find any reader that can read the chunk tree above.
Reply all
Reply to author
Forward
0 new messages