How suren2787/app-sentiment works
Purpose and execution model
Sentimeter is a Python batch pipeline that collects mobile-app reviews, normalizes them, derives sentiment/category insights, and emits report artifacts. It is run manually in three stages from the README:
1. sentimeter/datacollection/generate-data.py
2. sentimeter/insights/senti.py
3. sentimeter/insights/report.py
There is no indicated server or web-app runtime; filesystem JSON/CSV/HTML artifacts are the integration contract between stages.
Review acquisition
The collection stage orchestrates separate App Store and Google Play Store sources:
• sentimeter/datacollection/generate-data.py
• modules/appstore/asreviews.py
• modules/playstore/psreviews.py
Source adapters are isolated under modules/, allowing store-specific retrieval behavior to remain outside the pipeline orchestration. Collection configuration is expected from sentimeter/datacollection/config_Template.py.
Normalization and persisted collection boundary
Collected reviews are prepared into a shared normalized representation through store-specific preparation scripts:
• sentimeter/datacollection/prepareappstorereviews.py
• sentimeter/datacollection/prepareplaystorereviews.py
• sentimeter/datacollection/results/reviews-normalized.json
reviews-normalized.json is the primary handoff from data collection to insight processing. File handling utilities are centralized in modules/utility/fileops.py.
Language processing
The pipeline includes language detection and translation modules before or during analysis:
• modules/translate/langdetect.py
• modules/translate/langtranslate.py
• sentimeter/insights/getdataforinsights.py
These create a boundary between raw multilingual review text and analysis-ready review content. Translation is an external-service-sensitive concern, though the specific provider is not identified in the repository tree.
Insight derivation
The main analysis entry point is sentimeter/insights/senti.py, which coordinates sentiment processing and likely filtering/category assignment:
• sentimeter/insights/senti.py
• sentimeter/insights/category.py
• sentimeter/insights/getdataforinsights.py
Intermediate and final machine-readable outputs include filtered reviews, sentiment-enriched reviews, category-enriched reviews, and summaries:
• sentimeter/insights/results/reviews-filtered.json
• sentimeter/insights/results/reviews-sentiments.json
• sentimeter/insights/results/reviews-category.json
Summarization and reporting
Insight results are condensed and rendered by the reporting stage:
• sentimeter/insights/summarization.py
• sentimeter/insights/report.py
• sentimeter/insights/display.py
The reporting boundary produces both structured and presentation artifacts:
• sentimeter/insights/results/summary.json
• sentimeter/insights/results/summary.csv
• sentimeter/insights/results/summary.html
• sentimeter/insights/results/diagrams
Primary control flow
Control is sequential and file-backed: store adapters → preparation/normalization → normalized JSON → language/insight processing → filtered/sentiment/category JSON → summarization → CSV/JSON/HTML/diagram reports. The key operational risk is that each command depends on artifacts from prior stages; reruns should preserve schema compatibility at reviews-normalized.json and the sentimeter/insights/results/ outputs.
Main entry points: senti.py Sentiment pipeline · reviews-normalized.json Normalized reviews · summarization.py Summarization · generate-data.py Generate data
Components 20
Data collection
- Collection config
sentimeter/datacollection/config_Template.py - Generate data · Manual collection-stage command.
sentimeter/datacollection/generate-data.py - App Store reviews
modules/appstore/asreviews.py - Google Play reviews
modules/playstore/psreviews.py - Prepare App Store reviews
sentimeter/datacollection/prepareappstorereviews.py - Prepare Play reviews
sentimeter/datacollection/prepareplaystorereviews.py - File operations · Centralizes artifact file handling.
modules/utility/fileops.py - Normalized reviews · Primary collection-to-insights handoff.
sentimeter/datacollection/results/reviews-normalized.json
Insight processing
- Sentiment pipeline · Manual insight-stage command.
sentimeter/insights/senti.py - Analysis-ready reviews · Prepares multilingual reviews for analysis.
sentimeter/insights/getdataforinsights.py - Language detection
modules/translate/langdetect.py - Translation · Provider-sensitive multilingual text translation.
modules/translate/langtranslate.py - Filtered reviews
sentimeter/insights/results/reviews-filtered.json - Sentiment reviews
sentimeter/insights/results/reviews-sentiments.json - Category assignment
sentimeter/insights/category.py - Category reviews
sentimeter/insights/results/reviews-category.json
Reporting
- Summarization
sentimeter/insights/summarization.py - Report generation · Manual reporting-stage command.
sentimeter/insights/report.py - Report display
sentimeter/insights/display.py - Summary artifacts · Structured summaries and rendered report outputs.
sentimeter/insights/results/summary.json
Connections 22
- Collection config → Generate data: configures
- Generate data → App Store reviews: collects from
- Generate data → Google Play reviews: collects from
- App Store reviews → Prepare App Store reviews: reviews
- Google Play reviews → Prepare Play reviews: reviews
- Prepare App Store reviews → Normalized reviews: normalizes
- Prepare Play reviews → Normalized reviews: normalizes
- File operations → Normalized reviews: persists
- Normalized reviews → Sentiment pipeline: input contract
- Sentiment pipeline → Analysis-ready reviews: coordinates
- Analysis-ready reviews → Language detection: detects language
- Language detection → Translation: non-default text
- Analysis-ready reviews → Filtered reviews: filters
- Sentiment pipeline → Sentiment reviews: derives sentiment
- Sentiment pipeline → Category assignment: assigns categories
- Category assignment → Category reviews: writes
- Filtered reviews → Summarization: input
- Sentiment reviews → Summarization: input
- Category reviews → Summarization: input
- Summarization → Report generation: summary data
- Report generation → Report display: renders with
- Report display → Summary artifacts: emits