diff --git a/tenet/main.py b/tenet/main.py index 34939bf80a8e63d9ea8258de5145b8e3b788f263..d22383038e45d6475514dbc45b9ece2312e43867 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} *** ')