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.
Click to show internal directories.
Click to hide internal directories.