Disputatio Formulae:CommuniaCat

Latest comment: abhinc 7 annos by Andrew Dalby in topic Drop the parameter?

Wikidata recensere

When a Wikidata item has more than one value for P373, this formula always reports a bad commons link. For example in page Agronomia, we have {{CommuniaCat|Agronomy|agronomiam}}, which is correct, but the formula reports an error. Commons does have a category called Agronomy, and Agronomy is the first value for P373 in the Wikidata item for agronomy (d:Q173113), but there is also a second value, Agriculture. The result of this formula on the page is link 1 to commons category Agronomy (as desired) and link 2 to commons category "Agronomy, Agriculture" which doesn't exist. A. Mahoney (disputatio) 14:20, 16 Maii 2016 (UTC)Reply

You are right. In my view, each Wikidata item should have at most one value for P373. Still, among the currently 17,521,851 Wikidata items (or: among the currently 1,443,649 Wikidata items with a P373 statement), there are currently 601 Wikidata items with more than one value for P373 (for a list, see d:Wikidata:Database reports/Constraint violations/P373#"Single value" violations), among those the Wikidata item for agronomy (d:Q173113). I have now removed the "Agriculture" value from this Wikidata item. Greetings, --UV (disputatio) 15:28, 16 Maii 2016 (UTC)Reply
Well, that's certainly the easiest fix! Thanks. A. Mahoney (disputatio) 17:10, 16 Maii 2016 (UTC)Reply

Drop the parameter? recensere

Since this formula now always uses Wikidata to determine the category to link to, and you can't override it, why do we even allow a parameter at all any more? If we just ignore the category parameter, we can instantly get rid of the errors. (We do have to keep the name-of-page-in-accusative parameter, of course.) There are some pages for which I'd prefer a link to a different category, overriding what's in Wikidata -- for example Acroterium (Thera) probably should link to the "Akrotiri Minoan site" category in Commons rather than to the main Akrotiri category, because our page is much more about the ancient site than about the modern town. But I don't see a problem with automatically using the Wikidata value and only reporting an error if there happens not to be one there. A. Mahoney (disputatio) 20:02, 7 Decembris 2016 (UTC)Reply

Well, there is a number of cases we would have to think about:
  • Not all wikidata items specify their corresponding commons category yet. We should, therefore, in any case refrain from blindly removing CommuniaCat parameter values.
  • Keeping the local parameter allows us to detect vandalism on wikidata. If the statement value on wikidata changes, the page will pop up in our error category, and we can decide whether the change is justified or whether there is some problem that needs to be corrected.
  • With the current template, when no parameter is specified, the template will pick the commons category that corresponds to the lawiki page name (and report an error if the wikidata statement value differs from that). With the proposed change, we would lose that functionality.
Regarding overriding/Acroterium: While it would be easy to add functionality to the template so that e. g. {{CommuniaCat|Akrotiri minoan site|Acroterium|comparewithwikidata=no}} would suppress the error and allow overriding the wikidata entry, I am not sure that this is the way we should go: If our article deals mostly with the Minoan site and mostly not with the modern town, wouldn't it be better to detach our article from the wikidata item about the modern town, and create a new wikidata item for the ancient site, adding thereto our article and the "Akrotiri minoan site" commons category?
Greetings, --UV (disputatio) 21:26, 7 Decembris 2016 (UTC)Reply
On the particular case of Akrotiri, when I wrote this article I made a redlink to a future article about the modern village, but it's hardly a notable place. However, there is already a different Wikidata entry d:Q24475205 for the modern village (with existing articles in English and Finnish only). I haven't checked further, I expect there is some cross-linking, but really the entry d:Q42123 ought to deal with the Minoan site only (as the English, German, French and Latin articles do) and ought to be connected with the Commons category "Akrotiri minoan site" already. Andrew Dalby (disputatio) 21:52, 7 Decembris 2016 (UTC)Reply
So, there are several things going on here -- as always! I agree, UV, that if the Wikidata property changes to something random, it's nice to have a way to find that out. Right now, though, we have so many pages in the error category (over 1800 at the moment, plus some categories) that we won't recognize changes. And most of those 1800 pages involve things like old links to categories that have been renamed in Wikidata; often the difference is merely capitalization. (I suppose those could be fixed automatically, and perhaps I should take that up as my semester winds down.) Then there's the general problem that our view of what articles are about doesn't always match the view in English WP, and Wikidata tends to follow English. Since English isn't always internally consistent (if there could be two different articles on a topic, it will have at least two), we can't exactly take them as a model, nor should we try, mea sententia (though I know some editors disagree). Finally, there are particular cases like Akrotiri, which we can deal with as they come up -- here, perhaps changing Wikidata is the right move. Also I'd rename the category in Commons to "Akrotiri Minoan site," pedantically. :-) A. Mahoney (disputatio) 19:40, 8 Decembris 2016 (UTC)Reply
Well, luckily, there is no set date by which we would have to have dealt with all 1800 pages in the error category – whenever an editor comes around to improve one of those pages, he/she will hopefully notice the two commonscat links, check the two and make the necessary changes.
I agree that a bot would be great that would check whether the wrong link is a "category redirect" on commons (example: our article Séné links to commons:Category:Séné, which is a "category redirect" on commons to commons:Category:Séné (Morbihan)), and check whether this redirect target equals the property value at wikidata ({{#property:P373|from=Q128078}}: Séné (Morbihan))), and if both conditions are met, change the link in our article accordingly. Such a bot could reduce the number of pages in our error category, but I currently do not have sufficient time to do this myself.
I have now changed the wikidata items about Akrotiri, and nominated the commons category for renaming at commons.
Greetings, --UV (disputatio) 23:05, 8 Decembris 2016 (UTC)Reply
Thanks, UV, for making the necessary changes at Wikidata. I didn't attempt it because at that moment I just didn't have time to do the job properly! Andrew Dalby (disputatio) 12:06, 9 Decembris 2016 (UTC)Reply
Revertere ad "CommuniaCat".