summarizer

package
v0.0.0-...-0f3c21f Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Summarize

func Summarize(body string, sentenceCount int) (string, error)

Summarize - standalone lexrank summarization wrapper

Types

type PersistentSummarizer

type PersistentSummarizer struct {
	// contains filtered or unexported fields
}

PersistentSummarizer wraps a K/V db and stores/retrieves summarized text snippets

func NewPersistentSummarizer

func NewPersistentSummarizer(dbpath string, sentenceCount int) (*PersistentSummarizer, error)

NewPersistentSummarizer creates a persistent summarizer

func (*PersistentSummarizer) Fetch

func (psz *PersistentSummarizer) Fetch(key string) (string, error)

Fetch a summary based on key, returns error if the key doesn't exist

func (*PersistentSummarizer) SummarizeAndStore

func (psz *PersistentSummarizer) SummarizeAndStore(key string, value string) (string, error)

SummarizeAndStore uses a key to point to a summary on disk

Jump to

Keyboard shortcuts

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