Documentation
¶
Overview ¶
Package output renders predictions and quota to the terminal (table), or to json/jsonl/tsv/csv for machine consumers.
Index ¶
- func HumanDuration(sec int) string
- func QuotaFooter(q api.Quota, tier string) string
- func RenderAgify(w io.Writer, f Format, preds []api.AgifyPrediction, withCountry bool) error
- func RenderGenderize(w io.Writer, f Format, preds []api.GenderizePrediction, withCountry bool) error
- func RenderNationalize(w io.Writer, f Format, preds []api.NationalizePrediction) error
- func RenderQuota(w io.Writer, f Format, rl api.RateLimit, now time.Time) error
- type Format
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HumanDuration ¶
func QuotaFooter ¶
QuotaFooter is the one-line summary printed to stderr after a predict/enrich run, unless quiet. Returns "" when there is no quota to show.
func RenderAgify ¶
RenderAgify writes age predictions in the chosen format.
func RenderGenderize ¶
func RenderGenderize(w io.Writer, f Format, preds []api.GenderizePrediction, withCountry bool) error
RenderGenderize writes gender predictions in the chosen format. withCountry adds the country_id column for tabular formats.
func RenderNationalize ¶
RenderNationalize writes nationality predictions in the chosen format.
Types ¶
Click to show internal directories.
Click to hide internal directories.