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

create wikidata importer for work #155

Closed
martinantonmueller opened this issue Feb 16, 2024 · 9 comments · Fixed by #235
Closed

create wikidata importer for work #155

martinantonmueller opened this issue Feb 16, 2024 · 9 comments · Fixed by #235
Assignees
Labels
enhancement New feature or request

Comments

@martinantonmueller
Copy link

No description provided.

@martinantonmueller martinantonmueller added the enhancement New feature or request label Feb 16, 2024
@csae8092
Copy link
Member

@martinantonmueller could you maybe provide ~5 example wikidata uris per class

@csae8092 csae8092 self-assigned this Feb 24, 2024
@martinantonmueller
Copy link
Author

martinantonmueller commented Feb 26, 2024

First I will try to find my way through a work, e.g. Romeo and Juliet, https://www.wikidata.org/wiki/Q83186

  1. TITLE to get the title one does have to identify the language it is written in (P407) The result is a wikidata-item, in this case Q1860, "english". We need the abbreviation, so we have to look up In https://www.wikidata.org/wiki/Q1860 for the property P424, the language abbreviation. This is "en".
    With this result we go back to the entry https://www.wikidata.org/wiki/Q83186 and look for the label with the language code "en".
  2. I would suggest the following fallback routine: If there is no language code then use "de" and if "de" is not available use "en"
  3. DATE for the creation use inception and write the content of the first value of P571 without the time-stamp
  4. no values for type of work etc.
  5. AUTHOR create an author relation: use P50 to get the wikidata-id of the author. if that author is already in the PMB create a PMB-relation 1049 "hat geschaffen". if not first create the author by running the author-import script and then create the relation
  6. store the wikidata-URI as URI

i wouldn't care too much for other details. one will have to go over the imported works anyways

@martinantonmueller martinantonmueller changed the title create wikidata importer for work and organisation create wikidata importer for work Feb 27, 2024
@martinantonmueller
Copy link
Author

i've separated the two importers. so here are five examples for works:

https://www.wikidata.org/wiki/Q1192140 (deutscher Text)
https://www.wikidata.org/wiki/Q1053387 (französischer Text)
https://www.wikidata.org/wiki/Q480 (spanischer Text)
https://www.wikidata.org/wiki/Q105745657 (deutscher Text)
https://www.wikidata.org/wiki/Q165318 (russischer Text, hier sollten kyrillische Zeichen importiert werden)

@csae8092
Copy link
Member

csae8092 commented Oct 28, 2024

given the fact that wikidata's datamodel for works is way to flexible/diverse; I'll only fetch wikidata-id from wikidata and the rest of the data (label, creators, creation date) from GND using -> pylobid.PylobidWork

@martinantonmueller GND sometimes provide two kinds of date: dateOfProduction and dateOfPublication wheras the first one often is some time span e.g. 1560-1566 and the later usually just a year.
In case both dates are provided by the GND which one should be saved?

@martinantonmueller
Copy link
Author

dateofpublication! Thank you!

@martinantonmueller
Copy link
Author

and if this would be a »Wunschkonzert« (wish concert) than the work would have dateofpublication and the relation to the author would have dateOfProduction. but the latter is not as important

@csae8092
Copy link
Member

csae8092 commented Oct 29, 2024

and if this would be a »Wunschkonzert« (wish concert) than the work would have dateofpublication and the relation to the author would have dateOfProduction. but the latter is not as important

x-mas is around the corner, let's see...
csae8092/pylobid#16

@martinantonmueller
Copy link
Author

@csae8092 has anyone said you're incredible since I'm gone? i really hope so!

@csae8092
Copy link
Member

ist nur schlechtes gewissen wegen der besch*** performance

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

Successfully merging a pull request may close this issue.

2 participants