resolving lookup-list data out of sub-templates
This is a hard or maybe impossible problem to solve. Still I'll ask.
On the bg.wikipedia, it seems that a lot of the data about settlements is modularized into lookup lists in sub-templates.
- Eg take a look at this village: https://bg.wikipedia.org/wiki/Змеица
- as you see, the the page shows its parent administrative units (Област, Община)
- but in the infobox https://bg.wikipedia.org/w/index.php?title=Змеица&action=edit there's only :
| екатте = 31259 settlement ID from Bulgaria's National Statistical Institute, BG NSI
| надм-височина = 1327 elevation
| пощ-код = 4834 postalCode
| тел-код = 03043 areaCode
| сев-ширина = 41.633333 longitude
| изт-дължина = 24.25 latitude
| площ = 34,643 area
A whole bunch of other data is keyed on the екатте code.
- Look at the infobox template https://bg.wikipedia.org/w/index.php?title=Шаблон:Селище_в_България&action=edit These lines produce Област, Община:
| data14 = [[{{#ifeq:{{Селище в България/Област|{{{екатте<noinclude>|68134</noinclude>}}}}}|Софийска|Софийска област|Област {{Селище в България/Област|{{{екатте<noinclude>|68134</noinclude>}}}}}}}|{{Селище в България/Област|{{{екатте<noinclude>|68134</noinclude>}}}}}]]
| data15 = {{Селище в България/Община2|{{Селище в България/Община {{#expr: {{#expr: {{{екатте<noinclude>|68134</noinclude>}}}/2500}} round 0}}|{{{екатте<noinclude>|68134</noinclude>}}}}}}}
I don't grok them, but https://bg.wikipedia.org/w/index.php?title=Шаблон:Селище_в_България lists a bunch of "Auxiliary templates" including eg
- Шаблон:Селище в България/Община
- Шаблон:Селище в България/Община шаблон
- Шаблон:Селище в България/Община 0
- Шаблон:Селище в България/Община 1
- Шаблон:Селище в България/Община 2
Opening the last one https://bg.wikipedia.org/w/index.php?title=Шаблон:Селище_в_България/Община_2&action=edit we see a bunch of tabular data keyed on екатте, eg
{{#switch:{{{1}}}
| 3753 = VTR04
| 3767 = SFO39
| 3770 = SFO39
| 3784 = BLG40
This maps settlement with екатте=3753 to Община=VTR04, which is the BG NSI code for that Община.
The extraction http://mappings.dbpedia.org/server/extraction/bg/extract?title=Змеица&revid=&format=turtle-triples&extractors=custom is missing all of the data that is "hidden" in lookup tables.
Is this even possible to fix?