Loading source/abstinent.py +5 −2 Original line number Diff line number Diff line Loading @@ -447,6 +447,9 @@ def bag_of_senses(graph: nx.Graph, root_hub_list:list) -> dict: root_hub_count = len(root_hub_list) if root_hub_count == 0: return {0:list(graph.nodes)} bag = {i:[] for i in range(root_hub_count)} for node in graph.nodes: Loading Loading @@ -531,13 +534,13 @@ def print_stats(stat_dict: dict) -> None: print('\n[A] '+'\n[A] '.join(stat_string)+'\n') with open('../baseline/statistics.txt', 'a') as stat_file: with open('./statistics.txt', 'a') as stat_file: stat_file.write('\n '.join(stat_string)+'\n\n') write_header = not os.path.exists('.statistics.tsv') with open('../baseline/.statistics.tsv', 'a') as stat_file: with open('./.statistics.tsv', 'a') as stat_file: if write_header: Loading Loading
source/abstinent.py +5 −2 Original line number Diff line number Diff line Loading @@ -447,6 +447,9 @@ def bag_of_senses(graph: nx.Graph, root_hub_list:list) -> dict: root_hub_count = len(root_hub_list) if root_hub_count == 0: return {0:list(graph.nodes)} bag = {i:[] for i in range(root_hub_count)} for node in graph.nodes: Loading Loading @@ -531,13 +534,13 @@ def print_stats(stat_dict: dict) -> None: print('\n[A] '+'\n[A] '.join(stat_string)+'\n') with open('../baseline/statistics.txt', 'a') as stat_file: with open('./statistics.txt', 'a') as stat_file: stat_file.write('\n '.join(stat_string)+'\n\n') write_header = not os.path.exists('.statistics.tsv') with open('../baseline/.statistics.tsv', 'a') as stat_file: with open('./.statistics.tsv', 'a') as stat_file: if write_header: Loading