seq2seq

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: May 24, 2021 License: BSD-2-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BartForConditionalGeneration

type BartForConditionalGeneration struct {
	*conditionalgeneration.Model
	Tokenizer *sentencepiece.Tokenizer
}

BartForConditionalGeneration contains the Model and the Tokenizer used for conditional generation tasks. For example, Machine Translation and Summarization.

func LoadModel

func LoadModel(modelPath string) (*BartForConditionalGeneration, error)

LoadModel loads a BartForConditionalGeneration from file.

func (*BartForConditionalGeneration) Generate

func (t *BartForConditionalGeneration) Generate(text string) (string, error)

Generate generates new texts starting from the input.

Jump to

Keyboard shortcuts

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