forked from ekazazic20/label_converter
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathget_paper_info.py
32 lines (22 loc) · 1.08 KB
/
get_paper_info.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
import convert_labels
import get_function_map
class PaperInfo(object):
def __init__(self, orig_functions, function_map):
self.orig_functions = orig_functions
self.function_map = get_function_map.get_function_map(function_map)
self.new_functions = convert_labels.convert_labels(function_map, self.orig_functions)
def get_label_one(self):
return self.new_functions[0]
def get_label_two(self):
return self.new_functions[1]
def get_label_three(self):
return self.new_functions[2]
def get_paper_info(orig_functions, function_map):
paper_info_instance = PaperInfo(orig_functions, function_map)
#Retrieiving labels of each level
level_one = paper_info_instance.get_label_one()
level_two = paper_info_instance.get_label_two()
level_three = paper_info_instance.get_label_three()
return level_one, level_two, level_three
# print(get_paper_info(["Manage impact"], "function_map.csv"))
# print(get_paper_info(["Manage impact","Move through/on liquids", "Detox/purify"], "function_map.csv"))