<jupyter_start><jupyter_text>Pandas X - NLTK  Introduction NLTK = Natural Language Toolkit install in conda with: conda install -c conda-forge nltk_data<jupyter_code># then run this:

import nltk
nltk.download()<jupyter_output>showing info https://raw.githubusercontent.com/nltk/nltk_data/gh-pages/index.xml<jupyter_text>Tokenize Words<jupyter_code>from nltk.tokenize import sent_tokenize, word_tokenize
 
data = "All work and no play makes jack a dull boy, all work and no play"
print(word_tokenize(data))<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.08768656716417911, 'fraction_numerical': 0.0, 'mean_word_length': 6.782608695652174, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 8, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 1}, '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': '2', 'dir': 'jupyter-structured-clean-dedup', 'id': '292859', 'license': 'BSD-2-Clause', 'n_tokens_mistral': 201, 'n_tokens_neox': 197, 'n_words': 47, 'path': 'Exercises - Qasim/Python. Pandas, Viz/pandas projects/Untitled.ipynb', 'repo_name': 'k21k/Python-Notes', 'size': '536'}