Registry / database / ipadic

ipadic

JSON →
library1.0.0pypypi✓ verified 84d ago

The `ipadic` library packages the IPADic dictionary files for use with Python applications, primarily to provide dictionary data for `mecab-python3`. It resolves issues for projects that depend on older `mecab-python3` behavior or require a specific IPADic path. This library, currently at version 1.0.0, only supplies the dictionary data and does not offer an interface to MeCab itself. Due to the original IPADic not being actively maintained, future development of this wrapper library is expected to be minimal.

pip install ipadic
INSTALL
IMPORT
SIG · IPADIC
I
ipadic
databasepythonv1.0.0
Install
5.3s avg
Import
Disk
67MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v1.0.0 · 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
musl
py 3.103.910 runs
installs and imports cleanly · install 0.0s · import 0.000s · 69.7MB
glibc
py 3.103.910 runs
installs and imports cleanly · install 5.3s · import 0.000s · 70MB
67MB installed
● package 67MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

DICDIR
import ipadic; ipadic_path = ipadic.DICDIR
from ipadic import DICDIR
While `from ipadic import DICDIR` works, `import ipadic` is more common in examples and avoids potential name clashes if other modules also define DICDIR.

This quickstart demonstrates how to obtain the IPADic dictionary path from the `ipadic` library and use it to initialize `MeCab.Tagger` from the `mecab-python3` package. Remember that `mecab-python3` and the underlying MeCab system library must be installed separately.

import ipadic import MeCab import os # Get the path to the IPADic dictionary provided by the library ipadic_path = ipadic.DICDIR # Initialize MeCab.Tagger with the IPADic path # MeCab and mecab-python3 must be installed separately. tagger = MeCab.Tagger(f"-d {ipadic_path}") # Example usage: tokenizing text text = "すもももももももものうち" result = tagger.parse(text) print(f"Text: {text}\nMeCab result:\n{result}") # Cleanup (not strictly necessary for this example) # If you were loading models dynamically, you might clear caches, etc.
Debug
Known issues
gotchaThe `ipadic` library only provides dictionary files; it does NOT provide an interface to MeCab or any tokenization functionality itself. Users must install and use `mecab-python3` (or another MeCab binding) separately to perform tokenization.
fix
Ensure you have `mecab-python3` installed (`pip install mecab-python3`) and initialize `MeCab.Tagger` by passing `ipadic.DICDIR` explicitly.
affects: 1.0.0 and subsequent
deprecatedThe maintainers have stated that this might be the 'last release' (v1.0.0) as the upstream IPADic dictionary itself is not maintained. Users should be aware that future updates or bug fixes for `ipadic` might be limited.
fix
Consider the long-term maintenance status when designing your application. No direct fix for `ipadic` itself, but be prepared for potential lack of updates.
affects: 1.0.0 and subsequent
gotcha`ipadic` does not automatically install `mecab-python3` or the underlying MeCab system library. These are external dependencies required for `ipadic`'s dictionary data to be useful for tokenization.
fix
Install `mecab-python3` via pip (`pip install mecab-python3`) and ensure the MeCab system library is installed on your operating system (e.g., `sudo apt-get install mecab libmecab-dev mecab-ipadic-utf8` on Debian/Ubuntu).
affects: 1.0.0 and subsequent
Errors
Common errors & fixes
AttributeError: module 'ipadic' has no attribute 'Tagger'
Users often mistake `ipadic` for a full MeCab wrapper or tokenizer, attempting to call methods like `Tagger` directly on the `ipadic` module.
fix
`ipadic` only provides the dictionary path. You must import and use `MeCab.Tagger` from the `mecab-python3` library and pass `ipadic.DICDIR` to its constructor: `import MeCab; tagger = MeCab.Tagger(f'-d {ipadic.DICDIR}')`.
MeCab.Tagger.parse throws an error or produces incorrect Japanese tokenization.
When `mecab-python3` is used, but the `ipadic` dictionary path (`ipadic.DICDIR`) is not explicitly provided, MeCab might use a different default dictionary (e.g., an outdated system-wide dictionary or another specific dictionary).
fix
Always explicitly specify the dictionary path when initializing `MeCab.Tagger` to ensure the correct IPADic is used: `tagger = MeCab.Tagger(f'-d {ipadic.DICDIR}')`.
ModuleNotFoundError: No module named 'MeCab'
The `MeCab` Python module, provided by `mecab-python3`, is not installed or discoverable. `ipadic` does not automatically install this dependency.
fix
Install the Python bindings for MeCab: `pip install mecab-python3`. Also, ensure the underlying MeCab system library is installed on your OS.
Upgrade
Version history
1.0.0latest on PyPI · released Jul 20, 2020
Audit
Dependencies

No dependency data recorded yet.

Agent activity
6 hits · last 30 days
node
6
Resources
ipadic — pip install ipadic · libregistry