GithubHelp home page GithubHelp logo

pauldevos / word-embeddings-and-document-vectors Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ashokc/word-embeddings-and-document-vectors

0.0 1.0 0.0 812 KB

An evaluation of word-embeddings for classification

Python 93.68% Shell 6.32%

word-embeddings-and-document-vectors's Introduction

Word Embeddings and Document Vectors

This is the source code to go along with the series of blog articles

The code employs,

  • Elasticsearch (localhost:9200) as the repository

    1. to save tokens to, and get them as needed.
    2. to save word-vectors (pre-trained or custom) to, and get them as needed.
  • See the Pipfle for Python dependencies

Usage

  1. Generate tokens for the 20-news corpus & the movie review data set and save them to Elasticsearch.

    • The dataset for 20-news is downloaded as part of the script. But you need to download the movie review dataset separately.
    • The shell script & python code in the folders text-data/twenty-news & text-data/acl-imdb
  2. Generate custom word vectors for the two text corpus in 1 above and save them to Elasticsearch. text-data/twenty-news/vectors & text-data/acl-imdb/vectors directories have the scripts

  3. Process pre-trained vectors and save them to Elasticsearch. Look into pre-trained-vectors/ for the code. You need to download the actual published vectors from their sources. We have used Word2Vec, Glove and FastText in these articles.

  4. The script run.sh can be configured to run whichever combination of the pipeline steps.

  5. The logs contain the F-scores and timing results. Create a "logs" directory before running the run.sh script

    mkdir logs

word-embeddings-and-document-vectors's People

Contributors

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