How nv-tung/sentiment-analysis works
This repository is a Vietnamese student-feedback sentiment research project comparing TF-IDF + Logistic Regression, BiLSTM, and PhoBERT. Its main workflow prepares UIT-VSFC text variants, trains or runs models, evaluates predictions primarily with macro-F1, and compares errors. The graph includes the documented notebook-based TF-IDF and preprocessing work alongside sampled model and analysis code. Some notebook and experiment internals were not sampled, so their links reflect README documentation rather than inspected implementation.
Main entry points: run_ablation.py BiLSTM experiments · train.py PhoBERT training · run_experiments.py PhoBERT experiments · loader.py Prediction loader
Components 25
Data and evaluation
- UIT-VSFC splits
data - Prepare text
notebooks/uit_vsfc_notebook.ipynb - Shared evaluation
src/evaluate.py
TF-IDF experiments
- TF-IDF experiments
notebooks/uit_vsfc_notebook.ipynb - TF-IDF results
results
BiLSTM model
- Vocabulary
src/bilstm/vocabulary.py - BiLSTM dataset
src/bilstm/dataset.py - FastText loader
src/bilstm/fasttext_loader.py - BiLSTM classifier
src/bilstm/model.py - BiLSTM training
src/bilstm/train.py - BiLSTM evaluation
src/bilstm/evaluate.py - BiLSTM experiments
src/bilstm/run_ablation.py - BiLSTM results
results/bilstm
PhoBERT model
- PhoBERT dataset
src/phobert/dataset.py - PhoBERT model
src/phobert/model.py - PhoBERT metrics
src/phobert/metrics.py - PhoBERT training
src/phobert/train.py - PhoBERT prediction
src/phobert/predict.py - PhoBERT experiments
src/phobert/run_experiments.py - PhoBERT results
results
Error analysis
- Prediction loader
src/error_analysis/loader.py - Error analysis
src/error_analysis/analyze.py - Analysis visualizations
src/error_analysis/visualize.py - Analysis outputs
results/error_analysis
Other components
- Researcher
Connections 35
- Researcher → Prepare text: runs preparation
README.md - UIT-VSFC splits → Prepare text: provides splits
README.md - Prepare text → TF-IDF experiments: prepares experiments
README.md - Researcher → TF-IDF experiments: runs experiments
README.md - TF-IDF experiments → TF-IDF results: writes results
README.md - Researcher → BiLSTM experiments: runs experiments
src/bilstm/run_ablation.py - BiLSTM experiments → BiLSTM dataset: uses dataset
src/bilstm/run_ablation.py - BiLSTM experiments → Vocabulary: uses vocabulary
src/bilstm/run_ablation.py - BiLSTM dataset → Vocabulary: uses vocabulary
src/bilstm/dataset.py - FastText loader → Vocabulary: uses vocabulary
src/bilstm/fasttext_loader.py - BiLSTM experiments → FastText loader: loads embeddings
src/bilstm/run_ablation.py - BiLSTM experiments → BiLSTM classifier: creates model
src/bilstm/run_ablation.py - BiLSTM experiments → BiLSTM training: trains model
src/bilstm/run_ablation.py - BiLSTM training → BiLSTM evaluation: evaluates model
src/bilstm/train.py - BiLSTM experiments → BiLSTM evaluation: evaluates runs
src/bilstm/run_ablation.py - BiLSTM experiments → BiLSTM results: writes results
src/bilstm/run_ablation.py - BiLSTM experiments → Shared evaluation: uses evaluation
src/bilstm/run_ablation.py - Researcher → PhoBERT experiments: runs experiments
README.md - PhoBERT experiments → PhoBERT training: runs training
src/phobert/run_experiments.py - PhoBERT experiments → Shared evaluation: uses evaluation
src/phobert/run_experiments.py - PhoBERT training → PhoBERT dataset: loads batches
src/phobert/train.py - PhoBERT training → PhoBERT model: uses model
src/phobert/train.py - PhoBERT training → PhoBERT metrics: computes metrics
src/phobert/train.py - PhoBERT training → Shared evaluation: uses evaluation
src/phobert/train.py - PhoBERT model → PhoBERT dataset: uses labels
src/phobert/model.py - PhoBERT prediction → PhoBERT dataset: loads batches
src/phobert/predict.py - PhoBERT prediction → PhoBERT model: runs inference
src/phobert/predict.py - PhoBERT training → PhoBERT results: writes artifacts
src/phobert/train.py - PhoBERT experiments → PhoBERT results: saves experiment outputs
README.md - Researcher → Prediction loader: starts analysis
README.md - Prediction loader → Shared evaluation: computes metrics
src/error_analysis/loader.py - Error analysis → Prediction loader: loads predictions
src/error_analysis/analyze.py - Analysis visualizations → Prediction loader: uses loaded data
src/error_analysis/visualize.py - Error analysis → Analysis outputs: writes analysis
- Analysis visualizations → Analysis outputs: writes figures