corpus

package
v0.0.0-...-17d2028 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2019 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EnglishCorpus

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

func NewEnglishCorpus

func NewEnglishCorpus() EnglishCorpus

Create a new EnglishCorpus by loading unigrams and bigrams from TSV files.

func (EnglishCorpus) Bigrams

func (corpus EnglishCorpus) Bigrams() *m.Bigrams

Get bigrams from the corpus.

func (EnglishCorpus) Clean

func (corpus EnglishCorpus) Clean(s string) string

Clean a string from special characters.

func (EnglishCorpus) Total

func (corpus EnglishCorpus) Total() float64

Get the total number of words in the corpus.

func (EnglishCorpus) Unigrams

func (corpus EnglishCorpus) Unigrams() *m.Unigrams

Get unigrams from the corpus.

Jump to

Keyboard shortcuts

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