tokenizer

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2026 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Overview

Package tokenizer provides the stable Phase 1 token estimator.

Index

Constants

View Source
const Version = "estimate/v1"

Variables

This section is empty.

Functions

func Estimate

func Estimate(content []byte) int64

Types

type Estimator

type Estimator struct{}

func (Estimator) Count

func (e Estimator) Count(content []byte) (int, error)

func (Estimator) Estimate

func (Estimator) Estimate(content []byte) int64

func (Estimator) Name

func (Estimator) Name() string

type Tokenizer

type Tokenizer interface {
	Name() string
	Count([]byte) (int, error)
}

Jump to

Keyboard shortcuts

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