gnml

package
v0.44.0 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TextPart added in v0.30.0

type TextPart struct {
	// PartNum is the sequence number of the chunk.
	PartNum int

	// Content is the content of the chunk.
	Content string

	// StartOffset is the start offset of the chunk
	// (from the start of the text).
	StartOffset int

	// Length is the length of the chunk.
	Length int
}

TextPart represents a chunk of a text file.

func SplitText

func SplitText(text string, chunkSize, overlap int) []TextPart

Jump to

Keyboard shortcuts

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