3.8 KiB
3.8 KiB
G-Class (Gallery) Query - Quick Start Guide
Status: ✅ Query ready for execution
Last updated: 2025-11-16T10:45:06Z
Quick Execute
Step 1: Copy the query
cat data/wikidata/GLAMORCUBEPSXHFN/G/queries/gallery_query_updated_20251116T104506.sparql
Step 2: Go to Wikidata Query Service
Visit: https://query.wikidata.org
Step 3: Paste and run
- Paste the query into the editor
- Click "Execute" (blue triangle button)
- Wait ~10-30 seconds for results
Step 4: Download results
- Click "Download" → "CSV"
- Save as:
gallery_hyponyms_20251116.csv
What This Query Does
Finds: All Wikidata entities that are subclasses of 14 verified gallery types
Excludes: 1,819 Q-numbers already in hyponyms_curated.yaml
Returns: Up to 10,000 results with:
- Q-number (e.g., Q123456)
- Primary label (English + 38 other languages)
- Alternative labels
Base Classes Included (14 total)
Core Types (4)
- Q1007870 - Art gallery (space/building)
- Q98818526 - Art gallery (institution/organization)
- Q3196771 - Art museum (institution)
- Q207694 - Art museum (building/space)
Specialized Types (4)
- Q1475403 - Kunsthalle (temporary exhibitions)
- Q56856618 - Commercial art gallery
- Q16038801 - Contemporary art gallery
- Q67165238 - Noncommercial art gallery
Institutional Variants (3)
- Q3844310 - National gallery
- Q4034417 - Artist-run space
- Q16002704 - Alternative exhibition space
Physical Variants (3)
- Q1759852 - Sculpture garden
- Q108860927 - Contemporary art museum (type)
- Q7094057 - Online art gallery
Expected Results
Likely Categories
- ✅ Various gallery subtypes (commercial, non-profit, contemporary, etc.)
- ✅ National/state galleries (Tate, National Gallery, etc.)
- ✅ Regional gallery types (German kunsthalles, French galeries, etc.)
- ✅ Artist-run and alternative spaces
- ✅ Sculpture parks and outdoor exhibition spaces
Potential False Positives
- ⚠️ Museums with "gallery" in name (check for permanent collections)
- ⚠️ Personal art collections (not public institutions)
- ⚠️ Obsolete/historical gallery types
Processing Results
After Download
- Open CSV in spreadsheet software
- Review first 50 rows - check for obvious false positives
- Group by pattern:
- Gallery types (commercial, non-profit, etc.)
- Geographic variants (regional gallery types)
- Specialized galleries (photo, sculpture, design)
- Validate against Wikidata:
- Click Q-number links
- Read descriptions
- Check "instance of" (P31) and "subclass of" (P279) properties
Adding to Curated Vocabulary
# Add verified Q-numbers to hyponyms_curated.yaml
# Format:
- label: Q123456
text: Gallery Type Name
class: G
parent_class: Q1007870 # or appropriate parent
Troubleshooting
Query Timeout
- Problem: Query exceeds 60-second limit
- Solution: Already optimized with LIMIT 10000
No Results
- Problem: All hyponyms already excluded
- Solution: This means vocabulary is complete! ✅
Too Many Results
- Problem: Over 10,000 matches
- Solution: Review FILTER chunks, may need to add more exclusions
Documentation
- Full verification report:
VERIFIED_Q_NUMBERS.md - Session summary:
/docs/sessions/SESSION_SUMMARY_20251116_G_CLASS_VERIFICATION.md - Query metadata:
gallery_query_updated_20251116T104506.yaml
Next Steps After Execution
- ✅ Download CSV results
- ⏳ Review for false positives
- ⏳ Add valid Q-numbers to
hyponyms_curated.yaml - ⏳ Regenerate query (will now exclude newly added Q-numbers)
- ⏳ Repeat until no new valid results found
Ready to execute: https://query.wikidata.org
Query file: gallery_query_updated_20251116T104506.sparql