analysis

package
v0.0.0-...-a2d4156 Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2019 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package analysis contains the functions needed to analyze lines.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AverageTransitionProbability

func AverageTransitionProbability(line string, occurrences [][]float64, position map[rune]int) (float64, error)

AverageTransitionProbability returns the probability of generating the input string digraph by digraph according to the occurrences matrix.

func GetDigraphs

func GetDigraphs(line string) []structs.Digraph

GetDigraphs returns pairs of adjacent runes, after normalizing the input line.

func MaxForSlice

func MaxForSlice(slice []float64) float64

MaxForSlice returns the maximum value in a float64 slice.

func MinForSlice

func MinForSlice(slice []float64) float64

MinForSlice returns the minimum value in a float64 slice.

func Normalize

func Normalize(line string) []rune

Normalize returns the subset of runes in the line that are in the accepted characters. This helps keeping the model relatively small by ignoring punctuation, symbols, etc.

Types

This section is empty.

Jump to

Keyboard shortcuts

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