From 8684245d7207523f5201e1f1f9e9bc2b9766cb1a Mon Sep 17 00:00:00 2001 From: daxid <david.rouquet@tetras-libre.fr> Date: Fri, 19 May 2023 08:49:31 +0000 Subject: [PATCH] Add documentation comments and processes parameter --- tenet/main.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tenet/main.py b/tenet/main.py index 34939bf8..d2238303 100644 --- a/tenet/main.py +++ b/tenet/main.py @@ -170,18 +170,21 @@ def create_ontology_from_amrld_dir(amrld_dir_path, base_ontology_path=None, onto_prefix=None, out_file_path=None, - technical_dir_path=None): + technical_dir_path=None, + processes=1 + ): """ Method to create an ontology (as Turtle String) from a transduction analysis of an AMRLD file. Parameters ---------- - amrld_file_path: a path to an AMR-LD Turtle File. + amrld_dir_path: a path to a directory recursively containing AMR-LD Turtle Files. base_ontology_path: a path to a Base Ontology Turtle File if defined. onto_prefix: the target ontology prefix if defined (if not defined a prefix based on the amrld filename is used). out_file_path: a file path where the output ontology is written if defined (the function still outputs the string). technical_dir_path: a dir path where some technical and log files are written if defined. + processes: the nuber of processes in the multiprocessing pool Returns ------- @@ -207,6 +210,7 @@ def create_ontology_from_amrld_dir(amrld_dir_path, sentence_dir = config.source_sentence_file sentence_count = 0 result_triple_list = [] +#@@ Support for multiprecessing mus be done here for sentence_file in glob.glob(sentence_dir, recursive = True): sentence_count += 1 logger.info(f' *** sentence {sentence_count} *** ') -- GitLab