mspm

package
v0.0.0-...-2e8956b Latest Latest
Warning

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

Go to latest
Published: May 19, 2018 License: BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Overview

Package mspm provides model that will have collection of trieNodes that represent the patterns to be searched in a document.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type M

type M struct {
	Name string // Name representing mspm model
	// contains filtered or unexported fields
}

M represents mspm-model.

func NewModel

func NewModel(name string) *M

NewModel will return a fresh new model

func (*M) Build

func (model *M) Build(words io.Reader)

Build trie datastructure that accepts multiline list of words.

func (*M) MultiTermMatch

func (model *M) MultiTermMatch(document io.Reader) (output Output, err error)

MultiTermMatch returns all the trie-terms found in document.

type Output

type Output map[string]int32

Output defines the output of mspm. string - Term found in document int32 - Count of term in that document

Jump to

Keyboard shortcuts

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