Skip to content

Conversation

@kkdavis14
Copy link

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
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

3 participants