NLTK Tokenization & Stemming
๐น 1. Setup
import nltk
nltk.download('punkt') # Download tokenizer models
โ๏ธ 2. Sentence Tokenization
from nltk.tokenize import sent_tokenize
corpus = "I am Sahana. I love cats."
sentences = sent_tokenize(corpus)
print(sentences)
๐น Output:
['I...
machinelearningg.hashnode.dev2 min read