ai

package
v1.2.2 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2026 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 Dictionary

type Dictionary struct {
	Entries []Entry `yaml:"entries"`
}

Dictionary is the AI pattern dictionary loaded from YAML.

func LoadDictionary

func LoadDictionary(path string) (*Dictionary, error)

LoadDictionary reads, parses, and validates an AI dictionary YAML file.

func ParseDictionary

func ParseDictionary(data []byte) (*Dictionary, error)

ParseDictionary parses and validates dictionary content.

func (*Dictionary) Validate

func (d *Dictionary) Validate() error

type Entry

type Entry struct {
	ID       string `yaml:"id"`
	Category string `yaml:"category"`
	Title    string `yaml:"title"`
	Code     string `yaml:"code"`
}

Entry is one code pattern to compare against submissions.

type ValidationError

type ValidationError struct {
	Problems []string
}

ValidationError aggregates schema/quality issues for a dictionary.

func (*ValidationError) Error

func (e *ValidationError) Error() string

Jump to

Keyboard shortcuts

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