Code Monkey home page Code Monkey logo

semeval2020's Introduction

Contextualised Embeddings for Lexical Semantic Change Detection

This code accompanies the paper UiO-UvA at SemEval-2020 Task 1: Contextualised Embeddings for Lexical Semantic Change Detection, which describes our participation in SemEval 2020 Task 1: Unsupervised Lexical Semantic Change Detection.

Extraction of contextualized token embeddings

For ELMo: python3 code/elmo/extract_elmo.py --input <CORPUS> --elmo <ELMO_MODEL> --outfile <OUTFILE> --vocab <TARGET_WORDS>

For BERT: python3 code/bert/collect.py <PATH_TO_MODEL> <CORPUS> <TARGET_WORDS> <OUTFILE>

These scripts produce npz archives containing numpy arrays with token embeddings for each target word in a given corpus.

Estimating semantic change

  • COS algorithm: python3 code/cosine.py -t <TARGET_WORDS> -i0 corpus0.npz -i1 corpus1.npz > cosine_change.txt

  • APD algorithm: python3 code/distance.py <TARGET_WORDS> corpus0.npz corpus1.npz apd_change.txt

  • JSD algorithm: python3 code/jsd.py <TARGET_WORDS> corpus0.npz corpus1.npz jsd_change.txt

These scripts produce plain text files containing lists of words with their corresponding degree of semantic change between corpus0 and corpus1.

Download pre-trained embeddings

ELMo

BERT

Authors

  • Andrey Kutuzov (University of Oslo, Norway)
  • Mario Giulianelli (University of Amsterdam, Netherlands)

SemEval-2020 Task 1 Reference


Dominik Schlechtweg, Barbara McGillivray, Simon Hengchen, Haim Dubossarsky and Nina Tahmasebi. SemEval 2020 Task 1: Unsupervised Lexical Semantic Change Detection. To appear in SemEval@COLING2020.

semeval2020's People

Contributors

glnmario avatar akutuzov avatar lmphcs 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.