diff --git a/corpusdirs.py b/corpusdirs.py index 85fd368..facf9b4 100755 --- a/corpusdirs.py +++ b/corpusdirs.py @@ -462,7 +462,7 @@ Prints a short list of possible shelves with ON/off status and basic info: corpus_name and size """ - print("======= CORPUSDIRS [%s] =======" % corpus_name) + print("======= CORPUSDIRS [%s] =======" % self.name) triggers_dirs = [] for shelf, bol in self.shelfs.items(): on_off = ' ON' if bol else 'off' @@ -726,7 +726,7 @@ ) # - parser.add_argument('--from', + parser.add_argument('--from_table', metavar='mes_docs.tsv', help="""tableau en entrée (tout tsv avec en COL1 istex_id et en COL2 le nom du lot... (par ex: la sortie détaillée de l'échantilloneur sampler.py)""", type=str, @@ -744,8 +744,8 @@ args = parser.parse_args(argv[1:]) from_table = args.from_table - debug = args.debuglvl - future_dir = corpus_name + debug = args.debug + corpus_name = args.un_nom_de_corpus # ============================================= if path.exists(corpus_name): diff --git a/sampler.py b/sampler.py index 2970221..ccea90f 100755 --- a/sampler.py +++ b/sampler.py @@ -383,7 +383,7 @@ # do the counting for each combo for i, combi in enumerate(sorted(combinations)): if i % 100 == 0: - print("pool %i/%i" % (i,n_combos)) + print("pool %i/%i" % (i,n_combos), file=stderr) query = " AND ".join(combi) @@ -740,7 +740,7 @@ 'author_1', 'title', 'src_query'])) # contents for did, info in sorted(got_ids_idx.items(), key=lambda x: x[1]['_q']): - #~ print("INFO----------",info) + #~ print("INFO----------",info, file=stderr) #~ exit() output_array.append("\t".join([ did, info['co'],