mirror of
https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nlp.git
synced 2024-12-26 21:14:18 +00:00
Don't process files in subdirectories
This commit is contained in:
parent
4e7669d009
commit
cd976692d6
5
nlp
5
nlp
@ -128,9 +128,8 @@ def collect_jobs(input_dir, output_dir):
|
|||||||
jobs = []
|
jobs = []
|
||||||
for file in os.listdir(input_dir):
|
for file in os.listdir(input_dir):
|
||||||
if os.path.isdir(os.path.join(input_dir, file)):
|
if os.path.isdir(os.path.join(input_dir, file)):
|
||||||
jobs += collect_jobs(os.path.join(input_dir, file),
|
continue
|
||||||
os.path.join(output_dir, file))
|
if file.lower().endswith('.txt'):
|
||||||
elif file.lower().endswith('.txt'):
|
|
||||||
job = NLPPipelineJob(os.path.join(input_dir, file),
|
job = NLPPipelineJob(os.path.join(input_dir, file),
|
||||||
os.path.join(output_dir, file))
|
os.path.join(output_dir, file))
|
||||||
jobs.append(job)
|
jobs.append(job)
|
||||||
|
Loading…
Reference in New Issue
Block a user