Commit fe7339e3 authored by Romain Loth's avatar Romain Loth

list_map: small check if ngram extraction failed

parent b548874f
......@@ -100,6 +100,9 @@ def do_maplist(corpus,
scored_ngrams = query.all()
n_ngrams = len(scored_ngrams)
if n_ngrams == 0:
raise ValueError("No ngrams in cooc table ?")
# results, with same structure as quotas
chosen_ngrams = {
'topgen':{'monograms':[], 'multigrams':[]},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment