nlp

package
v0.17.0 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2022 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	IsNotName = feature.Class("notName")
	IsName    = feature.Class("name")
)

Variables

This section is empty.

Functions

func BayesWeights

func BayesWeights() map[lang.Language]bayes.Bayes

func TagTokens

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

Types

type BayesF

type BayesF struct {
	Name  string
	Value string
}

BayesF implements 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() []feature.Feature

Jump to

Keyboard shortcuts

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