Update modules/studentact/current_situation_analysis.py
Browse files
modules/studentact/current_situation_analysis.py
CHANGED
@@ -23,7 +23,6 @@ logging.basicConfig(
|
|
23 |
# 3. Obtener el logger espec铆fico para este m贸dulo
|
24 |
logger = logging.getLogger(__name__)
|
25 |
|
26 |
-
###################################################################
|
27 |
def analyze_text_dimensions(doc):
|
28 |
"""
|
29 |
Analiza las dimensiones principales del texto.
|
@@ -69,9 +68,9 @@ def analyze_text_dimensions(doc):
|
|
69 |
'clarity': {'normalized_score': 0.0, 'details': {}}
|
70 |
}
|
71 |
|
72 |
-
####################################################################
|
73 |
|
74 |
-
|
|
|
75 |
"""
|
76 |
Analiza la claridad del texto considerando m煤ltiples factores.
|
77 |
"""
|
@@ -184,7 +183,7 @@ def analyze_reference_clarity'(doc):
|
|
184 |
logger.error(f"Error en analyze_clarity: {str(e)}")
|
185 |
return 0.0, {}
|
186 |
|
187 |
-
|
188 |
def analyze_vocabulary_diversity(doc):
|
189 |
"""An谩lisis mejorado de la diversidad y calidad del vocabulario"""
|
190 |
try:
|
@@ -323,7 +322,6 @@ def analyze_cohesion(doc):
|
|
323 |
logger.error(f"Error en analyze_cohesion: {str(e)}")
|
324 |
return 0.0
|
325 |
|
326 |
-
#####################################################
|
327 |
def analyze_structure(doc):
|
328 |
try:
|
329 |
if len(doc) == 0:
|
@@ -451,7 +449,6 @@ def get_dependency_depths(token, depth=0, analyzed_tokens=None):
|
|
451 |
|
452 |
return current_result
|
453 |
|
454 |
-
###########################################################33
|
455 |
def normalize_score(value, metric_type,
|
456 |
min_threshold=0.0, target_threshold=1.0,
|
457 |
range_factor=2.0, optimal_length=None,
|
@@ -554,7 +551,6 @@ def normalize_score(value, metric_type,
|
|
554 |
logger.error(f"Error en normalize_score: {str(e)}")
|
555 |
return 0.0
|
556 |
|
557 |
-
##############################################################
|
558 |
|
559 |
# Funciones de generaci贸n de gr谩ficos
|
560 |
def generate_sentence_graphs(doc):
|
|
|
23 |
# 3. Obtener el logger espec铆fico para este m贸dulo
|
24 |
logger = logging.getLogger(__name__)
|
25 |
|
|
|
26 |
def analyze_text_dimensions(doc):
|
27 |
"""
|
28 |
Analiza las dimensiones principales del texto.
|
|
|
68 |
'clarity': {'normalized_score': 0.0, 'details': {}}
|
69 |
}
|
70 |
|
|
|
71 |
|
72 |
+
|
73 |
+
def analyze_clarity(doc):
|
74 |
"""
|
75 |
Analiza la claridad del texto considerando m煤ltiples factores.
|
76 |
"""
|
|
|
183 |
logger.error(f"Error en analyze_clarity: {str(e)}")
|
184 |
return 0.0, {}
|
185 |
|
186 |
+
|
187 |
def analyze_vocabulary_diversity(doc):
|
188 |
"""An谩lisis mejorado de la diversidad y calidad del vocabulario"""
|
189 |
try:
|
|
|
322 |
logger.error(f"Error en analyze_cohesion: {str(e)}")
|
323 |
return 0.0
|
324 |
|
|
|
325 |
def analyze_structure(doc):
|
326 |
try:
|
327 |
if len(doc) == 0:
|
|
|
449 |
|
450 |
return current_result
|
451 |
|
|
|
452 |
def normalize_score(value, metric_type,
|
453 |
min_threshold=0.0, target_threshold=1.0,
|
454 |
range_factor=2.0, optimal_length=None,
|
|
|
551 |
logger.error(f"Error en normalize_score: {str(e)}")
|
552 |
return 0.0
|
553 |
|
|
|
554 |
|
555 |
# Funciones de generaci贸n de gr谩ficos
|
556 |
def generate_sentence_graphs(doc):
|