diff options
author | Martin Czygan <martin.czygan@gmail.com> | 2021-04-27 10:09:02 +0200 |
---|---|---|
committer | Martin Czygan <martin.czygan@gmail.com> | 2021-04-27 10:09:02 +0200 |
commit | 87ff9eb5dd33719c3947034ea4695c3e27ba6f9d (patch) | |
tree | bd7940b6d7b2ee16a0a9ead9ad9611f7318ee90b /skate/cmd/skate-map | |
parent | 6fe4bf4f15432e5078faf60de23ff8cdee637035 (diff) | |
download | refcat-87ff9eb5dd33719c3947034ea4695c3e27ba6f9d.tar.gz refcat-87ff9eb5dd33719c3947034ea4695c3e27ba6f9d.zip |
add prefix wrapper
Diffstat (limited to 'skate/cmd/skate-map')
-rw-r--r-- | skate/cmd/skate-map/main.go | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/skate/cmd/skate-map/main.go b/skate/cmd/skate-map/main.go index ffe1017..94cf606 100644 --- a/skate/cmd/skate-map/main.go +++ b/skate/cmd/skate-map/main.go @@ -27,18 +27,18 @@ func main() { // XXX: introduce prefixes availableMappers := map[string]skate.Mapper{ "id": skate.Identity, - "ff": skate.CreateFixedMapper(*extraValue), - "title": skate.MapperTitle, - "tnorm": skate.MapperTitleNormalized, - "tnysi": skate.MapperTitleNysiis, - "tsand": skate.MapperTitleSandcrawler, + "field": skate.WithPrefix(skate.CreateFixedMapper(*extraValue), "field"), + "title": skate.WithPrefix(skate.MapperTitle, "title"), + "tnorm": skate.WithPrefix(skate.MapperTitleNormalized, "tnorm"), + "tnysi": skate.WithPrefix(skate.MapperTitleNysiis, "tnysi"), + "tsand": skate.WithPrefix(skate.MapperTitleSandcrawler, "tsand"), } switch { case *mapperName != "": if f, ok := availableMappers[*mapperName]; !ok { log.Fatalf("unknown mapper name: %v", *mapperName) } else { - pp := parallel.NewProcessor(os.Stdin, os.Stdout, f.TSV) + pp := parallel.NewProcessor(os.Stdin, os.Stdout, f.AsTSV) pp.NumWorkers = *numWorkers pp.BatchSize = *batchSize pp.Verbose = *verbose |