Practical overview
When it fits
Use it when you want a code-based PyTorch example for classifying comments with GoEmotions labels, or a starting point for comparing its three documented taxonomy schemes.
Who it is for
- Developers building or studying emotion classification for short text.
- Researchers comparing fine-grained emotion labels with broader grouped categories.
Documented uses
- Assign one or more emotion labels and scores to a list of text inputs.
- Train using the original, hierarchical-grouping or Ekman taxonomy.
- Compare reported model results across the three taxonomy configurations.
Requirements & limits
- The original scheme uses 27 emotions plus neutral; group uses positive, negative, ambiguous and neutral; Ekman uses six emotions plus neutral.
- The README documents BERT base cased and pins PyTorch 1.4.0, Transformers 2.11.0 and attrdict 2.0.1.
- The tokenizer setup treats [NAME] and [RELIGION] as additional special tokens.
- The README reports macro-F1 results for development and test sets: original 50.16% and 50.30%, group 69.41% and 70.06%, and Ekman 62.59% and 62.38%.
Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.
Run the documented taxonomy training command
Select one of the repository’s three taxonomies when invoking its training script.
Before you start
- Python 3
- PyTorch 1.4.0
- Transformers 2.11.0
- attrdict 2.0.1
- The repository files and its configuration
Steps
Choose
original,grouporekmanas the taxonomy.From the repository, invoke the command below followed by the chosen taxonomy.
python3 run_goemotions.py --taxonomy
Expected outcome
The script is invoked with the selected taxonomy; the README documents this as the training run command.
Guide limitations
- The README does not provide a separate environment setup procedure.
- This guide covers the documented invocation, not a verified run or a guarantee of compatibility with other dependency versions.
Classify a batch using a provided fine-tuned model
Use the documented Python pipeline pattern to obtain emotion labels and scores for a list of text inputs.
Before you start
- Python with the repository’s documented dependencies: PyTorch 1.4.0, Transformers 2.11.0 and attrdict 2.0.1
- The repository’s
modelandmultilabel_pipelinemodules - A fine-tuned model and tokenizer for one taxonomy
Steps
Choose the original, group or Ekman taxonomy and its corresponding model identifier from the README.
Load the matching
BertTokenizerandBertForMultiLabelClassificationwithfrom_pretrained.Create
MultiLabelPipelinewith the loaded model and tokenizer; the examples set the threshold to 0.3.Pass a list of text strings to the pipeline to receive labels and scores.
Expected outcome
The documented example returns one or more taxonomy labels and associated scores for each input text.
Guide limitations
- The example uses the repository’s custom model and pipeline modules.
- The documented threshold is an example parameter, not a stated universal setting.
- This is documentation-based guidance, not an execution test.
Sources & review
Source record details
- Source availability
- Active
- Sources checked
- 17 October 2026
- Original website title
- monologg/GoEmotions-pytorch · Official homepage title · retained in its source language

