adding separate database class
This commit is contained in:
@@ -16,6 +16,7 @@ from match_store import MatchStore
|
||||
from word_stats import WordStats
|
||||
from writer import Writer
|
||||
from loader import load_files
|
||||
from database import Database
|
||||
|
||||
|
||||
def match_file(words, structures):
|
||||
@@ -37,8 +38,9 @@ def match_file(words, structures):
|
||||
def main(args):
|
||||
structures, lemma_msds, max_num_components = build_structures(args)
|
||||
|
||||
database = Database(args)
|
||||
match_store = MatchStore(args)
|
||||
word_stats = WordStats(lemma_msds)
|
||||
word_stats = WordStats(lemma_msds, database)
|
||||
|
||||
if args.parallel:
|
||||
num_parallel = int(args.parallel)
|
||||
@@ -139,6 +141,11 @@ if __name__ == '__main__':
|
||||
parser.add_argument('--sort-reversed',
|
||||
help="Sort in reversed ored", action='store_true')
|
||||
|
||||
parser.add_argument('--db',
|
||||
help="Database file to use (instead of memory)", default=None)
|
||||
parser.add_argument('--keep-db',
|
||||
help="Does not recreate new database file", action='store_true')
|
||||
|
||||
parser.add_argument('--pc-tag',
|
||||
help='Tag for separators, usually pc or c', default="pc")
|
||||
parser.add_argument('--parallel',
|
||||
|
||||
Reference in New Issue
Block a user