Skip to content

jerbarnes/direct_parsing_to_sent_graph

Repository files navigation

Direct parsing to sentiment graphs

David Samuel, Jeremy Barnes, Robin Kurtz, Stephan Oepen, Lilja Øvrelid and Erik Velldal

University of Oslo, Language Technology Group
University of the Basque Country UPV/EHU, HiTZ Center – Ixa
National Library of Sweden, KBLab


Paper
Pretrained models
Interactive demo on Google Colab

Overall architecture



This repository provides the official PyTorch implementation of our paper "Direct parsing to sentiment graphs" together with pretrained base models for all six datasets (TODO): Darmstadt, MPQA, Multibooked_ca, Multibooked_eu and NoReC.



How to run

🐾   Training

To train PERIN on NoReC, run the following script. Other configurations are located in the perin/config folder.

cd perin
sbatch run.sh config/seq_norec.yaml

🐾   Inference

You can run the inference on the validation and test datasets by running:

python3 inference.py --checkpoint "path_to_pretrained_model.h5" --data_directory ${data_dir}

Citation

@inproceedings{samuel-etal-2022-direct,
    title = "Direct parsing to sentiment graphs",
    author = "Samuel, David  and
      Barnes, Jeremy  and
      Kurtz, Robin  and
      Oepen, Stephan  and
      {\O}vrelid, Lilja  and
      Velldal, Erik",
    booktitle = "Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 2: Short Papers)",
    month = may,
    year = "2022",
    address = "Dublin, Ireland",
    publisher = "Association for Computational Linguistics",
    url = "https://aclanthology.org/2022.acl-short.51",
    doi = "10.18653/v1/2022.acl-short.51",
    pages = "470--478",
    abstract = "This paper demonstrates how a graph-based semantic parser can be applied to the task of structured sentiment analysis, directly predicting sentiment graphs from text. We advance the state of the art on 4 out of 5 standard benchmark sets. We release the source code, models and predictions.",
}