wfreq

package
v0.0.0-...-27d64f3 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2019 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Counter

type Counter struct {
	Word      string `json:"word"`
	Frequency int    `json:"frequency"`
}

func WordsFreq

func WordsFreq(texts []string) []Counter

WordsFreq returns a slice containing the frequencies of each word in texts the slice is sorted in descending order of word frequencies

type UserWords

type UserWords struct {
	ID    int       `json:"id"`
	Name  string    `json:"name"`
	Words []Counter `json:"words"`
}

Jump to

Keyboard shortcuts

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