Created
October 3, 2022 09:05
-
-
Save andrea-dagostino/05669b58aae368c8163f2e486c18afaf to your computer and use it in GitHub Desktop.
text_sim_tfidf
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| M = np.zeros((posts.shape[0], posts.shape[0])) # creiamo una matrice 30x30 per contenere i risultati di testo_i con testo_j | |
| for i, row in tqdm(posts.iterrows(), total=posts.shape[0], desc='1st level'): # definiamo i | |
| for j, next_row in posts.iterrows(): # definiamo j | |
| M[i, j] = compute_similarity(row.article, next_row.article) # popoliamo la matrice con i risultati |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment