adder

package
v0.0.0-...-54b38c5 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Adder

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

func New

func New(opts ...AdderOption) (*Adder, error)

func (*Adder) Add

func (a *Adder) Add(ctx context.Context, ar article.Article) (string, error)

type AdderOption

type AdderOption func(a *Adder)

func WithDB

func WithDB(db article.DB) AdderOption

func WithLogger

func WithLogger(log *slog.Logger) AdderOption

func WithNamedEntityRecognizer

func WithNamedEntityRecognizer(ner NamedEntityRecognizer) AdderOption

func WithSummarizer

func WithSummarizer(sum Summarizer) AdderOption

type NamedEntityRecognizer

type NamedEntityRecognizer interface {
	NER(ctx context.Context, text string) (article.NER, error)
}

type Summarizer

type Summarizer interface {
	Summarize(ctx context.Context, text string) (string, error)
}

Jump to

Keyboard shortcuts

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