Versions in this module Expand all Collapse all v1 v1.0.0 Sep 29, 2026 Changes in this version + const DefaultRepoID + const DefaultRevision + const LabelNonLetter + const LabelNone + const NumLabels + const Version + var ErrChecksumMismatch = errors.New("ichkil: model checksum mismatch") + var ErrInference = errors.New("ichkil: inference error") + var ErrModelLoad = errors.New("ichkil: model load error") + func Argmax(values []float32) int + func Attach(base string, labels []int) string + func ComboToLabel(combo string) int + func Decode(base string, logits []float32, numLabels int) string + func Diacritize(ctx context.Context, text string) (string, error) + func Encode(text string, sym2ID map[string]int, unkID int) []int + func IsArabicLetter(r rune) bool + func LabelToCombo(label int) string + func PredictLabels(ctx context.Context, text string) ([]int, error) + func ResetDefault() + func RuntimeVersion() string + func SHA256OfFile(path string) (string, error) + func SetDefault(d *Diacritizer) + func StripDiacritics(text string) string + func VerifyChecksum(path, expected string) error + type Config struct + MaxSeqLen int + NumTags int + SHA256 string + Sym2ID map[string]int + func LoadConfig(path string) (Config, error) + type Diacritizer struct + func New(ctx context.Context, opts ...Option) (*Diacritizer, error) + func NewFromFiles(modelPath string, opts ...Option) (*Diacritizer, error) + func (d *Diacritizer) Close() error + func (d *Diacritizer) Diacritize(text string) (string, error) + func (d *Diacritizer) MaxSeqLen() int + func (d *Diacritizer) NumLabels() int + func (d *Diacritizer) PredictLabels(text string) ([]int, error) + func (d *Diacritizer) RepoID() string + func (d *Diacritizer) Revision() string + func (d *Diacritizer) String() string + type ModelBundle struct + Config Config + OnnxPath string + RepoID string + Revision string + func ResolveModel(ctx context.Context, cfg *config) (ModelBundle, error) + type Option func(*config) + func WithBaseURL(baseURL string) Option + func WithCacheDir(dir string) Option + func WithConfigPath(path string) Option + func WithNumThreads(n int) Option + func WithRepoID(repoID string) Option + func WithRevision(revision string) Option + func WithToken(token string) Option + func WithoutChecksumVerification() Option