text

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Chunk

type Chunk struct {
	ID        uint
	ItemID    uint
	PageIDs   []uint
	Start     uint
	End       uint
	UUID      string
	Text      string
	Embedding []float32
	Distance  float64
}

type ItemText

type ItemText struct {
	Path    string
	TitleID uint
	PageIDs []uint
}

type Text

type Text interface {
	TextToChunks(titleID uint) ([]Chunk, error)
	ChunkText(Chunk) string
}

func New

func New(cfg config.Config, stg storage.Storage) Text

Jump to

Keyboard shortcuts

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