stylometry

package
v0.0.0-...-4a0a234 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DeltaType      StylometryType = 0
	MendenhallType                = 1
	ChiSquaredType                = 2
)

Variables

This section is empty.

Functions

func ChiSquaredCompareCorpora

func ChiSquaredCompareCorpora(c1, c2 Corpus) float64

func MendenhallCompareCorpora

func MendenhallCompareCorpora(c1, c2 Corpus) float64

Types

type Corpus

type Corpus struct {
	Author     string
	Corpus     []string
	Freq       map[string]int
	MostCommon []pair
}

func NewCorpus

func NewCorpus(text, author string) Corpus

type StylometryResult

type StylometryResult struct {
	Author      string
	Coefficient float64
}

func ChiSquaredMethod

func ChiSquaredMethod(refCorpora []*Corpus, unknownText string) []StylometryResult

func DeltaMethod

func DeltaMethod(refCorpus []*Corpus, unknownText string) []StylometryResult

func MendenhallMethod

func MendenhallMethod(refCorpora []*Corpus, unknownText string) []StylometryResult

type StylometryType

type StylometryType int64

Jump to

Keyboard shortcuts

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