NLTK

NLTK (Natural Language Toolkit): the classic Python library for tokenisation, stemming, tagging, parsing and corpora, and where it still fits.

NLTK is where many people (me included) learned NLP. It is excellent for teaching and quick linguistic analysis.

What I work with

  • Tokenisers, stemmers (Porter), lemmatisers (WordNet).
  • POS tagging, chunking, corpora access.
  • Not my choice for high-throughput production pipelines.

Example

import nltk
nltk.download("punkt_tab"); nltk.download("averaged_perceptron_tagger_eng")
tokens = nltk.word_tokenize("Quantum computers threaten elliptic-curve signatures.")
print(nltk.pos_tag(tokens))

spaCy · AI & NLP

References