Hey there,
I stumbled upon an inconsistency when parsing the dumpfile JSON:
In item Q58404 (Haaften) the aliases are an empty array, as in
"aliases":[]
The same holds for Q15982 (Wernigerode), wich also has no aliases and therefor an empty array.
In item Q189889 (Chicago) the aliases are an object:
"aliases":{…}
The same is the case for Q42 (Douglas Adams).
Which one should it be now? I suspect there is an error during the writing of the dumpfiles…
-- Fredo
In the dumps you are seeing the internal serialization format which is not stable and can change and may differ between different versions of various items created at different times.
Currently in the internal format will do the following: No aliases will appear as "aliases":[] Aliases will appear as "aliases":{"en":["no1","no1"]}
Addshore
On 27 February 2014 14:19, Fredo Erxleben fredo.erxleben@tu-dresden.dewrote:
Hey there,
I stumbled upon an inconsistency when parsing the dumpfile JSON:
In item Q58404 (Haaften) the aliases are an empty array, as in
"aliases":[]
The same holds for Q15982 (Wernigerode), wich also has no aliases and therefor an empty array.
In item Q189889 (Chicago) the aliases are an object:
"aliases":{...}
The same is the case for Q42 (Douglas Adams).
Which one should it be now? I suspect there is an error during the writing of the dumpfiles...
-- Fredo
Wikidata-tech mailing list Wikidata-tech@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikidata-tech
Seriously?
Suggestion for unification: Use an Array with JSON-Objects in it. Optionally grouped by language group:
like
"aliases":[ {"de":["foo", "f.Oo"],"de-formal":["formale Objektorientierung"]}, {"fr":["oof"]} ]
Anyway, I taught my code now to guess… :P
On 27.02.2014 14:25, addshorewiki wrote:
In the dumps you are seeing the internal serialization format which is not stable and can change and may differ between different versions of various items created at different times.
Currently in the internal format will do the following: No aliases will appear as "aliases":[] Aliases will appear as "aliases":{"en":["no1","no1"]}
Addshore
On 27 February 2014 14:19, Fredo Erxleben <fredo.erxleben@tu-dresden.de mailto:fredo.erxleben@tu-dresden.de> wrote:
Hey there, I stumbled upon an inconsistency when parsing the dumpfile JSON: In item Q58404 (Haaften) the aliases are an empty array, as in "aliases":[] The same holds for Q15982 (Wernigerode), wich also has no aliases and therefor an empty array. In item Q189889 (Chicago) the aliases are an object: "aliases":{…} The same is the case for Q42 (Douglas Adams). Which one should it be now? I suspect there is an error during the writing of the dumpfiles… -- Fredo _______________________________________________ Wikidata-tech mailing list Wikidata-tech@lists.wikimedia.org <mailto:Wikidata-tech@lists.wikimedia.org> https://lists.wikimedia.org/mailman/listinfo/wikidata-tech
Wikidata-tech mailing list Wikidata-tech@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikidata-tech
On 27/02/14 14:52, Fredo Erxleben wrote:
Seriously?
Suggestion for unification: Use an Array with JSON-Objects in it. Optionally grouped by language group:
like
"aliases":[ {"de":["foo", "f.Oo"],"de-formal":["formale Objektorientierung"]}, {"fr":["oof"]} ]
Anyway, I taught my code now to guess… :P
The good thing is that all content of the dump files is used by Wikibase to display/edit pages on the live system. You might encounter some inconsistencies when the format changed over time and some pages did not get updated since, but there is at least one implementation that manages to interpret all the files as they are.
There are also recurring discussions to change the format in small or in big steps. Ideally, we would like to use the official external format for consistency but that would be a very big change from what is done now (so big that it is not done lightly). Once dumps in the official format are available, this will also be less of an issue.
Cheers,
Markus
On 27.02.2014 14:25, addshorewiki wrote:
In the dumps you are seeing the internal serialization format which is not stable and can change and may differ between different versions of various items created at different times.
Currently in the internal format will do the following: No aliases will appear as "aliases":[] Aliases will appear as "aliases":{"en":["no1","no1"]}
Addshore
On 27 February 2014 14:19, Fredo Erxleben <fredo.erxleben@tu-dresden.de mailto:fredo.erxleben@tu-dresden.de> wrote:
Hey there, I stumbled upon an inconsistency when parsing the dumpfile JSON: In item Q58404 (Haaften) the aliases are an empty array, as in "aliases":[] The same holds for Q15982 (Wernigerode), wich also has no aliases and therefor an empty array. In item Q189889 (Chicago) the aliases are an object: "aliases":{…} The same is the case for Q42 (Douglas Adams). Which one should it be now? I suspect there is an error during the writing of the dumpfiles… -- Fredo _______________________________________________ Wikidata-tech mailing list Wikidata-tech@lists.wikimedia.org <mailto:Wikidata-tech@lists.wikimedia.org> https://lists.wikimedia.org/mailman/listinfo/wikidata-tech
Wikidata-tech mailing list Wikidata-tech@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikidata-tech
Wikidata-tech mailing list Wikidata-tech@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikidata-tech
wikidata-tech@lists.wikimedia.org