Added Japanese language support. - #584
Merged
Merged
Conversation
codelucas
approved these changes
Aug 27, 2018
codelucas
left a comment
Owner
There was a problem hiding this comment.
Impressive work, thanks @sfi-dannybrady, thanks for adding the thorough unit testing and adding JP support with minimal dependencies as well. Will approve, merge and push to pypi asap
codelucas
reviewed
Aug 27, 2018
| super(StopWordsJapanese, self).__init__(language='ja') | ||
|
|
||
| def candidate_words(self, stripped_input): | ||
| import tinysegmenter |
Owner
There was a problem hiding this comment.
nit: Python style recommends importing at file header. However, one advantage in doing this is that non-japanese extraction users will not import the un-needed module. But that advantage is lost anyways in this particular implementation since we force tinysegmenter install in reqs.
codelucas
reviewed
Aug 27, 2018
| feedfinder2>=0.0.4 | ||
| jieba3k>=0.35.1 | ||
| python-dateutil>=2.5.3 | ||
| tinysegmenter==0.3 No newline at end of file |
Owner
There was a problem hiding this comment.
Do you mean >=0.3 ? Let's merge anyways but add a todo to change this if needed
Owner
|
Will deploy this in pypi after some more testing on my end |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
I've added Japanese language support. Japanese needs a new tokenizer, so tinysegmenter was used. The language code for Japanese is ja.