Registry / ai-ml / ginza
library5.2.0pypypiunverified

GiNZA is an open-source Japanese NLP library based on Universal Dependencies, providing tokenization, part-of-speech tagging, dependency parsing, named entity recognition, and sentence segmentation. The current version (5.2.0) requires Python >=3.8 and is released via GitHub (megagonlabs/ginza) and PyPI. It uses the spaCy pipeline internally and offers a robust model for Japanese text processing.

pip install ginza
INSTALL
IMPORT
SIG · GINZA
G
ginza
ai-mlpythonv5.2.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

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

nlp
import ginza
import spacy
nlp
from ginza import *
import spacy

Load the GiNZA model via spaCy and process Japanese text.

import spacy nlp = spacy.load('ja_ginza') doc = nlp('私は元気です。') for sent in doc.sents: print(sent.text) for token in doc: print(token.text, token.pos_, token.dep_, token.lemma_)
Debug
Known issues
breakingIn v5.0+, the import path changed: you must use `spacy.load('ja_ginza')` instead of `import ginza` or `ginza.load()`. Old code will raise ImportError.
fix
Replace `import ginza` with `import spacy; nlp = spacy.load('ja_ginza')`.
affects: >=5.0
gotchaGiNZA models are not automatically downloaded via pip; you must run `python -m spacy download ja_ginza` after pip install to download the pretrained pipeline.
fix
Run `python -m spacy download ja_ginza` after installing the ginza package.
affects: All
deprecatedThe `set_export` function from older versions (pre-5.0) is deprecated and removed. Use spaCy's built-in serialization (nlp.to_disk / nlp.from_disk) instead.
fix
Use `nlp.to_disk('path')` and `nlp.from_disk('path')` to save/load models.
affects: <5.0
Upgrade
Version history
5.2.0latest on PyPI · released Mar 30, 2024
Audit
Dependencies
spacy>=3.0requiredGiNZA is built as a spaCy pipeline package; requires spaCy to load and use the model.
ginza-phrasingoptionalOptional package for phrase-level parsing utilities.
Agent activity
19 hits · last 30 days
node
16
Amazon
1
OpenAI (training)
1
Resources
ginza — pip install ginza · libregistry