Documentation
¶
Overview ¶
Package tag implements the core of span-tag: it runs a configuration forest of filters over intermediate schema records to produce a stream of tagged records.
Index ¶
Constants ¶
const DefaultPrefs = "85 55 89 60 50 105 34 101 53 49 28 48 121"
DefaultPrefs is the default source id preference order, most preferred first.
const LowPrio = 9999
LowPrio number, something that is larger than the number of data sources currently.
Variables ¶
This section is empty.
Functions ¶
func LoadTagger ¶
func LoadTagger(config, unfreeze, expand string, verbose bool) (tagger filter.Tagger, cleanup func(), err error)
LoadTagger builds a filter.Tagger from a config (JSON string or file path), an optional frozen filterconfig, and optional meta-ISIL expansion rules (JSON string or file path). The returned cleanup function must be called to remove any temporary files created while unfreezing.
Types ¶
type Config ¶
type Config struct {
Server string
Prefs string
Verbose bool
IgnoreSameIdentifier bool
DropDangling bool
BatchSize int
NumWorkers int
}
Config holds the tunables for a tag run.
type SelectResponse ¶
type SelectResponse struct {
Response struct {
Docs []struct {
ID string `json:"id"`
Institution []string `json:"institution"`
SourceID string `json:"source_id"`
} `json:"docs"`
NumFound int64 `json:"numFound"`
Start int64 `json:"start"`
} `json:"response"`
ResponseHeader struct {
Params struct {
Q string `json:"q"`
Wt string `json:"wt"`
} `json:"params"`
QTime int64
Status int64 `json:"status"`
} `json:"responseHeader"`
}
SelectResponse with reduced fields.