fasttextgo

package module
v0.0.0-...-cede4b1 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2020 License: BSD-3-Clause Imports: 3 Imported by: 0

README

fasttextgo

This project is adopted from: github.com/tim-cheng/fasttextgo

Golang binging for facebook FastText v0.2.0

Need to run make first before usage. For usage details, please refer to test/FastTextDebug.go

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetDimension

func GetDimension(name string) int

func GetMostSimilar

func GetMostSimilar(name, query string, top int) (map[string]float32, error)

func GetWordN

func GetWordN(name string) int

func GetWordVector

func GetWordVector(name, word string) ([]float32, error)

func GetWordVector64

func GetWordVector64(name, word string) ([]float64, error)

func GetWords

func GetWords(name string) ([]string, error)

func LoadModel

func LoadModel(name, path string)

LoadModel - load FastText model

func Predict

func Predict(name, sentence string, topN int) (map[string]float32, error)

Predict - predict, return the topN predicted label and their corresponding probability

func PredictMaxIntention

func PredictMaxIntention(name, sentence string) ([]string, []float32, error)

func RemoveModel

func RemoveModel(name string)

RemoveModel - remove FastText model to free memory

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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