def g2lpop(request, mini_g2l_metadata): conn = TessMongoConnection('localhost', 27017, None, None, 'g2ltest') for metadata in mini_g2l_metadata: text = Text.json_decode(metadata) ingest_text(conn, text) yield conn obliterate(conn)
def engpop(request, eng_metadata, v3checker): conn = TessMongoConnection('localhost', 27017, None, None, 'engtest') for metadata in eng_metadata: text = Text.json_decode(metadata) ingest_text(conn, text) yield conn obliterate(conn)
def removedb(mini_latin_metadata): conn = TessMongoConnection('localhost', 27017, None, None, 'removedb') for metadata in mini_latin_metadata: text = Text.json_decode(metadata) ingest_text(conn, text) yield conn for coll_name in conn.connection.list_collection_names(): conn.connection.drop_collection(coll_name)
def punctpop(request, mini_punctuation_metadata): conn = TessMongoConnection('localhost', 27017, None, None, 'minitess') for metadata in mini_punctuation_metadata: text = Text.json_decode(metadata) ingest_text(conn, text) yield conn for coll_name in conn.connection.list_collection_names(): conn.connection.drop_collection(coll_name)
def minipop(request, mini_greek_metadata, mini_latin_metadata): conn = TessMongoConnection('localhost', 27017, None, None, 'minitess') conn.create_indices() for metadata in mini_greek_metadata: text = Text.json_decode(metadata) ingest_text(conn, text, enable_multitext=True) for metadata in mini_latin_metadata: text = Text.json_decode(metadata) ingest_text(conn, text, enable_multitext=True) yield conn obliterate(conn)
def minipop(request, mini_greek_metadata, mini_latin_metadata): conn = TessMongoConnection('localhost', 27017, None, None, 'minitess') conn.create_indices() for metadata in mini_greek_metadata: text = Text.json_decode(metadata) ingest_text(conn, text) for metadata in mini_latin_metadata: text = Text.json_decode(metadata) ingest_text(conn, text) yield conn for coll_name in conn.connection.list_collection_names(): conn.connection.drop_collection(coll_name)