-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
33 lines (21 loc) · 719 Bytes
/
main.py
File metadata and controls
33 lines (21 loc) · 719 Bytes
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
33
import components
import movie
import nltk_pipeline as summariser
results = summariser.main()
ovs = results["overall_summary"]
md = ""
for module_id, module in results["modular_summaries"].items():
md += f"\n MODULE {module_id + 1}: {module['theme']}"
md += f" \nSummary: {module['summary']}"
if module["keywords"]:
md += f" \nKey Terms: {', '.join(module['keywords'][:5])}"
kw = ""
for keyword, details in results["global_keywords"].items():
kw += f"\n {keyword} (Relevance: {details['relevance_score']})"
kw += f"\n Context: {details['reference']}"
print(ovs)
print(md)
print(kw)
kws_dict = results["global_keywords"]
components.main(ovs, md, kw, kws_dict)
movie.main()