Skip to content
/ wego Public
forked from ynqa/wego

Word2Vec, GloVe, and Lexvec in Go!

License

Notifications You must be signed in to change notification settings

dormael/wego

Repository files navigation

Word Embedding in Golang

Build Status GoDoc Go Report Card

This is the implementation of word embedding (a.k.a word representation) models in Golang.

Word Embedding

Word embedding makes word's meaning, structure, and concept mapping into vector space with low dimension. For representative instance:

Vector("King") - Vector("Man") + Vector("Woman") = Vector("Queen")

Like this example, the models generate the vectors that could calculate word meaning by arithmetic operations for other vectors.

Models

  • Word2Vec
    • Distributed Representations of Words and Phrases and their Compositionality [pdf]
  • GloVe
    • GloVe: Global Vectors for Word Representation [pdf]

and more...

Installation

$ go get -u github.com/ynqa/wego
$ bin/wego -h

Usage

tools for embedding words into vector space

Usage:
  wego [flags]
  wego [command]

Available Commands:
  glove       GloVe: Global Vectors for Word Representation
  help        Help about any command
  repl        Search similar words with REPL mode
  search      Search similar words
  word2vec    Word2Vec: Continuous Bag-of-Words and Skip-gram model

Flags:
  -h, --help   help for wego

Use "wego [command] --help" for more information about a command.

For more information about each sub-command, see below:

Demo

Downloading text8 corpus, and training by Skip-Gram with negative sampling.

$ sh demo.sh

Output

Output a file is subject to the following format:

<word> <value1> <value2> ...

About

Word2Vec, GloVe, and Lexvec in Go!

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 96.6%
  • Shell 3.1%
  • Dockerfile 0.3%