| Top | The Data | Basic NLTK | Vader Scoring | Pre-trained Roberta | Comparing Models | Quick Pipelining |
NLP with NLTK & Transformers
| YouTube | Hugging Face Models | Project Notebook | | |
- VADER (Valence Aware Dictionary and Sentiment Reasoner) - bag of words approach
- Roberta pretrainind model from Hugging Face - more advanced, transformer model
- Huggingface Pipeline


| Top | The Data | Basic NLTK | Vader Scoring | Pre-trained Roberta | Comparing Models | Quick Pipelining |
The Data
- Sentiment analysis performed on Amazon fine food text reviews
- Also includes a rating out of 5 stars
- CSV format


| Top | The Data | Basic NLTK | Vader Scoring | Pre-trained Roberta | Comparing Models | Quick Pipelining |
Basic NLTK
- NLTK Tutorial
- Parts of speech labels


| Top | The Data | Basic NLTK | Vader Scoring | Pre-trained Roberta | Comparing Models | Quick Pipelining |
Vader Sentiment Scoring
Using a 'bag of words' approach
- stopwords are removed (such as and, the, an)
- each word is scored and then combined for a total score
Reducing Data Size
Getting polarity scores
DataFrame with sentiments
Polarity Compound Score versus Amazon Customer Review in Stars
Vader sentiment ratings vs stars


| Top | The Data | Basic NLTK | Vader Scoring | Pre-trained Roberta | Comparing Models | Quick Pipelining |
Roberta Pretrained Model
- Also takes into account context and more subtle, connotational meanings
- transformer-based, deep learning models like this pick up on the relationships between words and contexts
- these are Hugging Face models
- this model has been pretrained extensively on sentiment data
Defining Roberta Model
Vader results on example
Roberta results on example
Roberta output format
Unscaled scores
Softmax scores
Putting scores into a dict
polarity_scores_roberta(example)
Getting results on dataframe of length 11,111


| Top | The Data | Basic NLTK | Vader Scoring | Pre-trained Roberta | Comparing Models | Quick Pipelining |
Comparing Model Scores
Sentiment analysis comparison
1 star: Roberta model correctly scored positive
1 star: Vader model incorrectly scored positive
5 stars: Roberta model scored negative (all caps, maybe?)
5 stars: Vader model scored negative


| Top | The Data | Basic NLTK | Vader Scoring | Pre-trained Roberta | Comparing Models | Quick Transformer Pipelining |
Transformer Pipeline
- Hugging Face Transformers

| Top | The Data | Basic NLTK | Vader Scoring | Pre-trained Roberta | Comparing Models | Quick Pipelining |