Skip to main content

Word Embedder

Project description

# word-embedder



Get pretrained word embedding

## Installation

### Requirements
* Linux
* Python 3.6 and up

`$ pip install word-embedder`

## Usage

### Lookup all existed embedders

from word_embedder import lib

lib.list_all_embedders() # returns a list of embedder name


### Use an existed embedder

1. load an embedder called OHOH

from word_embedder import lib

name = 'OHOH' # embedder name
embedder = lib[name]


2. extract a word vector

- (1) given a word 'juice' (str)

word = 'juice'
embedder[word] # returns the corresponding word vector

# Note: if 'juice' is not in the vocabulary,
# OOVError would be raised.


- (2) given an index 3 (int)

index = 3
embedder[index] # returns the corresponding word vector

# Note: if the index is out of range of vocabulary size,
# OOVError would be raised.


Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for word-embedder, version 1.0.0
Filename, size File type Python version Upload date Hashes
Filename, size word_embedder-1.0.0-py3-none-any.whl (15.6 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size word-embedder-1.0.0.tar.gz (7.9 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page