Exemplo n.º 1
0
def validate_map(basemap, dirty=True, sample=False, partial=False):
    with db.ManagedSession() as session:
        query = db.sliced_query(create_query_for_model(session,
                                                       basemap,
                                                       dirty=dirty,
                                                       sample=sample),
                                slice_size=100000)
        return check_coverage(query,
                              json.loads(basemap.phrases_in_map),
                              partial=partial)
Exemplo n.º 2
0
def validate_map(basemap, dirty=True, sample=False, partial=False):
    with db.ManagedSession() as session:
        query = db.sliced_query(create_query_for_model(session, basemap, dirty=dirty, sample=sample), slice_size=100000)
        return check_coverage(query, json.loads(basemap.phrases_in_map), partial=partial)
Exemplo n.º 3
0
def all_terms():
    with db.ManagedSession() as session:
        query = db.sliced_query(filter_query(session.query(Document)), slice_size=100000)
        return count_terms(query)
Exemplo n.º 4
0
def all_terms():
    with db.ManagedSession() as session:
        query = db.sliced_query(filter_query(session.query(Document)),
                                slice_size=100000)
        return count_terms(query)
Exemplo n.º 5
0
 def make_query():
     return sliced_query(filter_query(session.query(Document),
                                      dirty=args.dirty,
                                      sample_size=None),
                         slice_size=args.slice_size)
Exemplo n.º 6
0
 def make_query():
     return sliced_query(filter_query(session.query(Document), dirty=args.dirty, sample_size=None), slice_size=args.slice_size)