Giter Site home page Giter Site logo

omarjnb / target-extraction Goto Github PK

View Code? Open in Web Editor NEW

This project forked from apmoore1/target-extraction

0.0 0.0 0.0 5.95 MB

Target based extraction

Home Page: https://apmoore1.github.io/target-extraction/

License: Apache License 2.0

Python 78.98% Jsonnet 0.74% Jupyter Notebook 20.29%

target-extraction's Introduction

Target Extraction

Build Status codecov

Datasets that can be parsed

In all of our commands and cases we expect the raw data to be downloaded in to the following folder ../target_data/

SemEval 2014 Laptop and Restaurant

The training data can be found here and the test data here

Tutorials

Below we have created a number of notebooks to show how the package works and to explore some of the datasets that are commonly used.

Load and explore datasets

In the following notebook we show how to load in the following two datasets that are commonly used in the literature and explore them with respect to the task of target extraction.

  1. SemEval 2014 task 4 -- Laptop domain.
  2. SemEval 2016 task 5 -- Restaurant domain. Training data can be found here and Test Gold data can be found here

Datasets used for Target Extraction:

  1. SemeEval 2014 task 4 - Laptop 1, 2, 3, 4, 5
  2. SemEval 2016 task 5 - Restaurant 1, 2, 4, 5
  3. SemEval 2014 task 4 - Restaurant 3, 5
  4. SemEval 2015 task 12 - Restaurant 3, 5

Papers that used those datasets numbers:

  1. https://www.aclweb.org/anthology/N19-1242
  2. https://www.aclweb.org/anthology/P18-2094
  3. https://www.aaai.org/Conferences/AAAI/2017/PreliminaryPapers/15-Wang-W-14441.pdf
  4. https://www.aclweb.org/anthology/D17-1310
  5. https://www.ijcai.org/proceedings/2018/0583.pdf

From what I gather of SemEval 2014 data you can have categories and no targets but I have not seen Vice Versa. I have also not seen but I assume you can have a sentence that has neither categories nor targets. There are the following 4 sentiments, positive, negative, neutral, and conflict. I think we want the following flags not_conflict and sentiment_to_nums

Create JSON datasets

SemEval 2014 Laptop

python create_splits.py ../original_target_datasets/semeval_2014/SemEval\'14-ABSA-TrainData_v2\ \&\ AnnotationGuidelines/Laptop_Train_v2.xml ../original_target_datasets/semeval_2014/ABSA_Gold_TestData/Laptops_Test_Gold.xml semeval_2014 ../original_target_datasets/semeval_2014/laptop_json/train.json ../original_target_datasets/semeval_2014/laptop_json/val.json ../original_target_datasets/semeval_2014/laptop_json/test.json

SemEval 2014 Restaurant

python create_splits.py ../original_target_datasets/semeval_2014/SemEval\'14-ABSA-TrainData_v2\ \&\ AnnotationGuidelines/Restaurants_Train_v2.xml ../original_target_datasets/semeval_2014/ABSA_Gold_TestData/Restaurants_Test_Gold.xml semeval_2014 ../original_target_datasets/semeval_2014/restaurant_json/train.json ../original_target_datasets/semeval_2014/restaurant_json/val.json ../original_target_datasets/semeval_2014/restaurant_json/test.json

SemEval 2016 Restaurant

python create_splits.py ../original_target_datasets/semeval_2016/ABSA16_Restaurants_Train_SB1_v2.xml ../original_target_datasets/semeval_2016/EN_REST_SB1_TEST.xml.gold semeval_2016 ../original_target_datasets/semeval_2016/restaurant_json/train.json ../original_target_datasets/semeval_2016/restaurant_json/val.json ../original_target_datasets/semeval_2016/restaurant_json/test.json

Run allennlp

allennlp train config_char.json -s /tmp/something --include-package target_extraction

Results

They can be found within the following folder.

target-extraction's People

Contributors

apmoore1 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.