A PHP + MySQL website for annotating PTT comments on three sentiment dimensions (valence, arousal, irony) plus an incomplete-sentence flag. Annotators log in, read a post, and score each comment on a 0–5 scale; progress is saved per user.
The irony annotations collected with this system and its 2021 extension became the CDVAI dataset:
- A Dimensional Valence-Arousal-Irony Dataset for Chinese Sentence and Context (ROCLING 2022)
- A Chinese Dimensional Valence-Arousal-Irony Detection on Sentence-level and Context-level Using Deep Learning Model (IJCLCLP Vol. 27, No. 2, 2022)
- Paper walkthroughs on my blog: ROCLING dataset paper · IJCLCLP detection paper
The Heroku demo was shut down when Heroku ended its free tier.
- Python >= 3 with
pandasand MySQL Connector/Python - XAMPP (Apache + MySQL)
- PHP 7.2
- Start Apache and MySQL in XAMPP.
- Copy this folder under
htdocs/(or/var/www/html/on a Linux server). - Open phpMyAdmin (
http://localhost:8080/phpmyadmin/, adjust the port) and create an empty database namedVAI. - Set the database credentials in
config.php. - Create the annotator accounts: copy
sql_processing/data/user.example.csvtosql_processing/data/user.csvand fill in onename,number,passwordrow per annotator.user.csvis git-ignored, so real accounts never get committed. - Load the schema, accounts, and posts:
cd sql_processing python ./sql_processing.py - Open
http://localhost:8080/annotation_system/and log in with one of the accounts.
The original deployment used the heroku-php-apache2 buildpack: a composer.json pinning "php": "7.2.28", a Procfile containing web: heroku-php-apache2, and the first three lines of index.php uncommented to load Composer's autoloader. Any PHP host with MySQL works the same way.

