Skip to content Skip to sidebar Skip to footer

Tree Generation For Rules In Python

I would like to draw a tree like structure using Tkinter for the following data: S--->NP VGF NP VGNF NP--->N_NNP_O_M VGF--->V_VM_VF NP--->N_NNP_S_F

Solution 1:

do you have a parser if yes.then you will get parsetree when running that parser.

i think you have grammer but no parser.. if yes ....then use parser generaters to make parser. to make parser you must give grammer to generaters...

and after getting parse tree.its easy to draw tree in gui. nltk is for natural language processing..

Solution 2:

yes .but its not clear that what type of data you have and which way must draw is you want only an image that looks like a tree. or is it draw with a widget if you need to draw that as an image use tkinter.canvas()### or use as widget tkinter.tree_view

Post a Comment for "Tree Generation For Rules In Python"