import os ####### pieline parameters ################ #cluster_sets = ['KMeans', 'LDA', 'HDBSCAN', 'GSDPMM', 'German_BERT', 'Patho_BERT', 'top2vec'] cluster_sets = ['HDBSCAN'] # params: path2corpus_bow_preprocessed = 'database/bow_prepro_desc.pkl' path2corpus_embedding_preprocessed = 'database/embedding_prepro_desc.pkl' #check working directory: workdir = os.getcwd() if not workdir[-len('nlp-in-diagnostic-texts-from-nephropathology'):] == 'nlp-in-diagnostic-texts-from-nephropathology': print(workdir + " is the wrong working directory.") print("please make shure to run this script with working directory '.../path/to/nlp-in-diagnostic-texts-from-nephropathology'.") exit(1) for cluster_set in cluster_sets: script_queue = [ f"python TextClassification/bow_classification.py --clustered_data {cluster_set} --path2corpus {path2corpus_bow_preprocessed}", f"python TextClassification/RNN_classification.py --clustered_data {cluster_set} --path2corpus {path2corpus_embedding_preprocessed}", f"python TextClassification/CNN_classification.py --clustered_data {cluster_set} --path2corpus {path2corpus_embedding_preprocessed}", #f"python TextClassification/bert_classification.py --clustered_data {cluster_set} --path2corpus {path2corpus_embedding_preprocessed}", f"python TextClassification/print_classification_metrics.py --clustered_data {cluster_set}" ] for script in script_queue: print("\n########################################### executing ###########################################") print(script) print("####################################################################################################\n") os.system(script)