Coder Social home page Coder Social logo

adam-faulkner / event-tensors Goto Github PK

View Code? Open in Web Editor NEW

This project forked from stonybrooknlp/event-tensors

0.0 0.0 0.0 250.97 MB

Code and Datasets for the AAAI 2018 paper "Event Representations with Tensor-based compositions"

License: Apache License 2.0

Python 95.63% Scala 4.37%

event-tensors's Introduction

event-tensors

Code and Datasets for the AAAI 2018 paper "Event Representations with Tensor-based compositions"

Requirements

  • Tensorflow Version 1.4
  • Python 3.5

Running Pretrained Models

The file get_embeddings.py gives an example script that loads in a pretrained event-tensor model, and given a dataset of SVO triples (in the same format used for training), runs the SVO triples through the model to produce event embeddings, and then prints the embeddings to a text file.

Preprocessing

We use the Open Information Extraction System Ollie to extract triples. The default settings for Ollie will produce triples with long entity and predicate names. To shorten these, you need to run Ollie with the OpenParse flag called expandExtraction set to false. To do this, you need to create your own main file to run Ollie (replacing this example main in the Ollie source) and run it. The main used for parsing the NYT Gigacorpus is provided for reference in the preproc directory. Parts of this file will need to be replaced as needed if using a different dataset.

The above preprocessing step will output a single tuple per line, which wastes quite a bit of space. In order to convert it to the format used in the training the model (one document per line), use the document_on_line.py script in the preproc directory.

event-tensors's People

Contributors

weberna 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.