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

updated wikidata mapper, expanded guesser and activity mapping #205

Merged
merged 2 commits into from
Jan 25, 2025

Conversation

kkdavis14
Copy link
Contributor

It is certainly an art not a science trying to map Wikidata, but I think this is a general improvement and hopefully will result in better HMOs, Periods and Activities making it to LUX.

closes #199

@kkdavis14 kkdavis14 requested a review from azaroth42 January 15, 2025 19:06
@kkdavis14 kkdavis14 self-assigned this Jan 15, 2025
Copy link
Collaborator

@azaroth42 azaroth42 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small tweak re get_reference, otherwise looks good

top.part_of = model.Activity(ident=self.expand_uri(b))
pref = self.get_reference(b)
if pref and pref.__class__ == model.Period:
top.part_of = model.Period(ident=self.expand_uri(b))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't this just be top.part_of = pref ? No need to test pref.class, just if it's not None.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm. I think I was confused because both process_period and process_event just point to process_activity. Maybe I should split up the process_activity code to each more specific Class, e.g. Periods don't have participants. I'll write that up and re-submit.

@kkdavis14 kkdavis14 requested a review from azaroth42 January 22, 2025 21:29
@azaroth42 azaroth42 merged commit a384e66 into main Jan 25, 2025
@azaroth42 azaroth42 deleted the 199-wikidata-guesser branch January 25, 2025 02:34
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.

[Bug]: Wikidata Guesser Needs Refactor
2 participants