4

Currently looking for a good tool to annotate sentences regarding aspects and their respective sentiment polarities.

I'm using SemEval Task 4 as a reference. The following is an example in the training dataset:

<sentence id="2005">
    <text>it is of high quality, has a killer GUI, is extremely stable, is highly expandable, is bundled with lots of very good applications, is easy to use, and is absolutely gorgeous.</text>
    <aspectTerms>
        <aspectTerm term="quality" polarity="positive" from="14" to="21"/>
        <aspectTerm term="GUI" polarity="positive" from="36" to="39"/>
        <aspectTerm term="applications" polarity="positive" from="118" to="130"/>
        <aspectTerm term="use" polarity="positive" from="143" to="146"/>
    </aspectTerms>
</sentence>

Can I easily use doccano for such a task? Or would I be better off using some other tool, such as brat?

2 Answers2

2

You can use sequence labeling feature to annotate the text:

enter image description here

Hironsan
  • 136
  • 3
1

Aspect Based Sentiment Analysis often involves linking aspect terms with polarity terms, e.g. from https://arxiv.org/pdf/2204.05232.pdf:

enter image description here

Since 2022, Doccano also supports relation annotation:

enter image description here

To install Doccano on Ubuntu or Windows (I tested with Ubuntu 20.04 and Windows 10):

# Install conda
wget https://repo.anaconda.com/archive/Anaconda3-2023.03-1-Linux-x86_64.sh 
bash Anaconda3-2023.03-1-Linux-x86_64.sh -b
if ! [[ $PATH =~ "$HOME/anaconda3/bin" ]]; then
  PATH="$HOME/anaconda3/bin:$PATH"
fi
conda init bash
source ~/.bashrc

Install Doccano in a conda virtual env

conda create -n doccanopy310 python=3.10 anaconda conda activate doccanopy310 pip install doccano

Run Doccano. Commands from https://doccano.github.io/doccano/install_and_upgrade_doccano/#install-with-pip# Initialize database. First time only.

doccano init

Create a super user. First time only.

doccano createuser --username admin --password pass

Start a web server.

doccano webserver --port 8000

Then, run from another terminal:

# Start the task queue to handle file upload/download.
doccano task

Doccano can be accessed via http://127.0.0.1:8000/ (even if for some reason, on Windows it says http://0.0.0.0:8000, that was incorrect in my case at least).

Franck Dernoncourt
  • 5,862
  • 12
  • 44
  • 80