- Created the Country class with ISO 3166-1 alpha-2 and alpha-3 codes, ensuring minimal design without additional metadata. - Integrated the Country class into CustodianPlace and LegalForm schemas to support country-specific feature types and legal forms. - Removed duplicate keys in FeatureTypeEnum.yaml, resulting in 294 unique feature types. - Eliminated "Hypernyms:" text from FeatureTypeEnum descriptions, verifying that semantic relationships are now conveyed through ontology mappings. - Created example instance file demonstrating integration of Country with CustodianPlace and LegalForm. - Updated documentation to reflect the completion of the Country class implementation and hypernyms removal.
2.1 KiB
2.1 KiB
Geographic Restrictions - Quick Status (2025-11-22)
✅ DONE TODAY
- Created Subregion.yaml - ISO 3166-2 subdivision codes (US-PA, ID-BA, DE-BY, etc.)
- Created Settlement.yaml - GeoNames-based city identifiers
- Extracted Wikidata geography - 1,217 entities, 119 countries, 119 subregions, 8 settlements
- Identified 72 feature types with country restrictions (33 Japan, 13 USA, 3 Netherlands, etc.)
- Created annotation script - Ready to add
dcterms:spatialto FeatureTypeEnum
⏳ NEXT STEPS
Immediate (5 minutes):
cd /Users/kempersc/apps/glam
python3 scripts/add_geographic_annotations_to_enum.py
This adds geographic annotations to 72 feature types in FeatureTypeEnum.yaml.
Then (15 minutes):
- Import Subregion/Settlement into main schema (
01_custodian_name.yaml) - Add
subregion,settlementslots to CustodianPlace - Add
country,subregionslots to CustodianLegalStatus (optional)
Finally (30 minutes):
- Create
scripts/validate_geographic_restrictions.pyvalidator - Add test cases for valid/invalid geographic combinations
- Regenerate RDF/OWL schema with full timestamps
📊 KEY NUMBERS
- 72 feature types need geographic validation
- 119 countries mapped (100% coverage)
- 119 subregions mapped (100% coverage)
- Top restricted countries: Japan (33), USA (13), Norway (4), Netherlands (3)
📁 NEW FILES
schemas/20251121/linkml/modules/classes/Subregion.yamlschemas/20251121/linkml/modules/classes/Settlement.yamlscripts/extract_wikidata_geography.pyscripts/add_geographic_annotations_to_enum.pydata/extracted/wikidata_geography_mapping.yamldata/extracted/feature_type_geographic_annotations.yaml
🔍 EXAMPLES
# Netherlands-only feature type
BUITENPLAATS:
dcterms:spatial: NL
# Bali, Indonesia-only feature type
SACRED_SHRINE_BALI:
dcterms:spatial: ID
iso_3166_2: ID-BA
# USA-only feature type
CITY_OF_PITTSBURGH_HISTORIC_DESIGNATION:
dcterms:spatial: US
📚 FULL DETAILS
See GEOGRAPHIC_RESTRICTION_SESSION_COMPLETE.md for comprehensive session notes (4,500+ words).