[Tagging] wikidata instead of wikipedia

Erik Johansson erjohan at gmail.com
Mon Feb 24 08:20:44 UTC 2014


Yeah it's pretty "easy" to get wikidata data. Warning though; the data
in  Wikidata is not all CC0 licensed. You never know where the data
came from they are not as strict about these things as OSM is.

lang=en;
title=OpenStreetMap;
bad_title=gracefully_handle_bad_input

curl  "www.wikidata.org/w/api.php?action=wbgetentities&sites=${lang}wiki&titles=$title|$bad_title&props=labels&props=info&format=json"|
  perl -lpe 's/([{},])/$1\n/g'


#curl "$lang.wikipedia.org/w/api.php?action=query&titles=$title&prop=langlinks&format=json&lllimit=500"|
#  sed 's/}/}\n/g'

On Sun, Feb 23, 2014 at 4:59 PM, bulwersator <bulwersator at zoho.com> wrote:
>
>
> ---- On Sun, 23 Feb 2014 06:31:18 -0800 Martin
> Koppenhoefer<dieterdreist at gmail.com> wrote ----
>
> +1, it would be premature to switch completely to wikidata at this point,
> and the human readable titles in the wikipedia tag have generally this
> advantage over machine only cryptic ids
>
> cheers,
> Martin
> _______________________________________________
> Tagging mailing list
> Tagging at openstreetmap.org
> https://lists.openstreetmap.org/listinfo/tagging
>
>
> Maybe there is a simple way to obtain wikidata id of article X on wikipedia
> Y? This would make unnecessary to introduce cryptic tags.
>
> _______________________________________________
> Tagging mailing list
> Tagging at openstreetmap.org
> https://lists.openstreetmap.org/listinfo/tagging
>



-- 
/emj



More information about the Tagging mailing list