New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP] get_entity_type: enforce disagreements with Wikidata P31 typing #294
base: main
Are you sure you want to change the base?
Conversation
fe3ebec
to
cd06523
Compare
isSerie = 'serie' in propertyTypes | ||
|
||
# If it has 'edition of' claims, consider that it's an edition | ||
if isEdition and claims['wdt:P629']? then return 'edition' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We might consider returning a undefined
value as no wikidata edition are to be interpreted by inventaire has an edition. Inventaire would then consider this entity as a topic, not an edition, avoiding for example the possibility of adding it to a user's inventaire.
Some code to refactor |
6ad40dc
to
9f7782b
Compare
especially, - an entity can't be an edition if it doesn't have wdt:P629 claims - prefer to consider an ambiguous entity as a serie rather than a work as it will be then easier to create subparts of this entity to which to link editions In the worst case, that was actually not a serie and subparts can be merged into it
9f7782b
to
59fc3b5
Compare
by returning undefined instead of edition for wd entities - items that reference wikidata edition would need to be updated to reference their inv equivalents - that means keeping duplicated data with Wikidata, which is a bit sad. Implementing data synchronization would look a hell lot like "shadow items" The good side of the coin: - this does make some things simpler: looking for the editions of a work can be done on Inventaire only (which is already the case at this point but it wasn't clear if we would add Wikidata lookup at some point)
59fc3b5
to
97f7219
Compare
@jum-s as you know I'm having doubts about the whole thing, please do not merge yet |
c8f6481
to
b0a9869
Compare
how should an entity that has both P31 Q20655472 and Q277759 (such as https://www.wikidata.org/wiki/Q11256364) be typed? |
especially,
wdt:P629
claimsas it will be then easier to create subparts of this entity to which to link editions
In the worst case, that was actually not a serie and subparts can be merged into it