Spaces:
Sleeping
Sleeping
Update modules/text_analysis/semantic_analysis.py
Browse files
modules/text_analysis/semantic_analysis.py
CHANGED
@@ -371,19 +371,17 @@ def visualize_concept_graph(G, lang_code):
|
|
371 |
),
|
372 |
ax=ax
|
373 |
)
|
374 |
-
|
375 |
-
# A帽adir leyenda de centralidad
|
376 |
-
sm = plt.cm.ScalarMappable(
|
377 |
-
cmap=plt.cm.viridis,
|
378 |
-
norm=plt.Normalize(vmin=0, vmax=1)
|
379 |
-
)
|
380 |
sm.set_array([])
|
381 |
-
plt.colorbar(sm, ax=ax, label='
|
382 |
-
|
383 |
-
plt.title("Red de conceptos relacionados", pad=20, fontsize=14)
|
384 |
-
ax.set_axis_off()
|
385 |
|
|
|
|
|
|
|
386 |
# Ajustar el layout para que la barra de color no se superponga
|
|
|
387 |
plt.tight_layout()
|
388 |
|
389 |
return fig
|
|
|
371 |
),
|
372 |
ax=ax
|
373 |
)
|
374 |
+
#################################################################
|
375 |
+
# A帽adir leyenda de centralidad (usando traducci贸n)
|
376 |
+
sm = plt.cm.ScalarMappable(cmap=plt.cm.viridis, norm=plt.Normalize(vmin=0, vmax=1))
|
|
|
|
|
|
|
377 |
sm.set_array([])
|
378 |
+
plt.colorbar(sm, ax=ax, label=semantic_t.get('concept_centrality', 'Concept Centrality'))
|
|
|
|
|
|
|
379 |
|
380 |
+
# T铆tulo traducido
|
381 |
+
plt.title(semantic_t.get('concept_network', 'Concept Network'), pad=20, fontsize=14)
|
382 |
+
|
383 |
# Ajustar el layout para que la barra de color no se superponga
|
384 |
+
ax.set_axis_off()
|
385 |
plt.tight_layout()
|
386 |
|
387 |
return fig
|