mix spectre.classifier.dataset (Spectre v0.3.0)

Copy Markdown View Source

Exports classifier training rows from a Spectre agent.

Dataset rows must provide text and label/intent. The export keeps only labels that exist on the agent's route and policy declarations:

on :GREETING, regex: ~r/^hi$/i do
  reply :greeting
end

on :SPAM, via: [:classifier] do
  reply :spam
end

Usage

mix spectre.classifier.dataset MyApp.Agent training/dataset.json --source training/raw.json

Options

  • --source - additional labeled dataset source. May be passed more than once.
  • --pretty - pretty-print JSON output.