Install & Compatibility
Where this runs
tested against v0.2.12 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslpy 3.10–3.920 runs
installs and imports cleanly · install 0.0s · import 4.955s · 175.1MB
glibcpy 3.10–3.920 runs
installs and imports cleanly · install 5.4s · import 2.758s · 169MB
174MB installed
● package 174MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
nagisa
✓ import nagisa
The primary module for accessing tokenization and tagging functions.
nagisa.tagging
✓ words = nagisa.tagging(text)
✗ tagger = nagisa.Tagger(); words = tagger.tagging(text)
While `nagisa.Tagger()` can be used for custom models, `nagisa.tagging()` directly uses the default pre-trained model for convenience and is the most common use case.
This example demonstrates how to perform basic Japanese word segmentation and Part-of-Speech tagging using the `nagisa.tagging()` function, and how to access the segmented words and their POS tags. It also shows a simple post-processing step to extract words of a specific POS tag.
import nagisa
text = 'Pythonで簡単に使えるツールです'
# Perform word segmentation and POS tagging
words = nagisa.tagging(text)
print(words) # => Python/名詞 で/助詞 簡単/形状詞 に/助動詞 使える/動詞 ツール/名詞 です/助動詞
print(words.words) # => ['Python', 'で', '簡単', 'に', '使える', 'ツール', 'です']
print(words.postags) # => ['名詞', '助詞', '形状詞', '助動詞', '動詞', '名詞', '助動詞']
# Example of post-processing: extract only nouns
nouns = nagisa.extract(text, extract_postags=['名詞'])
print(nouns) # => Python/名詞 ツール/名詞
Debug
Known issues
breakingVersions of `nagisa` prior to 0.2.11 had issues with Poetry installations due to missing `Requires-Dist` metadata (for `six`, `numpy`, and `DyNet`/`DyNet38`) in the PyPI `tar.gz` files.fixUpgrade `nagisa` to version 0.2.11 or newer. If using an older version, ensure your `pip`, `wheel`, and `build` tools are up-to-date before attempting to install from source, or explicitly install dependencies like `DyNet38` first.
affects: <0.2.11
gotchaIn versions prior to 0.2.10, importing `nagisa` on Linux with Python 3.8 and above would often print verbose `DyNet` logging messages to the console during initialization.fixUpgrade `nagisa` to version 0.2.10 or newer, which includes a fix to suppress `DyNet` logs.
affects: <0.2.10
gotchaVersion 0.2.12 fixed an issue where `nagisa` would silently drop certain words from tokenization results if the input text ended with a partially formed word (i.e., a sequence starting with a BEGIN tag but missing an END tag).fixUpgrade `nagisa` to version 0.2.12 or newer to ensure complete tokenization results.
affects: <0.2.12
breakingVersions prior to 0.2.7 could raise an `AttributeError: module 'utils' has no attribute 'OOV'` or similar, due to a naming conflict with the internal `utils.pyx` file.fixUpgrade `nagisa` to version 0.2.7 or newer, which renamed the conflicting file to `nagisa_utils.pyx`.
affects: <0.2.7
gotchaOlder versions of `nagisa` (especially before widespread `DyNet38` wheels) could be difficult to install on Python 3.8+ due to `DyNet`'s lack of pre-built wheels for these newer Python versions.fixEnsure you are using `nagisa` 0.2.8+ which added wheels for newer Python versions, and that `DyNet38` is installed. If issues persist, try `pip install DyNet38` before `pip install nagisa`.
affects: <0.2.10 (especially pre-0.2.8 for broader wheel support)
Errors
Common errors & fixes
Poetry could not find a compatible version for package nagisa
Versions prior to 0.2.11 had incorrect or missing dependency metadata (`Requires-Dist`) in the `tar.gz` files on PyPI, which Poetry relies on.
fixUpgrade `nagisa` to 0.2.11 or newer: `pip install nagisa==0.2.12`. If you must use an older version, ensure your Poetry environment's `pip`, `wheel`, and `build` packages are fully up-to-date, or consider installing `nagisa` and its direct dependencies (`six`, `numpy`, `DyNet38`) manually with `pip` first.
AttributeError: module 'utils' has no attribute 'OOV'
In `nagisa` versions before 0.2.7, an internal module was named `utils.pyx`, which could conflict with other `utils` modules in the Python path or cause import errors.
fixUpgrade `nagisa` to version 0.2.7 or later: `pip install nagisa==0.2.12`. This version renamed the internal file to `nagisa_utils.pyx` to avoid conflicts.
ImportError: cannot import name 'DyNet' from 'dynet' (or similar DyNet build failures)
`DyNet` (or `DyNet38`) is a complex C++-backed library that `nagisa` depends on. Installation can fail if pre-built wheels are not available for your specific Python version and OS, or if build tools are missing.
fixFirst, ensure you are using a Python version officially supported by the latest `nagisa` release (check PyPI for supported Python versions like 3.9-3.14). Try `pip install DyNet38` independently. If this fails, ensure you have necessary C++ build tools (e.g., Xcode Command Line Tools on macOS, Visual C++ Build Tools on Windows, `build-essential` on Linux). If problems persist, consider installing `DyNet` directly from its GitHub repository following its specific build instructions, then install `nagisa`.
Some words are missing from the tokenized output, especially at the end of the text.
A bug in `nagisa` versions prior to 0.2.12 caused words to be silently dropped if the input text ended with an incomplete word structure detected by the tokenizer.
fixUpgrade `nagisa` to version 0.2.12 or newer: `pip install nagisa==0.2.12`.
Upgrade
Version history
0.2.12latest on PyPI · released Feb 12, 2026
Audit
Dependencies
sixrequiredInternal compatibility layer.
numpyrequiredNumerical operations, particularly for DyNet backend.
DyNet38requiredDynamic Neural Network Toolkit backend for Python 3.8+ (for older Python versions, 'DyNet' is used). This is the core machine learning library for tokenization and POS-tagging models.