Skip to content
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

Add token class #17

Merged
merged 7 commits into from
Jul 10, 2019
Merged

Add token class #17

merged 7 commits into from
Jul 10, 2019

Conversation

himkt
Copy link
Owner

@himkt himkt commented Jul 10, 2019

I introduce the class Token such that we can see part-of-speech tags of parsed results.

tokenizer = WordTokenizer(tokenizer="MeCab", with_postag=True)
print(tokenizer.tokenize(sentence))  # -> `我輩 (名詞), は (助詞), 猫 (名詞), で (助動詞), ある (助動詞), 。 (記号)`

@himkt himkt changed the title [WIP] Add token class Add token class Jul 10, 2019
import warnings


class Token:
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Note] Token breaks the compatibility.

@himkt himkt merged commit 1e99cb9 into master Jul 10, 2019
@himkt himkt deleted the add-token-class branch July 10, 2019 08:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant