Toggle navigation
Toggle navigation
This project
Loading...
Sign in
박은주
/
Todays_Issue
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
박은주
2021-06-08 23:03:49 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
bbb5b6d39df2b43d14070c1314984427d2a2e63b
bbb5b6d3
1 parent
a654322b
Clearance
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
GetTopic.py
GetTopic.py
View file @
bbb5b6d
...
...
@@ -25,8 +25,6 @@ def GetKeywords():
with
open
(
os
.
path
.
join
(
BASE_DIR
+
'/'
,
'data.csv'
),
'r'
,
encoding
=
'utf-8'
)
as
db
:
reader
=
csv
.
reader
(
db
)
for
data
in
reader
:
data
[
0
]
=
re
.
sub
(
pattern
=
'[^
\
w
\
s]'
,
repl
=
''
,
string
=
data
[
0
])
.
replace
(
'
\n
'
,
''
)
data
[
1
]
=
re
.
sub
(
pattern
=
'[^
\
w
\
s]'
,
repl
=
''
,
string
=
data
[
1
])
.
replace
(
'
\n
'
,
''
)
posts
.
append
(
data
[
0
]
+
data
[
1
])
keyword_extractor
=
KeywordSummarizer
(
...
...
@@ -36,4 +34,8 @@ def GetKeywords():
)
keywords
=
keyword_extractor
.
summarize
(
posts
,
topk
=
30
)
return
keywords
\ No newline at end of file
print
(
keywords
)
exit
()
return
keywords
GetKeywords
()
\ No newline at end of file
...
...
Please
register
or
login
to post a comment