matches=self.db.execute("SELECT MIN(MAX(COUNT(*), ?), ?) FROM ColocationMatches WHERE mid_colocation_id=?",(self.min_freq-1,self.min_freq,colocation_id)).fetchone()[0]
returnmatches>=self.min_freq
defdetermine_colocation_dispersions(self):
step_name='dispersions'
ifself.db.is_step_done(step_name):
@ -124,7 +129,10 @@ class MatchStore:
return
dispersions=defaultdict(int)
forstructure_id,word_tups_strinprogress(self.db.execute("SELECT structure_id, key FROM Colocations"),"dispersion"):
forcolocation_id,structure_id,word_tups_strinprogress(self.db.execute("SELECT colocation_id, structure_id, key FROM Colocations"),"dispersion"):