corpus

package
v0.56.0 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2026 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Overview

Package corpus reads the labelled evaluation corpus of testdata/corpus: scam.csv, inputs an authority blacklisted, and legit.csv, inputs of verified legitimate entities.

Both files are UTF-8, comma-separated, with the header input,type,label,added_at,note: the input as a user would paste it, its kind as domain.Kind writes it ("domain", "email"…), its label ("scam" or "legit", the one its file holds), the ISO date it was blacklisted or verified, and a free note citing where it comes from.

Index

Constants

This section is empty.

Variables

View Source
var ErrFormat = errors.New("invalid corpus file")

ErrFormat means a corpus file departs from its format. The error locates the line, never quotes a value.

Functions

func Load

func Load(dir string) ([]app.Case, error)

Load reads scam.csv then legit.csv from dir. A case labelled otherwise than its file is rejected with ErrFormat.

func Read

func Read(r io.Reader) ([]app.Case, error)

Read reads the cases of one corpus file.

func WriteReport

func WriteReport(w io.Writer, s app.Score, without []string) error

WriteReport writes s as the Markdown table of the eval-signals skill, naming the sources the run left out, then lists each false alert. The inputs listed are legit ones: no personal data.

Types

This section is empty.

Jump to

Keyboard shortcuts

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