nlp

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2021 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BayesWeights

func BayesWeights() map[lang.Language]*bayes.NaiveBayes

func TagTokens

func TagTokens(
	ts []token.TokenSN,
	d *dict.Dictionary,
	nb *bayes.NaiveBayes,
	thr float64,
)

Types

type BayesF

type BayesF struct {
	// contains filtered or unexported fields
}

BayesF implements bayes.Featurer

func (BayesF) Name

func (b BayesF) Name() bayes.FeatureName

Name is required by bayes.Featurer

func (BayesF) Value

func (b BayesF) Value() bayes.FeatureValue

Value is required by bayes.Featurer

type FeatureSet

type FeatureSet struct {
	Uninomial []BayesF
	Species   []BayesF
	InfraSp   []BayesF
}

FeatureSet splits features into Uninomial, Species, Ifraspecies groups

func NewFeatureSet

func NewFeatureSet(ts []token.TokenSN) FeatureSet

BayesFeatures creates slices of features for a token that might represent genus or other uninomial

func (*FeatureSet) Flatten

func (fs *FeatureSet) Flatten() []bayes.Featurer

type Label

type Label int
const (
	NotName Label = iota
	Name
)

func (Label) String

func (l Label) String() string

Jump to

Keyboard shortcuts

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