Update modules/morphosyntax/morphosyntax_interface.py
Browse files
modules/morphosyntax/morphosyntax_interface.py
CHANGED
@@ -30,9 +30,6 @@ from ..database.morphosintaxis_export import export_user_interactions
|
|
30 |
import logging
|
31 |
logger = logging.getLogger(__name__)
|
32 |
|
33 |
-
nlp_model = nlp_models[lang_code] # Obtiene el modelo específico del idioma
|
34 |
-
analysis_result = perform_advanced_morphosyntactic_analysis(text, nlp_model)
|
35 |
-
|
36 |
############################################################################################################
|
37 |
def display_morphosyntax_interface(lang_code, nlp_models, morpho_t):
|
38 |
try:
|
@@ -72,10 +69,10 @@ def display_morphosyntax_interface(lang_code, nlp_models, morpho_t):
|
|
72 |
if analyze_button and sentence_input.strip(): # Verificar que haya texto y no solo espacios
|
73 |
try:
|
74 |
with st.spinner(morpho_t.get('processing', 'Processing...')):
|
75 |
-
#
|
76 |
doc = nlp_models[lang_code](sentence_input)
|
77 |
|
78 |
-
# Realizar análisis morfosintáctico
|
79 |
advanced_analysis = perform_advanced_morphosyntactic_analysis(
|
80 |
sentence_input,
|
81 |
nlp_models[lang_code]
|
|
|
30 |
import logging
|
31 |
logger = logging.getLogger(__name__)
|
32 |
|
|
|
|
|
|
|
33 |
############################################################################################################
|
34 |
def display_morphosyntax_interface(lang_code, nlp_models, morpho_t):
|
35 |
try:
|
|
|
69 |
if analyze_button and sentence_input.strip(): # Verificar que haya texto y no solo espacios
|
70 |
try:
|
71 |
with st.spinner(morpho_t.get('processing', 'Processing...')):
|
72 |
+
# Obtener el modelo específico del idioma y procesar el texto
|
73 |
doc = nlp_models[lang_code](sentence_input)
|
74 |
|
75 |
+
# Realizar análisis morfosintáctico con el mismo modelo
|
76 |
advanced_analysis = perform_advanced_morphosyntactic_analysis(
|
77 |
sentence_input,
|
78 |
nlp_models[lang_code]
|