박은주

Clearance

...@@ -25,8 +25,6 @@ def GetKeywords(): ...@@ -25,8 +25,6 @@ def GetKeywords():
25 with open(os.path.join(BASE_DIR + '/', 'data.csv'), 'r', encoding='utf-8') as db: 25 with open(os.path.join(BASE_DIR + '/', 'data.csv'), 'r', encoding='utf-8') as db:
26 reader = csv.reader(db) 26 reader = csv.reader(db)
27 for data in reader: 27 for data in reader:
28 - data[0] = re.sub(pattern='[^\w\s]', repl='', string=data[0]).replace('\n', '')
29 - data[1] = re.sub(pattern='[^\w\s]', repl='', string=data[1]).replace('\n', '')
30 posts.append(data[0] + data[1]) 28 posts.append(data[0] + data[1])
31 29
32 keyword_extractor = KeywordSummarizer( 30 keyword_extractor = KeywordSummarizer(
...@@ -36,4 +34,8 @@ def GetKeywords(): ...@@ -36,4 +34,8 @@ def GetKeywords():
36 ) 34 )
37 35
38 keywords = keyword_extractor.summarize(posts, topk=30) 36 keywords = keyword_extractor.summarize(posts, topk=30)
37 + print(keywords)
38 + exit()
39 return keywords 39 return keywords
40 +
41 +GetKeywords()
...\ No newline at end of file ...\ No newline at end of file
......