web

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2026 License: MIT Imports: 25 Imported by: 0

Documentation

Overview

Package web provides web, proxy, and HTTP utility commands.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConfidenceScore

func ConfidenceScore(original, optimized string, entities []string) float64

ConfidenceScore measures entity preservation after optimization.

Types

type ProxyConfig

type ProxyConfig struct {
	ListenAddr   string            `toml:"listen_addr"`
	TargetURL    string            `toml:"target_url"`
	ModelAliases map[string]string `toml:"model_aliases"`
	TLSEnabled   bool              `toml:"tls_enabled"`
	TLSCertFile  string            `toml:"tls_cert_file"`
	TLSKeyFile   string            `toml:"tls_key_file"`
	Enabled      bool              `toml:"enabled"`
}

ProxyConfig holds proxy server configuration.

type URLEntityProtection

type URLEntityProtection struct {
	// contains filtered or unexported fields
}

URLEntityProtection protects critical entities during HTML stripping.

func NewURLEntityProtection

func NewURLEntityProtection() *URLEntityProtection

NewURLEntityProtection creates entity protection for tickers, dates, money.

func (*URLEntityProtection) Protect

func (p *URLEntityProtection) Protect(text string) (string, []string)

Protect extracts and protects entities from text.

Jump to

Keyboard shortcuts

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