-
Notifications
You must be signed in to change notification settings - Fork 2
Pleiades as a Source #241
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
base: main
Are you sure you want to change the base?
Pleiades as a Source #241
Conversation
azaroth42
left a comment
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.
A few minor comments, the language one is the only truly substantive
| t = geom.get("type") | ||
| coords = geom.get("coordinates") | ||
| if t == "Point": | ||
| return f"POINT ({coords[0]} {coords[1]})" |
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.
Are you sure about this? Could be [1] [0]?
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.
Double checked a week ago and it's right, I believe.
pipeline/sources/pleiades/mapper.py
Outdated
| uri = f"https://pleiades.stoa.org/vocabularies/{concept_id}" | ||
|
|
||
| # Extract prefLabel | ||
| label_match = re.search(r'skos:prefLabel "([^"]+)"@en', ttl_section) |
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.
Are all preflabels in English?
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.
pipeline/sources/pleiades/mapper.py
Outdated
| label = label_match.group(1) | ||
|
|
||
| # Extract scopeNote (description) | ||
| scope_match = re.search(r'skos:scopeNote "([^"]+)"@en', ttl_section) |
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.
And ditto scope notes. Would be better to trap @.. and then add the equivalent Language to the name / statement.
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.
pipeline/sources/pleiades/mapper.py
Outdated
| if primary_name_data["language"] == "en": | ||
| primary_name.language = model.Language(ident="http://vocab.getty.edu/aat/300388277") # English | ||
| else: | ||
| primary_name.language = model.Language(label=primary_name_data["language"]) |
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.
This should look up the language in two_to_three on Mapper.
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.
pipeline/sources/pleiades/mapper.py
Outdated
| if name_data["language"] == "en": | ||
| alt_name.language = model.Language(ident="http://vocab.getty.edu/aat/300388277") # English | ||
| else: | ||
| alt_name.language = model.Language(label=name_data["language"]) |
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.
Ditto -- no point having a language without a URI, but we have a good alignment table.
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.
pipeline/sources/pleiades/mapper.py
Outdated
| return {"identifier": recid, "data": data, "source": "pleiades"} | ||
|
|
||
| def transform(self, record, rectype, reference=False): | ||
|
|
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.
if not rectype:
rectype = self.guess_type(record)
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.
This PR brings Pleiades into Lux as a source of data for place names. It also allows us to understand hierarchical data for places via connections.