Coding Script or Notebook
Google Colab
Academy (Access via Course)

Comprehensive Customer Review Semantic Analysis with Google Cloud NLP & IBM Watson NLU

Customer feedback contains far more than star ratings—this production-ready Google Colab notebook demonstrates how to extract nuanced insights from customer reviews using both Google Cloud Natural Language API and IBM Watson Natural Language Understanding for comparative analysis. Created by Lazarina Stoy for MLforSEO, this comprehensive workflow goes beyond simple sentiment to analyze entity-specific sentiment, document-level emotions, and content moderation flags, providing multiple analytical lenses on the same review corpus. The notebook is specifically designed for batch processing customer reviews with rate limiting, error handling, and Excel output formatted for direct visualization in Google Sheets or Looker Studio dashboards.
The notebook provides complete implementation code for six distinct analytical approaches across two enterprise NLP platforms. With Google Cloud NLP, you’ll extract entity-specific sentiment (showing how customers feel about specific products, features, or aspects mentioned in reviews), document-level sentiment with custom classification logic that combines sentiment score (-1 to +1) and magnitude (emotional intensity) into descriptive labels like “Positive (High Intensity)” or “Fairly Negative (Moderate Intensity)”, and content moderation scores that flag potentially inappropriate or sensitive content with confidence levels per category. With IBM Watson NLU, you’ll analyze document-level sentiment using Watson’s proprietary scoring model, detect five discrete emotions (anger, disgust, fear, joy, sadness) with individual confidence scores for each review, providing psychological insights beyond positive/negative classification. The final section includes utility code to merge all analysis results into a single multi-sheet Excel workbook—entity sentiment, Google sentiment, IBM sentiment, IBM emotions, and moderation results—ready for upload to Google Sheets and visualization in Looker Studio with no additional data transformation required.
Use this for:
‧ Comparative analysis of Google Cloud NLP vs IBM Watson NLU sentiment models to understand how different APIs interpret the same reviews
‧ Extracting entity-specific sentiment to identify which product features, aspects, or mentions drive positive vs negative customer perceptions
‧ Building emotion-aware customer feedback dashboards that go beyond positive/negative to show specific emotions like joy, fear, or frustration
‧ Content moderation at scale to automatically flag reviews that may contain inappropriate content before publication or require manual review
‧ Creating multi-dimensional sentiment analysis combining sentiment scores, emotional intensity, specific emotions, and entity-level insights
‧ Batch processing large review datasets (hundreds or thousands of reviews) with proper rate limiting and error handling for production use
‧ Generating dashboard-ready data exports with all analysis results merged into structured Excel files for immediate visualization
This is perfect for product managers, customer experience teams, and marketing analysts who need to extract actionable insights from customer reviews at scale using enterprise-grade NLP APIs—particularly valuable when you need both entity-level detail (what specifically are customers talking about?) and emotional nuance (how intensely do they feel about it?) beyond simple star ratings.

What’s Included

  • Dual-platform comparison using both Google Cloud NLP and IBM Watson NLU on the same review corpus for comprehensive sentiment analysis
  • Entity-specific sentiment extraction reveals how customers feel about particular products, features, or aspects mentioned in reviews—not just overall sentiment
  • Five-emotion detection with IBM Watson (anger, disgust, fear, joy, sadness) provides psychological depth beyond positive/negative classification, plus content moderation for safety
  • Multi-sheet Excel export functionality combines all analysis results (entity sentiment, document sentiment from both APIs, emotions, moderation scores) into one dashboard-ready file
Academy Resource

Available in Academy

Introduction to Machine Learning for SEOs

This resource is available to academy members.

Access in Academy
Community support
Regular updates