Spaces:
Sleeping
Sleeping
update
Browse files
app.py
CHANGED
@@ -34,7 +34,8 @@ if text:
|
|
34 |
parse_tree = parse(tokens)
|
35 |
|
36 |
# Convert the bracket parse tree into an NLTK Tree
|
37 |
-
|
|
|
38 |
|
39 |
tree_svg = TreePrettyPrinter(t).svg(nodecolor='black', leafcolor='black', funccolor='black')
|
40 |
|
|
|
34 |
parse_tree = parse(tokens)
|
35 |
|
36 |
# Convert the bracket parse tree into an NLTK Tree
|
37 |
+
|
38 |
+
t = Tree.fromstring(' '.join(word.split('-')[0] for word in parse_tree.split()))
|
39 |
|
40 |
tree_svg = TreePrettyPrinter(t).svg(nodecolor='black', leafcolor='black', funccolor='black')
|
41 |
|