Giter Club home page Giter Club logo

kingdom's Introduction

KinGDOM: Knowledge-Guided DOMain adaptation for sentiment analysis (ACL 2020)

KinGDOM takes a novel perspective on the task of domain adaptation in sentiment analysis by exploring the role of external commonsense knowledge. It utilizes the ConceptNet knowledge graph to enrich the semantics of a document by providing both domain-specific and domain-general background concepts. These concepts are learned by training a graph convolutional autoencoder that leverages inter-domain concepts in a domain-invariant manner. Conditioning a popular domain-adversarial baseline method with these learned concepts helps improve its performance over state-of-the-art approaches, demonstrating the efficacy of the proposed framework.

Alt text

Requirements

  • scipy==1.3.1
  • gensim==3.8.1
  • torch==1.6.0
  • numpy==1.18.2
  • scikit_learn==0.22.2.post1
  • torch_geometric==1.6.3

Execution

Download ConceptNet filtered for English language from here and keep in this root directory.

Preprocess, train and extract graph features:

python preprocess_graph.py
python train_and_extract_graph_features.py

We provide pretrained graph features in the graph_features directory. Note that, executing the above commands will overwrite the provided feature files.

Train the main domain adaptation model:

python train.py

Some of the RGCN functionalities are adapted from https://github.com/JinheonBaek/RGCN

Citation

Please cite the following paper if you find this code useful in your work.

KinGDOM: Knowledge-Guided DOMain adaptation for sentiment analysis. D. Ghosal, D. Hazarika, N. Majumder, A. Roy, S. Poria, R. Mihalcea. ACL 2020.

kingdom's People

Contributors

deepanwayx avatar soujanyaporia avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

kingdom's Issues

4.3 Step 2a, x represents for sentence or document?

Awesome work! There is one point confuses me. At the section of 4.3 Step 2a, x represents document(the whole target domain dataset) or sentence(one sentence of the document), I guess it's the latter.But if it is the latter, whether the 'Commonsense' is for target domain or target sentnce. If posssible, can you mail me the code of graph features [email protected]!

About data preprocessing.

In data preprocessing, how to set sentiment labels in the data,if it is a multi-category sentiment problem, such as ten classes .

Could you please provide the original amazon review dataset instead of bag-of-words version?

Hi, thank you for the brilliant work!
I'd like to develop application on your research and need to verify some points of my interest. Could you please provide the original amazon review dataset that you derive the bow version from?
I know the official website of the dataset https://www.cs.jhu.edu/~mdredze/datasets/sentiment/. But I found that the dataset provided on the official website https://www.cs.jhu.edu/~mdredze/datasets/sentiment/ doesn't match yours on the unlabeled data.
Thanks

Graph features

Hello, thanks a lot for sharing your code!

I'm not very sure how to get the graph features in the folder "graph_features"
I wonder if you could provide the code to train/extract graph features from the Commonsense Graph?

Thanks!

Glove-DANN

could you provide the code of Glove-DANN,please

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.