Commit dcef49a4 by Steven Xu

fixed some reference errors

parent 7586ab5e
......@@ -175,6 +175,7 @@ class TreeSegmentWidget(CanvasWidget):
self.update(self._label)
def insert_child(self, index, child):
canvas = self.canvas()
self._subtrees.insert(index, child)
self._add_child_widget(child)
self._lines.append(canvas.create_line(0,0,0,0, fill='#006060'))
......
......@@ -1482,7 +1482,7 @@ def demo():
# Demonstrate tree parsing.
s = '(S (NP (DT the) (NN cat)) (VP (VBD ate) (NP (DT a) (NN cookie))))'
t = Tree.fromstring(s)
t = tree.Tree.fromstring(s)
print("Convert bracketed string into tree:")
print(t)
print(t.__repr__())
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment