Conversation
azaroth42
left a comment
There was a problem hiding this comment.
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.
Are you sure about this? Could be [1] [0]?
There was a problem hiding this comment.
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.
Are all preflabels in English?
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.
And ditto scope notes. Would be better to trap @.. and then add the equivalent Language to the name / statement.
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.
This should look up the language in two_to_three on Mapper.
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.
Ditto -- no point having a language without a URI, but we have a good alignment table.
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.
if not rectype:
rectype = self.guess_type(record)
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.