Skip to content

Commit

Permalink
Bypasses the raw_env check if list by segment re: #801
Browse files Browse the repository at this point in the history
This change partially undoes f359d5e where I made the summary result to have a 0 frequency row when the search has no hit. The introduction of 0 frequency rows was due to the new way of summary presentation. It is not relevant to the old way.
  • Loading branch information
stannam committed May 3, 2022
1 parent 5388a42 commit f3e37e3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion corpustools/gui/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -591,7 +591,7 @@ def _summarize(self, segsum):
pass
segenvfilters = seg, envs[i], filters, tier, res_type # segs + envs + (freq and phoneme/syllable count filters) + result_type
if res_type == 'positive': # if positive search
if line['raw_env'][i] is not None: # then check if the word is in results for satisfying env[i]
if line['raw_env'][i] is not None or segsum: # then check if the word is in results for satisfying env[i]
typefreq[segenvfilters] += 1 # if so, +1 in the type freq
tokenfreq[segenvfilters] += line['Word'].frequency # and add token freq accordingly
else:
Expand Down

0 comments on commit f3e37e3

Please sign in to comment.