From 6a5621b75318826be1875194219cc6a41bcd0874 Mon Sep 17 00:00:00 2001 From: Patrick Jentsch Date: Thu, 2 Apr 2020 10:14:43 +0200 Subject: [PATCH] Add Flag to indicate if cpos lists are saved as ranges or lists. --- app/corpora/cqi/models/subcorpora.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/corpora/cqi/models/subcorpora.py b/app/corpora/cqi/models/subcorpora.py index 0e774db0..e84ae2ca 100644 --- a/app/corpora/cqi/models/subcorpora.py +++ b/app/corpora/cqi/models/subcorpora.py @@ -82,7 +82,8 @@ class Subcorpus: match = {'lc': lc, 'c': c, 'rc': rc} matches.append(match) lookups = self.corpus.lookups_by_cpos(cpos_list) - return {'matches': matches, **lookups} + return {'cpos_ranges': (not expand_lists), 'matches': matches, + **lookups} def fdist_1(self, cutoff, field, attribute): return self.client.api.cqp_fdist_1(self._name, cutoff,