unidic-lite is a small version of UniDic, a Japanese morphological analysis dictionary, packaged for Python. It is designed to be installable directly via pip without requiring additional downloads, unlike the larger 'unidic' package. It uses UniDic 2.1.2 from 2013 and occupies approximately 250MB of disk space after installation. The current version is 1.0.8, released in January 2021, and its release cadence is infrequent as it primarily serves as a static dictionary resource.
pip install unidic-liteVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to use `unidic-lite` with the `fugashi` library, a common MeCab wrapper. `unidic-lite.DICDIR` provides the path to the installed dictionary, which must be passed to the `Tagger` initialization.
Install a MeCab wrapper (e.g., `pip install fugashi`) and pass `unidic_lite.DICDIR` to its Tagger constructor.
Ensure sufficient disk space is available before installation. Consider using `unidic-lite-imitator` for significantly smaller footprint if suitable.
For the most up-to-date dictionary, consider using the `unidic` package (requires a separate download step and more disk space) or explore alternatives.
Be aware of these differences; if strict adherence to official UniDic behavior is required, review the specific changes or use an unmodified UniDic distribution.
Always explicitly pass `unidic_lite.DICDIR` to the MeCab Tagger constructor (as shown in quickstart). For persistent issues, consult the MeCab wrapper's documentation, ensure MeCab is correctly installed on your system, and check system-specific dependencies.
Ensure `unidic-lite` is installed and explicitly provide the dictionary path to `fugashi.Tagger`: `import fugashi; import unidic_lite; tagger = fugashi.Tagger(unidic_lite.DICDIR)`
Install the package using pip: `pip install unidic-lite`
Reinstall `unidic-lite` in a clean Python environment to ensure all dictionary files are correctly placed. If using a library that allows specifying the dictionary path, provide `unidic_lite.DICDIR`.