Upload stanzautils.py
Browse files- stanzautils.py +10 -0
stanzautils.py
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import stanza
|
2 |
+
import streamlit as st
|
3 |
+
|
4 |
+
# @st.cache(suppress_st_warning=True)
|
5 |
+
def call_nlp_pipeline():
|
6 |
+
# stanza.download('en', package='mimic', processors={'ner': 'bc5cdr'}, model_dir='/stanmodels')
|
7 |
+
nlp = stanza.Pipeline('en', package='mimic', processors={'ner': 'bc5cdr'}, model_dir='./stanmodels')
|
8 |
+
return nlp
|
9 |
+
|
10 |
+
|