Git Product home page Git Product logo

sample_elmo_regression's Introduction

Keras+ELMo regression

This notebook is a sample code of using Keras and ELMo (https://tfhub.dev/google/elmo/2) to predict the informativeness score of sentences. Note: This code sample does not contain the sentence data or model weights. The notebook only contains the preliminary testing results of lager work.

Input

Single sentence formatted for ELMo (e.g., using < BOS > and < EOS > tokens to indicate the beginning and end of each sentence). The model also assumes using a cloze sentence (i.e., a sentence with a blank) as input. The cloze target is indicated as blank (_____).

Model

The notebook contains a simple DNN regression model. One thing to notice is that unlike the original ELMo's LSTM layer outputs, we customized the ELMo embedding layer to extract the contextual information as a single vector, concatenating the L->R vector before the cloze target, and the L<-R vector after the target word.

Output

The dependant variable contains continuous numeric values. This is based on the human annotations that we did not include in this sample code repository. For the quick comparison, we used Spearman's r to evlauate the prediction performance.

sample_elmo_regression's People

Contributors

sungjinnam avatar

Watchers

 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.