Emanuel Huber commited on
Commit
e610b55
1 Parent(s): b149299

Added contraction expansion for batch processing

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -96,6 +96,7 @@ def batch_analysis(input_file):
96
  conllu_output = []
97
 
98
  for i, sent in enumerate(sents):
 
99
  conllu_output.append("# sent_id = {}-{}\n".format(name, i + 1))
100
  conllu_output.append("# text = {}\n".format(sent))
101
  tokens, labels, scores = predict(sent, nlp, logger)
@@ -165,4 +166,4 @@ with gr.Blocks(css=css) as demo:
165
  gr.HTML(bottom_html)
166
 
167
 
168
- demo.launch(debug=True, server_port=15000)
 
96
  conllu_output = []
97
 
98
  for i, sent in enumerate(sents):
99
+ sent = expand_contractions(sent)
100
  conllu_output.append("# sent_id = {}-{}\n".format(name, i + 1))
101
  conllu_output.append("# text = {}\n".format(sent))
102
  tokens, labels, scores = predict(sent, nlp, logger)
 
166
  gr.HTML(bottom_html)
167
 
168
 
169
+ demo.launch(debug=True)