Set list/range flag in events.py instead of the export function

This commit is contained in:
Patrick Jentsch 2020-04-02 10:36:59 +02:00
parent 452fb37b99
commit b8a086f389
2 changed files with 2 additions and 2 deletions

View File

@ -82,8 +82,7 @@ class Subcorpus:
match = {'lc': lc, 'c': c, 'rc': rc} match = {'lc': lc, 'c': c, 'rc': rc}
matches.append(match) matches.append(match)
lookups = self.corpus.lookups_by_cpos(cpos_list) lookups = self.corpus.lookups_by_cpos(cpos_list)
return {'cpos_ranges': (not expand_lists), 'matches': matches, return {'matches': matches, **lookups}
**lookups}
def fdist_1(self, cutoff, field, attribute): def fdist_1(self, cutoff, field, attribute):
return self.client.api.cqp_fdist_1(self._name, cutoff, return self.client.api.cqp_fdist_1(self._name, cutoff,

View File

@ -81,6 +81,7 @@ def pj_corpus_analysis_query(query):
break break
chunk = results.export(context=context, cutoff=chunk_size, chunk = results.export(context=context, cutoff=chunk_size,
expand_lists=True, offset=chunk_start) expand_lists=True, offset=chunk_start)
chunk.cpos_ranges = False
if (results.size == 0): if (results.size == 0):
progress = 100 progress = 100
else: else: