Giter VIP home page Giter VIP logo

huang_et_al_2012's Introduction

##########################################################################################
# Word Vectors Training Code
# 
# Improving Word Representations via Global Context and Multiple Word Prototypes
# Annual Meeting of the Association for Computational Linguistics (ACL), 2012.
# Eric H. Huang, Richard Socher, Christopher D. Manning, Andrew Y. Ng
# Computer Science Department
# Stanford University
##########################################################################################


This package is available for download at
http://ai.stanford.edu/~ehhuang/. It includes the training code for
the global-context-aware neural language model described in the paper.

Please cite the paper if you use the code:

@inproceedings{HuangEtAl2012,
author = {Eric H. Huang and Richard Socher and Christopher D. Manning and Andrew Y. Ng},
title = {Improving Word Representations via Global Context and Multiple Word Prototypes},
booktitle = {Annual Meeting of the Association for Computational Linguistics (ACL)},
year = 2012
}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%                                                   %
%                Running the Code                   %
%                                                   %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

- You can train the word embeddings by running

  ./code/trainEmb.m

  in Matlab.

- To train word embeddings on your own corpus, you need to provide 3 files, as described in the comments
  at the top of ./code/trainEmb.m

- Examples of these 3 files are also included in this package.

- After training, you can get the word embeddings by running the following commands in Matlab.

  load('savedParams/iter<N>.mat');
  [~, ~, ~, ~, We] = stack2param(theta, params.decodeInfo);

  You need to replace <N> with the actual iteration number you want to load. We is the matrix
  of the word embeddings where column i is the embedding for word i.





- Note that the code is highly optimized for speed, so it might be hard to understand.

---------------------------------------------------------------------------
last modified: 7/27/2012

huang_et_al_2012's People

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.