Skip to content

Yevgnen/GloVe-cpp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GloVe Word Vectors Implementation in C++

1 Introduction

This is a C++ beginner’s implementation of GloVe word vectors. During the implementation I learnt lots of C++ including some C++11 features. The project is aimed at studying and the code is not fully tested. Use this project at your own risk!

1.1 Dependencies

  1. Armadillo: C++ linear algebra library
  2. A simple single-header C++11 STL-only argument parser library
  3. cereal - A C++11 library for serialization

1.2 Compilation

I develop this under macOS 10.12.6 using Apple LLVM version 9.0.0 (clang-900.0.38) and cmake version 3.10.0. I don’t known much about C++ cross platform compilation yet. But if you have all dependencies installed, you may try to the following command the project root

mkdir build && cd build && cmake .. -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release && cmake --build .

Once the compilation is finished, you can train GloVe word vectors by running

./build/train [-h]

and perform word analogy task by running

./build/analogy [-h]

Good luck!

2 Reference

  1. Jeffrey Pennington, Richard Socher, and Christopher D. Manning. 2014. GloVe: Global Vectors for Word Representation.

About

GloVe implementation in C++

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published