textparser

package
v0.0.0-...-43cc0ce Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExtractNouns

func ExtractNouns(text string) map[string]int

ExtractNouns extracts the nouns from a piece of text

func Reduce

func Reduce(m1, m2 map[string]int) map[string]int

Reduce merges two [string]int maps

Types

type Item

type Item struct {
	Word  string
	Count int
}

func MakeWordCloud

func MakeWordCloud(stringMap map[string]int) []Item

MakeWordCloud converts a map (easier to manage duplicates) to an item slice (better for sorting)

func SortCloud

func SortCloud(cloud []Item) []Item

Jump to

Keyboard shortcuts

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