Skip to content
intermediatetext

Aspect-Based Sentiment Analysis

Identification of aspect terms in review text with sentiment polarity classification for each aspect. Based on SemEval-2016 Task 5 (ABSA).

PERORGLOCPERORGLOCDATESelect text to annotate

Configuration Fileconfig.yaml

This Potato config reproduces the annotation task. Save it as config.yaml and run potato start config.yaml to try it.

yaml
# Aspect-Based Sentiment Analysis
# Based on Pontiki et al., SemEval 2016
# Paper: https://aclanthology.org/S16-1002/
# Dataset: http://alt.qcri.org/semeval2016/task5/
#
# This task follows the SemEval-2016 Task 5 sentence-level ABSA protocol
# (Subtask 1), which annotates three slots per opinion:
#   1. Aspect Category Detection -- an Entity#Attribute (E#A) pair from a
#      predefined inventory (e.g., FOOD#QUALITY, LAPTOP#PRICE).
#   2. Opinion Target Expression (OTE) -- the span of text naming the target
#      (marked NULL when the target is implicit).
#   3. Sentiment Polarity -- positive, negative, or neutral.
#
# Opinion Target Expression (span):
# - Highlight the exact word/phrase that names the reviewed target.
#
# Aspect Category (E#A) Labels (examples across domains):
# - RESTAURANT#GENERAL, FOOD#QUALITY, SERVICE#GENERAL, AMBIENCE#GENERAL,
#   LAPTOP#GENERAL, LAPTOP#PRICE, DISPLAY#QUALITY, BATTERY#OPERATION_PERFORMANCE,
#   HOTEL#GENERAL, ROOMS#GENERAL
#
# Sentiment Polarity Labels (sentence-level, SemEval-2016 Subtask 1):
# - Positive: Favorable opinion toward the aspect
# - Negative: Unfavorable opinion toward the aspect
# - Neutral: Mildly positive/negative or no clear polarity
# (Note: the "conflict" label used in SemEval-2014 was dropped for the
#  sentence-level 2016 subtask.)

annotation_task_name: "Aspect-Based Sentiment Analysis"
task_dir: "."

data_files:
  - sample-data.json

item_properties:
  id_key: "id"
  text_key: "text"

output_annotation_dir: "annotation_output/"
output_annotation_format: "json"

port: 8000
server_name: localhost

annotation_schemes:
  - annotation_type: span
    name: opinion_target_expression
    description: "Highlight the Opinion Target Expression (OTE): the exact word or phrase naming the target being evaluated."
    labels:
      - "Opinion Target"

  - annotation_type: radio
    name: aspect_category
    description: "Select the aspect category (Entity#Attribute pair) toward which the opinion is expressed."
    labels:
      - "RESTAURANT#GENERAL"
      - "FOOD#QUALITY"
      - "SERVICE#GENERAL"
      - "AMBIENCE#GENERAL"
      - "LAPTOP#GENERAL"
      - "LAPTOP#PRICE"
      - "DISPLAY#QUALITY"
      - "BATTERY#OPERATION_PERFORMANCE"
      - "HOTEL#GENERAL"
      - "ROOMS#GENERAL"

  - annotation_type: radio
    name: sentiment_polarity
    description: "What is the sentiment expressed toward the identified aspect?"
    labels:
      - "Positive"
      - "Negative"
      - "Neutral"
    keyboard_shortcuts:
      "Positive": "1"
      "Negative": "2"
      "Neutral": "3"
    tooltips:
      "Positive": "The reviewer expresses a favorable opinion about this aspect"
      "Negative": "The reviewer expresses an unfavorable opinion about this aspect"
      "Neutral": "The reviewer mentions the aspect with only mild or no clear positive/negative sentiment"

annotation_instructions: |
  You will be shown a review sentence from a specific domain. Following the
  SemEval-2016 Task 5 sentence-level protocol, for each opinion expressed:
  1. Highlight the Opinion Target Expression (OTE) -- the exact word or phrase
     that names the target being evaluated (e.g., "battery life", "waiter").
     Leave the span empty if the target is implicit (NULL).
  2. Select the aspect category as an Entity#Attribute (E#A) pair
     (e.g., FOOD#QUALITY, LAPTOP#PRICE).
  3. Classify the sentiment polarity expressed toward it as
     positive, negative, or neutral.

html_layout: |
  <div style="padding: 15px; max-width: 800px; margin: auto;">
    <div style="background: #fefce8; border: 1px solid #fde68a; border-radius: 8px; padding: 12px; margin-bottom: 12px;">
      <strong style="color: #a16207;">Domain:</strong>
      <span style="font-size: 15px;">{{domain}}</span>
    </div>
    <div style="background: #f0f9ff; border: 1px solid #bae6fd; border-radius: 8px; padding: 16px; margin-bottom: 16px;">
      <strong style="color: #0369a1;">Review:</strong>
      <p style="font-size: 16px; line-height: 1.7; margin: 8px 0 0 0;">{{text}}</p>
    </div>
  </div>

allow_all_users: true
instances_per_annotator: 50
annotation_per_instance: 2
allow_skip: true
skip_reason_required: false

Sample Datasample-data.json

json
[
  {
    "id": "absa_001",
    "text": "The battery life on this phone is incredible, lasting a full two days with heavy usage.",
    "domain": "Electronics"
  },
  {
    "id": "absa_002",
    "text": "The food was delicious but the service was extremely slow and the waiter was rude.",
    "domain": "Restaurants"
  }
]

// ... and 8 more items

Get This Design

View on GitHub

Clone or download from the repository

Quick start:

git clone https://github.com/davidjurgens/potato-showcase.git
cd potato-showcase/semeval/2016/task05-aspect-sentiment
potato start config.yaml

Dataset & paper

Pontiki et al., SemEval 2016

Citation (BibTeX)

bibtex
@inproceedings{pontiki-etal-2016-semeval,
    title = "{S}em{E}val-2016 Task 5: Aspect Based Sentiment Analysis",
    author = "Pontiki, Maria and Galanis, Dimitris and Papageorgiou, Haris and Androutsopoulos, Ion and Manandhar, Suresh and AL-Smadi, Mohammad and Al-Ayyoub, Mahmoud and Zhao, Yanyan and Qin, Bing and De Clercq, Orphee and Hoste, Veronique and Apidianaki, Marianna and Tannier, Xavier and Loukachevitch, Natalia and Kotelnikov, Evgeniy and Bel, Nuria and Jimenez-Zafra, Salud Maria and Eryigit, Gulsen",
    booktitle = "Proceedings of the 10th International Workshop on Semantic Evaluation ({S}em{E}val-2016)",
    month = jun,
    year = "2016",
    address = "San Diego, California",
    publisher = "Association for Computational Linguistics",
    url = "https://aclanthology.org/S16-1002",
    doi = "10.18653/v1/S16-1002",
    pages = "19--30"
}

Details

Annotation Types

spanradio

Domain

SemEvalNLPSentiment AnalysisAspect Extraction

Use Cases

Aspect ExtractionSentiment AnalysisOpinion Mining

Tags

semevalsemeval-2016shared-taskaspect-sentimentabsaopinion-miningreviews

Found an issue or want to improve this design?

Open an Issue