Add Python user_data access#342
Merged
hayashi-mas-wap merged 2 commits intoMay 28, 2026
Merged
Conversation
1aadf64 to
a7a7c5f
Compare
a7a7c5f to
76a2150
Compare
76a2150 to
dfca420
Compare
hayashi-mas-wap
requested changes
May 27, 2026
hayashi-mas-wap
approved these changes
May 28, 2026
7197cdf
into
WorksApplications:develop-v0.7
1 check passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Morpheme.user_data()in the Python bindings for both analyzed morphemes and standalone dictionary-entry morphemes.user_datato Python field subsetting, type stubs, and subsetting docs, including an example for partial loading.splits_a/splits_b; accepted field names aresplit_a/split_b.Dictionary.lookup(),Dictionary.entries(),lookup_all_entries(), and dictionaries built from user CSVs.Root cause
The v0.7 Rust core already stores and resolves
user_data, but the PythonMorphemeAPI and Python field-subset parser did not expose or load that field.Validation
cargo fmt --allgit diff --checkcargo test -p sudachi user_datacargo test -p sudachipy(cd python && python -m pip install -e .)python -m unittest python.tests.test_build python.tests.test_morpheme python.tests.test_dictionary python.tests.test_tokenizerpython -m unittest python.tests.test_dictionary python.tests.test_morphemecargo test --workspacepython -m unittest discover python/testsCloses #338