Spaces:
Sleeping
Sleeping
update
Browse files
app.py
CHANGED
@@ -34,10 +34,8 @@ if text:
|
|
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 |
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')
|
43 |
|
|
|
34 |
parse_tree = parse(tokens)
|
35 |
|
36 |
# Convert the bracket parse tree into an NLTK Tree
|
|
|
|
|
37 |
t = Tree.fromstring(re.sub(r'(-\w+)+', '', parse_tree))
|
38 |
+
# t = Tree.fromstring(parse_tree)
|
39 |
|
40 |
tree_svg = TreePrettyPrinter(t).svg(nodecolor='black', leafcolor='black', funccolor='black')
|
41 |
|