<jupyter_start><jupyter_text>Word Cloud<jupyter_code>word_cloud = {}
lst = []

for unique_word in unique_words:
    tmp = 0
    for word in txt.split(' '):
        if (word == unique_word):
            tmp += 1
        
    lst.append([unique_word, tmp])
    word_cloud[unique_word] = tmp
word_cloud['an']
import pandas as pd
df = pd.DataFrame(lst, columns = ['word', 'freq'])
df.sort_values(by = 'freq', ascending = False).head(10)
df = pd.read_csv('t_asv.csv')
len(df)
df.isnull().sum()
txt = ''

for line in df['t']:
    txt += line + ' '
words = txt.split(' ')
unique_words = list(set(txt.split(' ')))
word_cloud = {}
lst = []

for unique_word in unique_words:
    tmp = 0
    for word in txt.split(' '):
        if (word == unique_word):
            tmp += 1
        
    lst.append([unique_word, tmp])
    word_cloud[unique_word] = tmp
len(word_cloud)
len(unique_words)
256/30918.0
3000/60
unique_words<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.15884861407249468, 'fraction_numerical': 0.022388059701492536, 'mean_word_length': 3.210762331838565, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '29769', 'license': 'Apache-2.0', 'n_tokens_mistral': 364, 'n_tokens_neox': 345, 'n_words': 77, 'path': 'Word Cloud with Python/Word Cloud.ipynb', 'repo_name': 'teenage-coder/Data-Science-with-Python', 'size': '938'}