Add support for external-id properties on lexemes #21
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.
With the help of Cursor AI and Claude, I addeed support for adding external-id claims to lexemes. I have been using this version of LexData now for creating lexemes and it works, see e.g. P12682 in L1463924. I have not tested other cases, not sure what they could be. As the solution is generated by GenAI, I don't have a deep understanding if the solution is sound - could you @Nudin can evaluate if this is suitable to merge with the project? The following is generated by GenAI and review by me:
Problem
LexData currently doesn't support adding external-id claims to lexemes. When attempting to add external-id properties (like P12682) to lexemes, the API returns errors like:
Root Cause
The Wikidata API expects external-id values to be sent as JSON-encoded strings (e.g., '"value"') rather than plain strings ('value'). Additionally, the pure_value property in the Claim class didn't handle the external-id data type.
Solution
Changes Made
Testing
Verified that external-id claims can now be successfully added to lexemes:
Questions for Review