Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

resolving lookup-list data out of sub-templates #305

Open
VladimirAlexiev opened this issue Jan 13, 2015 · 0 comments
Open

resolving lookup-list data out of sub-templates #305

VladimirAlexiev opened this issue Jan 13, 2015 · 0 comments

Comments

@VladimirAlexiev
Copy link
Member

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.

| екатте        = 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.

| 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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants