python - Color Vertices in nltk.Tree -


so drawing parse tree in nltk pretty easy. not easy trying read through vague docs , lack of examples figure out how color vertices in tree. surely feature , should easy do? here example of parse tree. i'd able specify nodes colored, example, red. how might this?

from nltk.draw.util import * nltk.draw.tree import * tree_string = "(root (s (np (dt the) (nn cat)) (vp (vbd ate) (np (dt   the) (nn mouse))) (. .)))" t = tree.fromstring(tree_string) draw_trees(t) 


Comments

Popular posts from this blog

php - mysql multiple keyword search in any order -

routing - AngularJS State management ->load multiple states in one page -

unity3d - Problems porting a GLSL shadertoy shader to unity -