BERT + Chinese restaurant reviews = 20-label sentiment soup
A 2018-era notebook collection for fine-grained sentiment analysis that bolts BERT onto a multi-label classification task where every sentence gets tagged across 20 emotional dimensions.

What it does
This repo trains BERT for multi-label sentiment classification on Chinese text from the AI Challenger 2018 competition. Each input gets tagged with multiple fine-grained labels (20 dimensions covering aspects like location, food, service, price, and sentiment polarity). It also includes a TextCNN baseline, pre-training scripts for both models, and a TensorFlow session-based deployment path for online prediction.
The interesting bit
The label format is almost aggressively granular: 0_1,1_-2,2_-2... where each position maps to a specific aspect and the value indicates sentiment strength. The author also experimented with a BERT-CNN hybrid architecture, though the actual performance table has “ADD A NUMBER HERE” placeholders for the BERT results, which is either refreshing honesty or a snapshot frozen in time.
Key highlights
- Supports both fine-tuning and further pre-training of Chinese BERT (
chinese_L-12_H-768_A-12) - Includes a BERT short Chinese tutorial and pre-processed data via Baidu Pan links
- TextCNN baseline with optional masked-language-model pre-training for comparison
- Online prediction setup using explicit TensorFlow session/feed pattern
- Data format is simple two-column TSV: comma-separated labels, then raw text (no tokenization needed)
Caveats
- README has visible rough edges: “Add something here” in Basic Ideas, placeholder F1 scores for BERT variants, and some numbering inconsistencies in the pre-training instructions
- All data downloads require Baidu Pan, which may be inaccessible outside China
- Code appears to target the original 2018 TensorFlow BERT implementation, not the Hugging Face ecosystem most developers use now
Verdict
Worth a look if you’re specifically working on Chinese multi-label sentiment analysis with fine-grained aspect labels, or need a reference for BERT deployment via raw TensorFlow sessions. Most practitioners today would reach for modern transformers libraries instead, but the data preprocessing notebooks and label taxonomy may still save you time if your problem domain overlaps with the AI Challenger task.