-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmain.py
23 lines (18 loc) · 880 Bytes
/
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# this area is just for debugging etc
# scrips are called by app from application
from src.knowledge_base.kb_license_query import all_terms_conditions
from src.knowledge_base.kb_license_store import license_mt
if __name__ == '__main__':
# print(kb_license.name)
kb_license = license_mt()
all_nodes = kb_license.nodes()
all_edges = kb_license.edges()
# kb_license.plot()
# kb_license.attr('mit_license', {'comment': "A permissive type of copyleft license."})
# kb_license.node('mit_license').comment = "The MIT License is a permissive type of copyleft license."
# print(kb_license.node('mit_license').attrs)
license_type = 'merchantability_license'
search_term = 'Warranty'
results = list(kb_license.query(f'extendsWarranties({search_term}, {license_type})'))
result = [sub[search_term] for sub in results]
# print(result)