Spaces:
Sleeping
Sleeping
update
Browse files
app.py
CHANGED
@@ -36,6 +36,7 @@ if text:
|
|
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 |
t = Tree.fromstring(parse_tree)
|
40 |
|
41 |
tree_svg = TreePrettyPrinter(t).svg(nodecolor='black', leafcolor='black', funccolor='black')
|
|
|
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 |
+
t = Tree.fromstring(re.sub(r'(-\w+)+', '', parse_tree))
|
40 |
t = Tree.fromstring(parse_tree)
|
41 |
|
42 |
tree_svg = TreePrettyPrinter(t).svg(nodecolor='black', leafcolor='black', funccolor='black')
|