words

package
v0.0.0-...-eab7c10 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2015 License: BSD-2-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Flatten

func Flatten(srcBytes []byte) []byte

Flatten removes HTML markup returning only CData as a space delimited list of words.

func WordList

func WordList(srcBytes []byte) [][]byte

WordList scans HTML source and returns a list of words found.

Types

type Words

type Words struct {
	Files []string
	Words map[string][]int
}

Words contains the data structures for building a file list and inverted word index.

func New

func New() *Words

New - initialize a new Words structure.

func (*Words) MergeWords

func (w *Words) MergeWords(pathname string, words [][]byte) bool

MergeWords - given a path and list of words update the Words datastructure

func (*Words) ToJSON

func (w *Words) ToJSON() (string, string, error)

ToJSON - render the Words data structure a JSON

Jump to

Keyboard shortcuts

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