Spaces:
Sleeping
Sleeping
update
Browse files
app.py
CHANGED
@@ -36,7 +36,7 @@ if text:
|
|
36 |
# Convert the bracket parse tree into an NLTK Tree
|
37 |
mod_tree = parse_tree.replace("$(", "$LRB").replace("$)", "$RRB")
|
38 |
# t = Tree.fromstring(re.sub(r'(-\w+)+', '', mod_tree))
|
39 |
-
t = Tree.fromstring(
|
40 |
|
41 |
tree_svg = TreePrettyPrinter(t).svg(nodecolor='black', leafcolor='black', funccolor='black')
|
42 |
|
@@ -46,8 +46,8 @@ if text:
|
|
46 |
|
47 |
col2 = st.columns(1)[0]
|
48 |
col2.header("Parsing result:")
|
49 |
-
col2.write(
|
50 |
|
51 |
# Display the graph in the Streamlit app
|
52 |
-
col2.image(tree_svg, use_column_width=True)
|
53 |
|
|
|
36 |
# Convert the bracket parse tree into an NLTK Tree
|
37 |
mod_tree = parse_tree.replace("$(", "$LRB").replace("$)", "$RRB")
|
38 |
# t = Tree.fromstring(re.sub(r'(-\w+)+', '', mod_tree))
|
39 |
+
# t = Tree.fromstring(mod_tree)
|
40 |
|
41 |
tree_svg = TreePrettyPrinter(t).svg(nodecolor='black', leafcolor='black', funccolor='black')
|
42 |
|
|
|
46 |
|
47 |
col2 = st.columns(1)[0]
|
48 |
col2.header("Parsing result:")
|
49 |
+
col2.write(mod_tree.replace('_', '\_').replace('$', '\$').replace('*', '\*'))
|
50 |
|
51 |
# Display the graph in the Streamlit app
|
52 |
+
# col2.image(tree_svg, use_column_width=True)
|
53 |
|