def open_corpus_volatile(treebank_id, tigerxml_corpus_path, veeroot=True): """Indexes a TIGER-XML corpus using a volatile in-memory index.""" db = sqlite3.connect(":memory:") _index_treebank(tigerxml_corpus_path, db, veeroot) return Corpus(treebank_id, db, EmptyDbProvider())
def _connect(db_path): db = sqlite3.connect(db_path) db.execute("PRAGMA temp_store = MEMORY") return db