-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
use HanLP or Jieba create word_cloud_cn #430
Closed
Closed
Changes from 5 commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
a2c4de3
Merge pull request #1 from amueller/master
TianFengshou 1dd1cfc
use HanLP replace Jieba
TianFengshou a30cf53
You can use jieba or hanlp create wordcloud with chinese
TianFengshou 28a5841
del wordcloud_cn_HanLP
TianFengshou 2850f83
To fix a bug, you must first install jpype to use pyhanlp
TianFengshou f4a1b2d
修改中文词云示例,以通过检查
TianFengshou 655d7c8
添加冗余引入,已通过Github合并时候的代码检查
TianFengshou b538c11
修改代码以通过scikit-ci代码检查
TianFengshou 77d3fc5
Merge pull request #2 from amueller/master
TianFengshou d264006
change file to merge...
TianFengshou 9ee9ec7
Modify the code to pass the check of flake8
TianFengshou 9018395
删除冲突代码以合并源代码
TianFengshou aba7e78
Resolved conflict in examples/wordcloud_cn.py
TianFengshou d75fcd8
Merge pull request #5 from TianFengshou/main
TianFengshou File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
JClass is not defined?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If use hanlp must install jpype1 .I forgot about it......
"pip install jpype1"......
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pyhanlp provides a python interface for hanlp. Hanlp is currently the best-performing open source Chinese natural language processing class library, but it is implemented in Java, so we must use jpype to call Java classes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok but you must also import it, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You need to make sure the continuous integration passes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't need to import it.The pyhanlp import jpype1 in the
__init__.py
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If use pyhanlp,In line 114 there's a line like “from pyhanlp import *“
If use jieba,In line 106 there's a line like “import jieba“。This increases efficiency, and the code is feasible.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the tests don't pass (see the 8 failing checks below) there's an issue with the code.