Also remember representations step.
This commit is contained in:
parent
33528f1495
commit
07242f74c8
|
@ -90,6 +90,11 @@ class MatchStore:
|
|||
yield StructureMatch.from_db(self.db, cid[0], structure)
|
||||
|
||||
def set_representations(self, word_renderer, structures):
|
||||
step_name = 'representation'
|
||||
if self.db.is_step_done(step_name):
|
||||
print("Representation step already done, skipping")
|
||||
return
|
||||
|
||||
structures_dict = {s.id: s for s in structures}
|
||||
num_representations = int(self.db.execute("SELECT Count(*) FROM Colocations").fetchone()[0])
|
||||
for cid, sid in progress(self.db.execute("SELECT colocation_id, structure_id FROM Colocations"), "representations", total=num_representations):
|
||||
|
@ -101,6 +106,7 @@ class MatchStore:
|
|||
INSERT INTO Representations (colocation_id, component_id, text)
|
||||
VALUES (?,?,?)""", (match.match_id, component_id, text))
|
||||
|
||||
self.db.step_is_done(step_name)
|
||||
|
||||
def determine_colocation_dispersions(self):
|
||||
step_name = 'dispersions'
|
||||
|
|
Loading…
Reference in New Issue
Block a user