-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.py
57 lines (41 loc) · 1.56 KB
/
main.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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
import sys
from code import ReadBugsXML
from code import ReadAnnotationXML
from code import WordCount
from code import RestConnection
from code import JsonToXml
from code import FilterResolution
from code import FilterClarificationQuotes
from code import FilterClarificationKeywords
from code import TextRank4Keyword
import pprint
def main():
pass
# conn = RestConnection()
# conn.get_bug_info('707428', 'bug_info_707428.json', 'bug_comment_707428.json')
# json_to_xml = JsonToXml()
# json_to_xml.write_to_xml('bug_info_707428.json', 'bug_comment_707428.json')
bug_reports = ReadBugsXML('bugreports.xml')
reports, structure = bug_reports.read_bugs()
pp = pprint.PrettyPrinter(indent=4)
# pp.pprint(reports[27])
# pp.pprint(structure[0])
# annotations = ReadAnnotationXML('annotation.xml')
# summaries = annotations.read_annoations(structure)
# pp.pprint(summaries[0])
# wc = WordCount()
# word_count, sentence_word_count = wc.count(reports)
# pp.pprint(word_count[34])
# pp.pprint(sentence_word_count[35])
# res_state = FilterResolution()
# res_state.find_comments(reports[1], 'se_keywords.json')
clas_state_quote = FilterClarificationQuotes()
clas_state_quote.find_matches(reports)
# class_state_kw = FilterClarificationKeywords()
# text = class_state_kw.preprocess_text(reports)
# tr4kw = TextRank4Keyword()
# tr4kw.analyze(text, candidate_pos=['NOUN', 'PROPN'], window_size=4, lower=True)
# tr4kw.get_keywords(50)
# invoking main
if __name__ == "__main__":
main()