wordemb

package
v0.0.0-...-3c9b827 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 20, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package wordemb creates embedding vectors for text by averaging word vectors.

Index

Constants

This section is empty.

Variables

View Source
var ErrNoEmb = errors.New("no embeddings found for input words")

ErrNoEmb is returned by Vector when none of the input words have an embedding.

Functions

func Vector

func Vector(ft *fasttext.FastText, text []string) ([]float32, error)

Vector creates an embedding vector for the given text by averaging the fastText vectors of the words.

Returns a zero vector and ErrNoEmb if none of the input words are found in the FastText DB.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL