<jupyter_start><jupyter_text><jupyter_code>import nltk
nltk.download('book')
from nltk.book import *
text1
text1[:100]
len(text1)
allTexts = [text1, text2, text3, text4, text5, text6 , text7, text8, text9]
[len(text) for text in allTexts]
sentence = "the quick brown fox jumped over the lazy dogs."
type(sentence)
type(text1)
tokens = nltk.word_tokenize(sentence)
tokens
!wget https://gutenberg.org/cache/epub/11231/pg11231.txt
bartlebyRaw = open('pg11231.txt').read()

BartlebyText = nltk.word_tokenize(bartlebyRaw)
BartlebyText = nltk.Text(BartlebyText)
BartlebyText.dispersion_plot(['outside'])<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.13237639553429026, 'fraction_numerical': 0.049441786283891544, 'mean_word_length': 7.486486486486487, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '336326', 'license': 'MIT', 'n_tokens_mistral': 273, 'n_tokens_neox': 254, 'n_words': 48, 'path': 'Meaningful_Text_Analysis_Word_Embeddings.ipynb', 'repo_name': 'JoshuaGOB/NLTK', 'size': '627'}