nlp

package
v1.6.2 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CosineSimilarity added in v1.6.2

func CosineSimilarity(first []float64, second []float64) float64

func GenerateTokens

func GenerateTokens(s string, vocabSize int, standalones []string) (tokens []string, tokenMap map[string]int)

func GetEmbeddings added in v1.6.2

func GetEmbeddings(tokenized []int, mappings map[string]int, contextSize int, dimensions int, numEpochs int, learningRate float64) [][]float64

func GetMapping added in v1.6.2

func GetMapping(tokens []string) map[string]int

func OpenEmbeddings added in v1.6.2

func OpenEmbeddings(path string) (tokens []string, embeddings [][]float64)

func SaveEmbeddings added in v1.6.2

func SaveEmbeddings(path string, tokens []string, embeddings [][]float64)

func Tokenize

func Tokenize(s string, mappings map[string]int) []int

Types

This section is empty.

Jump to

Keyboard shortcuts

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