New progress bar

This commit is contained in:
2019-06-17 17:30:51 +02:00
parent 3552f14b81
commit 70b05e8637
7 changed files with 70 additions and 21 deletions

View File

@@ -2,11 +2,7 @@ from collections import defaultdict
from match import StructureMatch
from representation_assigner import RepresentationAssigner
try:
from tqdm import tqdm
except ImportError:
tqdm = lambda x: x
from progress_bar import progress
class MatchStore:
def __init__(self, args):
@@ -35,7 +31,7 @@ class MatchStore:
yield sm
def set_representations(self, word_renderer):
for _1, sm in tqdm(self.data.items()):
for _1, sm in progress(self.data.items(), "representations"):
RepresentationAssigner.set_representations(sm, word_renderer)
def determine_colocation_dispersions(self):