--- id: konoha version: "5.7.0" license: MIT license_treatment: permissive maintenance: active --- # konoha — Add your description here License: permissive · Maintenance: active · Downloads: 156.9K/mo ## What it is and what it does Konoha is a wrapper library that abstracts away the differences between multiple Japanese tokenizers, allowing you to write tokenization code once and swap tokenizers by changing a single parameter. It supports word-level tokenization (via MeCab, Janome, Sentencepiece, and others), sentence-level splitting with customizable delimiters and bracket handling, and rule-based tokenizers for simple cases. The library also includes optional remote file support for loading dictionaries and models from Amazon S3. You use it by instantiating a WordTokenizer or SentenceTokenizer with your chosen backend, then calling tokenize() on your input text. It's designed for preprocessing pipelines in Japanese NLP tasks where you might want to experiment with different tokenizers or deploy with a specific one. The package also exposes a REST API via Docker for tokenization as a service. Use it for: - Switching between MeCab and Janome during development to compare tokenization quality without rewriting preprocessing code. - Building a Japanese NLP preprocessing pipeline that can use different tokenizers in different environments (dev, test, production). - Sentence-level splitting of Japanese text with custom punctuation and bracket rules for downstream analysis. - Deploying a tokenization microservice via Docker for multiple applications to call over HTTP. - Loading tokenizer models and dictionaries from S3 in cloud-based NLP workflows. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Konoha provides a unified Python interface to multiple Japanese tokenizers (MeCab, Janome, Sentencepiece, and others), plus rule-based tokenizers and sentence splitters, letting you switch between them without rewriting your code. Yes, if you work with Japanese text and want flexibility in tokenizer choice. The low install friction, active maintenance, MIT license, and zero known vulnerabilities make it a safe dependency. Install with a specific tokenizer extra (e.g., `konoha[mecab]`) unless you plan to choose at runtime; the base package alone won't tokenize without an underlying tokenizer installed. ## Install pip install konoha uv add konoha poetry add konoha ## Installing konoha Before you install: Low friction: pure Python wheel with only requests as a runtime dependency. Actively maintained as of March 2026. Requires Python 3.10 or later. License in practice: MIT license permits free use, modification, and distribution with minimal restrictions—suitable for both open-source and commercial projects. Quickstart: pip install konoha from konoha import WordTokenizer tokenizer = WordTokenizer('MeCab') print(tokenizer.tokenize('自然言語処理を勉強しています')) Requires Python 3.10 or later. The underlying tokenizer (MeCab, Janome, etc.) must be installed separately or via extras (e.g., pip install 'konoha[mecab]'). Verify before relying: - Whether all advertised tokenizers (MeCab, Janome, Sentencepiece) are equally well-maintained and tested. - Performance characteristics and tokenization accuracy compared to using tokenizers directly. - Whether the Docker-based API server is actively maintained and production-ready. ## Package facts - License: MIT (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 156.9K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags japanese tokenizer wrapper, switch between japanese tokenizers, japanese nlp preprocessing, mecab janome sentencepiece interface, japanese sentence splitter, japanese word tokenization, unified japanese morphological analysis, japanese-nlp, tokenization, morphological-analysis [View on SkillFed](https://skillfed.io/packages/konoha) · [View on PyPI](https://pypi.org/project/konoha/)