Code Monkey home page Code Monkey logo

diachronic_armed_conflicts's Introduction

Diachronic Armed Conflicts

Diachronic armed conflicts prediction with news texts and word embeddings

Code and data for the paper:

One-to-X analogical reasoning on word embeddings: a case for diachronic armed conflict prediction from news texts (in Proceedings of the 1st International Workshop on Computational Approaches to Historical Language Change, 2019) by Andrey Kutuzov, Erik Velldal and Lilja Øvrelid

Embeddings models

Word embeddings we trained can be found at the NLPL Vectors repository:

Running

python3 multanalogies_diachronic.py --testfile TESTFILE [--visual VISUAL] [--year YEAR] [--finyear FINYEAR] [--lmbd LMBD] [--candidates CANDIDATES] [--threshold] [--modeldir MODELDIR]

For example:

python3 multanalogies_diachronic.py --year 2013 --finyear 2015 --testfile 2019_dataset/fulltest.json --threshold --modeldir NoW/

will learn transformation matrices from locations to armed groups on the embeddings from years 2013 and 2014. These projections will be tested on the next years (2014 and 2015 correspondingly). The fulltest.json file will be used as the source of gold data, the system will employ the cosine threshold technique. The word embedding models for all the years must be available in the NoW directory.

Replicating experiments from [Kutuzov et al. 2017]

python3 transform_diachronic.py --modelfile PATH_TO_FIRST_EMBEDDING --reference PATH_TO_FIRST_GOLD_DATA

For example:

python3 transform_diachronic.py --modelfile 2000.bin --reference 2000_single.tsv

will learn the transformation matrix on the embeddings and gold data from 2000 and test it on the next year (2001).

test_all_2017_way.sh will test all the years and output the results to the results.tsv file.

diachronic_armed_conflicts's People

Contributors

akutuzov avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

mountcuthbert

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.