def test_trend_analysis(filter_data_path, graph_data_path): target_corpus_path = path.join(ta_path, 'target_corpus.csv') reference_corpus_path = path.join(ta_path, 'reference_corpus.csv') trend_analysis.analyze(target_corpus_path, reference_corpus_path, target_corpus_path, reference_corpus_path) assert os.path.isfile(filter_data_path) assert os.path.isfile(graph_data_path)
def re_analyze(): logger.info("re-analysing scores") label.text = "Re-Analysing... Please Wait..." global gd if isfile(target_scores_path) and isfile(ref_scores_path): analyze(target_scores_path, ref_scores_path, tar_header=target_data_name, ref_header=ref_data_name, re_analysis=True, tfidf_w=float(tfidf_slider.value), cval_w=float(cval_slider.value), lm_w=float(freq_slider.value)) gd = None create_graphs(top_n_dropdown.value, int(top_n_clusters_dropdown.value)) if radio_group_area.active == 0: handle_selected_graph(0) else: radio_group_area.active = 0 label.text = "Done!" time.sleep(2) label.text = "" else: logger.info("scores files are missing") label.text = "Error: scores files are missing!" time.sleep(2) logger.info("re-analysing done")