pythonはjieba.analysを利用してキーワード抽出を行います。
1733 ワード
1、簡単なアプリケーション
コードは以下の通りです
2、参を含む使用最初のパラメータ:抽出されるキーワードのテキスト の第二パラメータ:キーワードの数を返し、重要度が高いから低い順序に を並べ替える。第3のパラメータ:各キーワードの重み を同時に返すかどうかの4番目のパラメータ:ワードフィルタリングは、空のためにフィルタリングされていません。提供されたら、ワード要件に該当するキーワード だけを返します。
コードは以下の通りです
以上はpythonがjieba.analysを利用してキーワードの抽出の詳しい内容を行って、更にpythonキーワードの抽出の資料に関して私達のその他の関連している文章に関心を持って下さい!
コードは以下の通りです
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @File : jieba.analyse.py
# @Author:
# @Date : 2020/3/14
# @Desc :
# @Contact : [email protected]
import jieba.analyse
text=' 、 。 , , 1500 。 , 、 、 、 , '
Key=jieba.analyse.extract_tags(text,topK=3)
print(Key)

2、参を含む使用
keywords = jieba.analyse.extract_tags(content, topK=5, withWeight=True, allowPOS=())
コードは以下の通りです
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @File : jieba.analyse.py
# @Author:
# @Date : 2020/3/14
# @Desc :
# @Contact : [email protected]
import jieba.analyse
# u unicode
content = u' 、 。 , , 1500 。 , 、 、 、 , '
keywords = jieba.analyse.extract_tags(content, topK=5, withWeight=True, allowPOS=())
#
for item in keywords:
#
print(item[0], item[1])

以上はpythonがjieba.analysを利用してキーワードの抽出の詳しい内容を行って、更にpythonキーワードの抽出の資料に関して私達のその他の関連している文章に関心を持って下さい!