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

Feature/remote tokenization #123

Merged
merged 4 commits into from
Mar 7, 2021
Merged

Feature/remote tokenization #123

merged 4 commits into from
Mar 7, 2021

Conversation

himkt
Copy link
Owner

@himkt himkt commented Mar 7, 2021

This PR introduces a new feature to use konoha without installing any tokenizers on local machine.
If endpoint is specified in an initializer of WordTokenizer,
tokenizer.tokenize sends a request to the given endpoint for getting a tokenization result.

from konoha import WordTokenizer


tokenizer = WordTokenizer(
    tokenizer="mecab",
    endpoint="http://localhost:8000/api/v1/tokenize"
)
print(tokenizer.tokenize("猫はかわいい"))

@himkt himkt added this to the v4.6.4 milestone Mar 7, 2021
@himkt himkt merged commit b4d8426 into master Mar 7, 2021
@himkt himkt deleted the feature/remote-tokenization branch March 7, 2021 08:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant