Skip to content

Instantly share code, notes, and snippets.

@andrea-dagostino
Last active October 3, 2022 18:00
Show Gist options
  • Save andrea-dagostino/f84e15b092ff2f8bebc023a02694d4d6 to your computer and use it in GitHub Desktop.
Save andrea-dagostino/f84e15b092ff2f8bebc023a02694d4d6 to your computer and use it in GitHub Desktop.
text_sim_tfidf
top = similarity_df[similarity_df > 0.4] # andiamo a modificare qui
mask = np.triu(np.ones_like(top))
sns.heatmap(
top,
square=True,
annot=True,
robust=True,
fmt='.2f',
annot_kws={'size': 7, 'fontweight': 'bold'},
yticklabels=top.columns
xticklabels=top.columns,
cmap="YlGnBu",
mask=mask
)
plt.title('Heatmap delle similarità tra testi', fontdict={'fontsize': 24})
plt.show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment