aboutsummaryrefslogtreecommitdiffstats
path: root/python
diff options
context:
space:
mode:
Diffstat (limited to 'python')
-rw-r--r--python/refcat/tasks.py25
1 files changed, 25 insertions, 0 deletions
diff --git a/python/refcat/tasks.py b/python/refcat/tasks.py
index 6d7bf56..c082e0a 100644
--- a/python/refcat/tasks.py
+++ b/python/refcat/tasks.py
@@ -659,3 +659,28 @@ class BrefZipArxiv(Refcat):
def output(self):
return luigi.LocalTarget(path=self.path(ext="json.zst"), format=Zstd)
+
+
+class BrefZipFuzzy(Refcat):
+ """
+ Run skate-reduce from two files, fuzzy mode.
+ """
+ mapper = luigi.Parameter(default="ts", description="mapper short name")
+
+ def requires(self):
+ return {
+ "refs": RefsMapped(mapper=self.mapper),
+ "fatcat": FatcatMapped(mapper=self.mapper),
+ }
+
+ def run(self):
+ output = shellout(r"""
+ skate-reduce -m fuzzy -F <(zstdcat -T0 {refs}) -L <(zstdcat -T0 {fatcat}) |
+ zstd -c -T0 > {output}
+ """,
+ refs=self.input().get("refs").path,
+ fatcat=self.input().get("fatcat").path)
+ luigi.LocalTarget(output).move(self.output().path)
+
+ def output(self):
+ return luigi.LocalTarget(path=self.path(ext="json.zst"), format=Zstd)