Skip to content

Hands-on NLP techniques in Python for marketers tokenization, TF-IDF, clustering, sentiment analysis, and transformer models.

License

Notifications You must be signed in to change notification settings

joedom99/nlp-examples-using-python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

NLP Examples Using Python — A Marketer’s Guide to How Machines Understand Language

Python
PyTorch
HuggingFace
NLTK
License: MIT

Open In Colab

This repository contains the Python code examples from my article
“A Marketer’s Guide to NLP: How Machines Actually Process and Understand Language.”
It walks through NLP from the basics (tokenization, TF-IDF) to modern transformer-based models
(Sentence Transformers, DistilBART summarization, RAG, AI Agents, and more) using practical marketing-style examples.

Here's a link to the article - https://blog.marketingdatascience.ai/a-marketers-guide-to-nlp-how-machines-actually-process-and-understand-language-3d452febb3de


🚀 What This Project Covers

  • Tokenization, stop words, stemming, and lemmatization (NLTK)
  • TF-IDF vectorization for word importance
  • Word embeddings using Sentence Transformers (all-MiniLM-L6-v2)
  • Topic modeling with LDA (Latent Dirichlet Allocation)
  • Document clustering using K-Means
  • Supervised sentiment analysis with VADER
  • Transformer-based text summarization (DistilBART)
  • Intro to RAG & Agentic AI concepts

âś… Designed For

âś” Marketing analysts
âś” Students & data science beginners
✔ Anyone curious how tools like ChatGPT actually “understand” language

No advanced math required — each section is explained step-by-step using real marketing-style examples.


đź”§ Technologies Used

  • Python 3.10
  • PyTorch
  • Hugging Face Transformers
  • Sentence Transformers
  • NLTK
  • scikit-learn
  • (Optional) Matplotlib for clustering visualizations

đź“„ License

This project is licensed under the MIT License — feel free to use or modify it with credit.


If you find this helpful, follow my work on marketing analytics + AI at
👉 https://blog.marketingdatascience.ai

About

Hands-on NLP techniques in Python for marketers tokenization, TF-IDF, clustering, sentiment analysis, and transformer models.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published