nielklug commited on
Commit
1673b0e
·
1 Parent(s): 89eec99
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -8,7 +8,7 @@ from annotate import tag_text
8
 
9
 
10
  st.title("ENHG parsing system (demo)")
11
- text = st.text_area("""This is a simple demo of a Early New High German (ENHG) tagging and parsing system based on neural network models.\n\n
12
  Enter some ENHG text below!""")
13
 
14
  st.text("""Example MHG sentences:
@@ -34,10 +34,10 @@ if text:
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
 
42
  col1 = st.columns(1)[0]
43
  col1.header("POS tagging result:")
@@ -48,5 +48,5 @@ if text:
48
  col2.write(parse_tree.replace('_', '\_').replace('$', '\$').replace('*', '\*'))
49
 
50
  # Display the graph in the Streamlit app
51
- col2.image(tree_svg, use_column_width=True)
52
 
 
8
 
9
 
10
  st.title("ENHG parsing system (demo)")
11
+ text = st.text_area("""This is a simple demo of a Early New High German (ENHG) tagging and parsing system based on BERT language models.\n\n
12
  Enter some ENHG text below!""")
13
 
14
  st.text("""Example MHG sentences:
 
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
 
42
  col1 = st.columns(1)[0]
43
  col1.header("POS tagging result:")
 
48
  col2.write(parse_tree.replace('_', '\_').replace('$', '\$').replace('*', '\*'))
49
 
50
  # Display the graph in the Streamlit app
51
+ # col2.image(tree_svg, use_column_width=True)
52