nlp

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2026 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BOW

type BOW map[int]int

func NewBOW

func NewBOW() BOW

type CBOW

type CBOW = []struct {
	Source int
	Bow    BOW
}

func NewCBOW

func NewCBOW() CBOW

type Dictionary

type Dictionary struct {
	ID2Word map[int]string
	Word2ID map[string]int
}

func NewDictionary

func NewDictionary() *Dictionary

func (*Dictionary) AddWord

func (d *Dictionary) AddWord(word string)

func (*Dictionary) AddWords

func (d *Dictionary) AddWords(words []string)

func (*Dictionary) Words2BOW

func (d *Dictionary) Words2BOW(words []string) BOW

func (*Dictionary) Words2CBOW

func (d *Dictionary) Words2CBOW(words []string, window int) CBOW

Jump to

Keyboard shortcuts

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