|
@@ -68,7 +68,7 @@ class DataProcessor(object):
|
|
|
:param video_id: the video id
|
|
:param video_id: the video id
|
|
|
:return: tag_list [tag, tag, tag, tag......]
|
|
:return: tag_list [tag, tag, tag, tag......]
|
|
|
"""
|
|
"""
|
|
|
- sql = f"""SELECT video_title from crawler_video where video_id = {video_id};"""
|
|
|
|
|
|
|
+ sql = f"""SELECT title from crawler_video where id = {video_id};"""
|
|
|
try:
|
|
try:
|
|
|
title = self.client.select(sql)
|
|
title = self.client.select(sql)
|
|
|
keywords_textrank = jieba.analyse.textrank(title, topK=3)
|
|
keywords_textrank = jieba.analyse.textrank(title, topK=3)
|
|
@@ -112,4 +112,5 @@ class DataProcessor(object):
|
|
|
|
|
|
|
|
if __name__ == "__main__":
|
|
if __name__ == "__main__":
|
|
|
D = DataProcessor(flag="train")
|
|
D = DataProcessor(flag="train")
|
|
|
- D.producer()
|
|
|
|
|
|
|
+ a, b = D.title_processor("19591529")
|
|
|
|
|
+ print(a, b)
|