How idkhowtocodefr/semantic-comment-analyze works
The platform analyzes customer text through a FastAPI service and offers both single-text and CSV batch workflows. Single analysis returns intent, sentiment, optional word-level explanations, and business recommendations; batch processing streams enriched CSV rows. The README also describes entity extraction and model training, though the sampled request orchestrator does not wire entity extraction into its response. The graph reflects source-supported calls and documented capabilities; unsampled details are represented only at existing source paths.
Main entry points: data_handler.py CSV streaming · nlp_engine.py Inference orchestration · server.py FastAPI routes · page.tsx Web app
Components 20
User experience
- Web app
frontend/src/app/page.tsx - Single analysis
frontend/src/components/SingleAnalysisView.tsx - Batch upload
frontend/src/components/BatchProcessingView.tsx
API and workflows
- FastAPI routes
src/api/server.py - CSV streaming
src/data/data_handler.py
Semantic analysis
- Inference orchestration
src/engine/nlp_engine.py - Text embeddings
src/engine/nlp_engine.py - Intent classifier
src/engine/nlp_engine.py - Word explanations
src/engine/nlp_engine.py - Sentiment analysis
src/engine/nlp_engine.py - Irony detection
src/engine/nlp_engine.py - Entity extraction
src/engine/nlp_engine.py - Business heuristics
src/engine/evaluation.py
Model training
- Intent training
src/engine/train_intent.py - Sentiment fine-tuning
src/engine/train_sentiment.py
Other components
- Analyst
- CSV file
- Analysis results
- Training dataset
data/training_data.csv - Intent labels
data/label_mapping.txt
Connections 25
- Analyst → Web app: uses
- Web app → Single analysis: selects view
- Web app → Batch upload: selects view
- Single analysis → FastAPI routes: POST /api/analyze
- FastAPI routes → Inference orchestration: runs inference
- Inference orchestration → Intent classifier: classifies intent
- Inference orchestration → Sentiment analysis: analyzes sentiment
- Inference orchestration → Word explanations: optionally explains
- Sentiment analysis → Irony detection: adjusts sarcasm
- FastAPI routes → Business heuristics: evaluates context
- FastAPI routes → Analysis results: returns JSON
- Single analysis → Analysis results: renders results
- Batch upload → CSV file: uploads
- Batch upload → FastAPI routes: POST /api/batch
- FastAPI routes → CSV streaming: streams processing
- CSV streaming → Text embeddings: embeds text
- CSV streaming → Intent classifier: classifies rows
- CSV streaming → Sentiment analysis: scores rows
- CSV streaming → Business heuristics: evaluates rows
- CSV streaming → Analysis results: streams enriched CSV
- Inference orchestration → Text embeddings: embeds text
- Inference orchestration → Entity extraction: extracts entities
- Intent training → Training dataset: trains from
- Intent training → Intent labels: uses labels
- Sentiment fine-tuning → Training dataset: fine-tunes from