Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ActionHelpDoc = `
p: Label this example as positive.
n: Label this example as negative.
s: Skip this example.
h: Show this help.
e: Exit.
`
View Source
var CommandAnnotate = cli.Command{ Name: "annotate", Usage: "Annotate URLs", Description: ` Annotate URLs using active learning. `, Subcommands: []cli.Command{ { Name: "cli", Usage: "Annotate URLs using cli", Description: ` Annotate URLs using active learning using cli. `, Action: doAnnotate, Flags: []cli.Flag{ cli.BoolFlag{Name: "open-url", Usage: "Open url in background"}, cli.BoolFlag{Name: "filter-status-code-ok", Usage: "Use only examples with status code = 200"}, cli.BoolFlag{Name: "show-active-features"}, }, }, { Name: "slack", Usage: "Annotate URLs using slack", Description: ` Annotate URLs using active learning using slack. `, Action: doAnnotateWithSlack, Flags: []cli.Flag{ cli.StringFlag{Name: "channel"}, cli.BoolFlag{Name: "filter-status-code-ok", Usage: "Use only examples with status code = 200"}, }, }, }, }
Functions ¶
func NextExampleToBeAnnotated ¶
func NextExampleToBeAnnotated(m classifier.MIRAClassifier, examples model.Examples) *model.Example
func ShowActiveFeatures ¶
func ShowActiveFeatures(model classifier.MIRAClassifier, example model.Example, n int)
Types ¶
type ActionType ¶
type ActionType int
const ( LABEL_AS_POSITIVE ActionType = iota LABEL_AS_NEGATIVE HELP SKIP EXIT )
type FeatureWeightPair ¶
type FeatureWeightPairs ¶
type FeatureWeightPairs []FeatureWeightPair
func SortedActiveFeatures ¶
func SortedActiveFeatures(model classifier.MIRAClassifier, example model.Example, n int) FeatureWeightPairs
func (FeatureWeightPairs) Len ¶
func (slice FeatureWeightPairs) Len() int
func (FeatureWeightPairs) Less ¶
func (slice FeatureWeightPairs) Less(i, j int) bool
func (FeatureWeightPairs) Swap ¶
func (slice FeatureWeightPairs) Swap(i, j int)
Click to show internal directories.
Click to hide internal directories.