Metadata-Version: 2.5
Name: suzume
Version: 0.9.10
Summary: Lightweight Japanese tokenizer with POS tagging, lemmatization, and keyword extraction for Python
Project-URL: Homepage, https://suzume.libraz.net
Project-URL: Documentation, https://suzume.libraz.net/docs/python
Project-URL: Repository, https://github.com/libraz/suzume
Project-URL: Issues, https://github.com/libraz/suzume/issues
Author-email: libraz <libraz@libraz.net>
License-Expression: Apache-2.0
Keywords: japanese,japanese-nlp,japanese-tokenizer,keyword-extraction,lemmatization,mecab,morphological-analysis,nlp,part-of-speech,pos-tagger,search,tokenization,tokenizer
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Operating System :: MacOS
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Text Processing :: Linguistic
Classifier: Typing :: Typed
Requires-Python: >=3.10
Provides-Extra: dev
Requires-Dist: mypy>=1.13; extra == 'dev'
Requires-Dist: pytest>=8.0; extra == 'dev'
Requires-Dist: ruff>=0.8; extra == 'dev'
Description-Content-Type: text/markdown

# suzume

[![PyPI](https://img.shields.io/pypi/v/suzume)](https://pypi.org/project/suzume/)
[![npm](https://img.shields.io/npm/v/@libraz/suzume)](https://www.npmjs.com/package/@libraz/suzume)
[![License](https://img.shields.io/badge/license-Apache--2.0-blue)](https://github.com/libraz/suzume/blob/main/LICENSE)
[![Docs](https://img.shields.io/badge/docs-suzume.libraz.net-2563eb)](https://suzume.libraz.net)

**Japanese tokenization for Python applications.** Suzume is not a full
morphological analyzer like MeCab: it prioritizes useful search units while
still providing part-of-speech tags, lemmas, and keyword extraction. The wheel
requires no extra dictionary installation.

📖 **[Full API reference and guides](https://suzume.libraz.net/docs/python)**

See the [MeCab comparison](https://suzume.libraz.net/docs/mecab-comparison) for
concrete examples of token boundaries, lemmatization, and trade-offs.

## Installation

```bash
pip install suzume
```

PyPI publishes binary wheels for Linux x86_64
(`manylinux2014`/`manylinux_2_17`) and macOS arm64 (macOS 11 or newer).
Windows, macOS x86_64, Linux arm64, and other platforms or architectures are
not supported. Suzume does not publish or support a source distribution; an
installation succeeds only when a compatible wheel is available.

## Quick Start

```python
from suzume import Suzume

with Suzume() as sz:
    tokens = sz.analyze("すもももももももものうち")
    tags = sz.generate_tags("東京の公園に行きました")
```

## Threads

Calls on one `Suzume` instance are serialized, so it can safely be shared
between Python threads. Create one instance per worker when native analysis
should run in parallel.

Installing the wheel also provides the `suzume` command:

```bash
suzume "東京へ行く"
suzume analyze --mode search --format json "東京の公園"
printf 'りんごを食べる\n' | suzume --format tags
```

Run `suzume --help` for analysis modes, normalization controls, output formats,
tag filters, and repeatable `--dict` options. Dictionary compilation,
validation, and test commands remain part of the separate native developer
tool, `suzume-cli`.

See the [Python API](https://suzume.libraz.net/docs/python) for the complete
interface, including user dictionaries and tag-generation options.

## Also available

```bash
npm install @libraz/suzume  # JavaScript / TypeScript WebAssembly package
```

The native C and C++ library is documented at
[suzume.libraz.net/docs/cpp](https://suzume.libraz.net/docs/cpp).

## License

[Apache License 2.0](https://github.com/libraz/suzume/blob/main/LICENSE)
