everypolitician / compare_with_wikidata

Library for diffing Wikidata and CSVs
MIT License
2 stars 0 forks source link

Full Wikidata URLs expand oddly #65

Closed tmtmtmtm closed 7 years ago

tmtmtmtm commented 7 years ago

In https://www.wikidata.org/wiki/User:Oravrattas/prompts/Riigikogu_13_EveryPolitician, the SPARQL query doesn't convert the IDs to strings, so these are getting returned as e.g. http://www.wikidata.org/entity/Q12358429

The Q part of these is then getting expanded separately, leading to some rather odd output

screen shot 2017-08-18 at 10 27 46

Ideally the code that converts Q12358429 into {{Q|12358429}} would also Do The Right Thing with the full URL version too, so that the SPARQL-query-writer doesn't need to do the awkward coercion dance, but if that's too complex for now, we should anchor the substitution better.

tmtmtmtm commented 7 years ago

Hmmm. Actually, this is probably going to need to be solved at a different level, as if we only do this at output, we'll get lots of rows that appear to be diffless diffs.

Urmas Kruuse (Q3741429)->Urmas Kruuse (Q3741429)
chrismytton commented 7 years ago

This has now been fixed and deployed, so the Riigikogu should hopefully be less odd now.