Giter Site home page Giter Site logo

gp_debias's Introduction

Gender-preserving Debiasing for Pre-trained Word Embeddings

Masahiro Kaneko, Danushka Bollegala

Code and debiased word embeddings for the paper: "Gender-preserving Debiasing for Pre-trained Word Embeddings" (In ACL 2019). If you use any part of this work, make sure you include the following citation:

@inproceedings{Kaneko:ACL:2019,    
    title={Gender-preserving Debiasing for Pre-trained Word Embeddings},    
    author={Masahiro Kaneko and Danushka Bollegala},    
    booktitle={Proc. of the 57th Annual Meeting of the Association for Computational Linguistics (ACL)},    
    year={2019} 
}

Our experiment settings

  • python==3.7.2
  • gensim==3.7.1
  • numpy==1.16.2
  • pandas==0.24.2
  • torch==1.1.0

How to train yourself

First download the necessary data listed below using following command.

  • Trained glove and gn-glove
  • SemBias dataset
  • Female and male word lists
./download.sh

Perform debiasing for word embeddings and its evaluation. Debiased word embeddings are stored in debiased_embeddings in both bin and txt format. Name of word embeddings to be debiased as glove or gn and give as the first argument. For example,

./run.sh gn

You can also evaluate your word embaddings without training on SemBias:

python eval_word_embeddings.py -i path/to/your/embeddings

Our debiased word embeddings

You can directly download our debiased GP (glove) and GP (gn-glove).

License

See the LICENSE file.

gp_debias's People

Contributors

kanekomasahiro avatar

Watchers

James Cloos 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.