text

package
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: Dec 24, 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 Chunk

type Chunk struct {
	ID        uint
	ItemID    uint
	PageIDs   []uint
	Start     uint
	End       uint
	Length    uint
	Text      string
	Embedding []float32
	Score     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, 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