Registry / ai-ml / sudachidict-core

sudachidict-core

JSON →
library20260723pypypi✓ verified 22d ago

SudachiDict-core is the default dictionary for SudachiPy, a Python-based Japanese morphological analyzer. It provides a comprehensive basic vocabulary for tokenization and linguistic analysis. The dictionary packages are updated frequently, often multiple times a quarter, incorporating new words and improving synonym definitions. The current version is 20260116.

pip install sudachipy sudachidict-core
INSTALL
IMPORT
SIG · SUDACHIDICT-CORE
S
sudachidict-core
ai-mlpythonv20260723
Install
3.3s avg
Import
Disk
228MB
Pass rate
5/ 10
Env Coverage5 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v20260723 · 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.95 runs
build_error
glibc
py 3.103.95 runs
installs and imports cleanly · install 3.3s · import 0.000s · 230MB
228MB installed
● package 228MB
Code
Verified usage

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

sudachidict-core
This is a data-only package. It provides dictionary resources for SudachiPy and is not directly imported into Python code.
sudachidict-core installs dictionary files that SudachiPy automatically discovers or can be explicitly configured to use. You do not import symbols from 'sudachidict-core' itself.

This quickstart demonstrates how to use the 'sudachidict-core' dictionary through the 'SudachiPy' library to perform Japanese morphological analysis. It initializes the tokenizer with the core dictionary and then tokenizes an example Japanese sentence.

from sudachipy import Dictionary, SplitMode # Initialize the Sudachi dictionary (core edition is used by default if installed) # dict_type='core' explicitly ensures the core dictionary is loaded. # The dictionary files are loaded from the installed sudachidict-core package. dict_obj = Dictionary(dict_type='core') tokenizer = dict_obj.create() text = "外国人参政権" # Perform tokenization in mode A (shortest path) mode = SplitMode.A # morphemes = tokenizer.tokenize(text, mode) # For SudachiPy v0.6.0+ (sudachi.rs-based), mode is passed at tokenizer creation # Example for v0.6.0+ (requires updating sudachipy install if not latest) # tokenizer_a = dict_obj.create(mode=SplitMode.A) # morphemes = tokenizer_a.tokenize(text) # For compatibility with older SudachiPy (pre-v0.6.0) or simpler quickstart: # Use the example from SudachiPy's README, which passes mode to tokenize() morphemes = tokenizer.tokenize(text, mode) print(f"Original text: {text}") print(f"Tokens (Mode A): {[m.surface() for m in morphemes]}") # Example accessing morpheme details if morphemes: first_morpheme = morphemes[0] print(f"\nFirst morpheme: {first_morpheme.surface()}") print(f" Part-of-speech: {first_morpheme.part_of_speech()}") print(f" Normalized form: {first_morpheme.normalized_form()}") print(f" Dictionary form: {first_morpheme.dictionary_form()}") print(f" Reading form: {first_morpheme.reading_form()}")
Debug
Known issues
breakingDictionary updates are versioned by date (e.g., '20260116'), not semantic versioning. Frequent updates can introduce changes to tokenization, part-of-speech tags, and normalization behavior, particularly due to additions/modifications in 'synonyms.txt'.
fix
Pin the 'sudachidict-core' version in your project dependencies (e.g., `sudachidict-core==20260116`) to ensure consistent behavior. Regularly review release notes for significant changes if upgrading.
affects: All versions (behavioral changes between date-based releases)
gotchaThis package is a dictionary resource, not a Python library providing direct classes or functions for import. Its role is to supply data to the 'SudachiPy' morphological analyzer. Attempting to `import sudachidict_core` directly will likely result in an ImportError or unexpected behavior.
fix
Install `sudachidict-core` via `pip`, then use `sudachipy.Dictionary(dict_type='core').create()` to load and utilize the dictionary through `SudachiPy`.
affects: All versions
gotchaSudachi offers three dictionary editions: 'small', 'core' (default), and 'full'. Each has a different scope of vocabulary. Using 'core' when 'full' is needed for specific proper nouns (or vice versa) will lead to suboptimal tokenization results.
fix
Choose the appropriate dictionary edition (`sudachidict-small`, `sudachidict-core`, or `sudachidict-full`) based on your application's requirements. 'Core' is a good general-purpose choice, while 'full' includes more proper nouns. Install the specific dictionary package and ensure SudachiPy is configured to use it.
affects: All versions
gotchaThe actual dictionary files (e.g., `system.dic`) are not bundled directly within the `sudachidict-core` Python package. Instead, they are downloaded from a remote server during the `pip install` process. This requires an active internet connection during installation.
fix
Ensure that the environment where `pip install sudachidict-core` is run has an internet connection. In restricted environments, you may need to pre-download the dictionary files or configure a local package mirror.
affects: All versions
deprecatedFor SudachiPy versions prior to v0.5.2, a separate `sudachipy link` command was often required to make the dictionary available. This command is no longer available in newer `SudachiPy` versions (v0.5.2 and later).
fix
For modern `SudachiPy` (v0.5.2+), simply installing `sudachidict-core` (or other editions) makes them discoverable by default. You can explicitly specify `dict_type='core'` when creating a `Dictionary` object if needed.
affects: SudachiPy < 0.5.2
Upgrade
Version history
20260723latest on PyPI · released Jul 24, 2026
Audit
Dependencies
sudachipyoptionalThis package provides dictionary data for use with SudachiPy, a Japanese morphological analyzer. While technically a standalone data package, it is primarily consumed by SudachiPy.
Agent activity
13 hits · last 30 days
node
10
OpenAI (training)
1
Resources
sudachidict-core — pip install sudachidict-core · libregistry