Skip to content
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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

maxlath
Copy link
Member

@maxlath maxlath commented Apr 29, 2019

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

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'
Copy link
Contributor

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.

@jum-s
Copy link
Contributor

jum-s commented May 4, 2019

Some code to refactor

@maxlath maxlath force-pushed the get-entity-type branch 2 times, most recently from 6ad40dc to 9f7782b Compare November 6, 2019 20:05
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
@maxlath maxlath changed the title get_entity_type: enforce disagreements with Wikidata P31 typing [WIP] get_entity_type: enforce disagreements with Wikidata P31 typing Nov 9, 2019
@maxlath
Copy link
Member Author

maxlath commented Nov 9, 2019

@jum-s how would you like to see it refactored?

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)
@maxlath
Copy link
Member Author

maxlath commented Nov 9, 2019

@jum-s as you know I'm having doubts about the whole thing, please do not merge yet

@maxlath
Copy link
Member Author

maxlath commented Jun 10, 2020

how should an entity that has both P31 Q20655472 and Q277759 (such as https://www.wikidata.org/wiki/Q11256364) be typed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants