<jupyter_start><jupyter_text>Modeling<jupyter_code>sums_list = [item.split() for item in sums]
LSA = create_gensim_lsa_model(sums_list, 5)
myDict = {}
for i in range(5):
    print(f'THE TOP 30 WORDS FOR TOPIC #{i}')
    myDict[i] = [[item.split('*')[1].replace('"','').strip(), float(item.split('*')[0])] for item in LSA.print_topics(num_words = 50)[i][1].split('+')]
    print(np.array(myDict[i]).T[0])
    print('\n')
eval_coherence(myDict, sums_list)<jupyter_output>Evaluating topic coherence...
Done<jupyter_text>Store results<jupyter_code>results = pd.DataFrame(columns = np.array([['Topic_{}_words'.format(str(i)), 'Topic_{}_significance'.format(str(i))] for i in range(5)]).flatten())
results
for i in range(5):
    results['Topic_{}_words'.format(str(i))] = np.array(myDict[i]).T[0]
    results['Topic_{}_significance'.format(str(i))] = np.array(myDict[i]).T[1]
results.head()
results.to_excel('LSA_results.xlsx', index=False)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.2095435684647303, 'fraction_numerical': 0.014522821576763486, 'mean_word_length': 7.247863247863248, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 8, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '2', 'dir': 'jupyter-structured-clean-dedup', 'id': '283030', 'license': 'MIT', 'n_tokens_mistral': 400, 'n_tokens_neox': 383, 'n_words': 56, 'path': 'LSA.ipynb', 'repo_name': 'jasonsoti1/SherlocAnalysis', 'size': '964'}