corpus

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package corpus defines the immutable RFC-265 baseline population.

Index

Constants

This section is empty.

Variables

View Source
var FoldPairs = [][2]string{{"A", "a"}, {"\u0130", "i"}, {"\u0131", "I"}, {"\u0264", "\ua7cb"}, {"\u1c89", "\u1c8a"}, {"\ufb05", "\ufb06"}, {"\u0390", "\u1fd3"}, {"\u03b0", "\u1fe3"}, {"\u212a", "K"}, {"\u03c2", "\u03c3"}}
View Source
var Locales = []string{"", "en", "de", "tr", "sv", "zh", "ja", "en-u-kn-true", "de_DE", "zh-Hant-TW", "xx", "\u0131"}
View Source
var Texts = []string{
	"", "A", "a", "ASCII 0123", "caf\u00e9 na\u00efve co\u00f6perate", "\u0130stanbul \u0131i I", "Stra\u00dfe STRASSE \u00df",
	"\u039f\u0394\u039f\u03a3 \u03a3\u039f\u03a6\u039f\u03a3 \u03a3 \u03a3\u0391 \u0391\u03a3. \u0391\u03a3'\u03a3", "\u1f48\u03b4\u03c5\u03c3\u03c3\u03b5\u03cd\u03c2", "\u0391\u03a3\u037a", "\u013f\u03a3", "\u0391\u03a3\ufe70\u0392", "\U00010780\u03a3", "A\u03a3\u0295",
	"x:y", "foo_bar __init__ a_1 _", "\u4e2d\u534e\u4eba\u6c11\u5171\u548c\u56fd", "\ud55c\uad6d\uc5b4 \ubb38\uc7a5\uc785\ub2c8\ub2e4", "\u0645\u0631\u062d\u0628\u0627 \u0628\u0627\u0644\u0639\u0627\u0644\u0645", "\u05e9\u05dc\u05d5\u05dd \u05e2\u05d5\u05dc\u05dd", "\u0928\u092e\u0938\u094d\u0924\u0947 \u0926\u0941\u0928\u093f\u092f\u093e", "\u041f\u0440\u0438\u0432\u0435\u0442 \u043c\u0438\u0440 \u0401\u0416",
	"\u1c89", "\ua7cb", "\ua7ce", "\ua7f1", "\U0001ccd6", "\U0001ccf0", "\u1acf", "\u0897", "\u0264", "\u0295", "\ufb05", "\ufb06", "\u0390", "\u1fd3", "\u03b0", "\u1fe3", "\ua7d3", "\ua7d5", "\U00018cff", "\U000323b0", "\U0002ebf0", "\U00010d40", "\U00011de0", "\U00010d50", "\U00016ea0", "\U00010414", "\U0001d400\U0001d401\U0001d402 \U0001d7d9\U0001d7da", "\u216b \u217b \u2103", "\ufb01nance \ufb02 \u01c5 \u01c6", "\uff21\uff22\uff23\uff11\uff12\uff13 \uff76\uff80\uff76\uff85", "\u0131d", "\u017felect", "\"\u0131d\"", "a\xffb", "\xfe\xff", "\xed\xa0\x80",
}

Texts includes old assigned characters, every upgrade witness and existing Java divergences. Escapes keep the exact corpus independent of font rendering.

Functions

This section is empty.

Types

type Ops

type Ops struct {
	Properties func(rune) uint32
	Lower      func(rune) rune
	Upper      func(rune) rune
	Fold       func(rune) rune
	Normalize  func(int, string) string
	LowerText  func(string) string
	UpperText  func(string) string
	EqualFold  func(string, string) bool
	Tokens     func(string) ([]string, error)
	Collate    func(string, int, string) []byte
}

Ops separates the old compiler's implementation from the pinned implementation.

type Report

type Report struct {
	CodePoints          int
	Scalars             int
	Texts               int
	CollationKeys       int
	PropertiesSHA256    string
	NormalizationSHA256 string
	TextSHA256          string
	CollationSHA256     string
	Samples             []Sample
	FoldPairs           []bool
}

func Capture

func Capture(o Ops) (Report, error)

type Sample

type Sample struct {
	Input  string
	Lower  string
	Upper  string
	Tokens []string
}

Jump to

Keyboard shortcuts

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