- 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.
65 lines
2.1 KiB
Markdown
65 lines
2.1 KiB
Markdown
# Geographic Restrictions - Quick Status (2025-11-22)
|
|
|
|
## ✅ DONE TODAY
|
|
|
|
1. **Created Subregion.yaml** - ISO 3166-2 subdivision codes (US-PA, ID-BA, DE-BY, etc.)
|
|
2. **Created Settlement.yaml** - GeoNames-based city identifiers
|
|
3. **Extracted Wikidata geography** - 1,217 entities, 119 countries, 119 subregions, 8 settlements
|
|
4. **Identified 72 feature types** with country restrictions (33 Japan, 13 USA, 3 Netherlands, etc.)
|
|
5. **Created annotation script** - Ready to add `dcterms:spatial` to FeatureTypeEnum
|
|
|
|
## ⏳ NEXT STEPS
|
|
|
|
### **Immediate** (5 minutes):
|
|
```bash
|
|
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):
|
|
1. Import Subregion/Settlement into main schema (`01_custodian_name.yaml`)
|
|
2. Add `subregion`, `settlement` slots to CustodianPlace
|
|
3. Add `country`, `subregion` slots to CustodianLegalStatus (optional)
|
|
|
|
### **Finally** (30 minutes):
|
|
1. Create `scripts/validate_geographic_restrictions.py` validator
|
|
2. Add test cases for valid/invalid geographic combinations
|
|
3. 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.yaml`
|
|
- `schemas/20251121/linkml/modules/classes/Settlement.yaml`
|
|
- `scripts/extract_wikidata_geography.py`
|
|
- `scripts/add_geographic_annotations_to_enum.py`
|
|
- `data/extracted/wikidata_geography_mapping.yaml`
|
|
- `data/extracted/feature_type_geographic_annotations.yaml`
|
|
|
|
## 🔍 EXAMPLES
|
|
|
|
```yaml
|
|
# 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).
|