Template talk:Authority control

From Wikipedia, the free encyclopedia
Jump to: navigation, search

Ensuring single values[edit]

How does this template ensure that (for example) if a Wikidata item has two VIAF codes, it only displays one? eg/ Aeschylus has two VIAF and ISNI on Wikidata but the template only imports one of each. I've spent some time reading over Module:Authority control and can't quite figure it out. A simple template call to Wikidata would normally return something like "VIAF1, VIAF2". Andrew Gray (talk) 13:10, 9 November 2017 (UTC)

Related info. When we find doubles the VIAF coordinator merges them at VIAF, but I have not seen corrections in a while. There is a report generated at Wikidata of all entities that have multiple VIAF numbers. Here is the report at d:Wikidata:Database reports/Constraint violations/P214. I think their rule was to keep the lowest number and have the other number as a redirect, so I think the lowest number is reported in the template. There is also a report on Wikipedia assembled manually for duplicates at Wikipedia:VIAF/errors where they are broken down into categories. Some are Wikidata side errors that we can fix, and some are VIAF side errors. --RAN (talk) 14:11, 9 November 2017 (UTC)
@Andrew Gray: In most cases, the line at local statements = mw.wikibase.getBestStatements( itemId, property ) will prevent multiple from being displayed, because someone at Wikidata will probably have set one of statements (where there is more than one for a single property) to the "preferred" rank. I'm not sure if I saw anything in the module which would restrict display should two identifiers pop up with equivalent ranks. --Izno (talk) 15:48, 9 November 2017 (UTC)
@Izno: Very interesting - I had wondered if preferred rank would be the way to do it, but in the Aeschylus example (d:Q40939) both the ISNI/VIAF values have normal ranks. All very mysterious! Andrew Gray (talk) 17:48, 9 November 2017 (UTC)
As a side note, I would prefer for people to use the "deprecated" rank when an identifier use to refer to something or is an older alias (e.g., moved). Please use "preferred" rank only when there is more than one current identifier for an item. "getBestStatements" never returns statements with "deprecated" rank claims (even if those are the only ones). 50.53.1.21 (talk) 21:37, 12 January 2018 (UTC)
The module uses mw.wikibase.getBestStatements to get all values, so if there were two VIAF codes it would get both. Wikidata has some internal mechanism for deciding the order that applies if there are two statements with the same rank. The module then cheats and uses only the first returned value, so any other values are ignored. That is done with wikidataIds[1] where [1] means the first value is used. Johnuniq (talk) 22:28, 9 November 2017 (UTC)
Thanks - that's really helpful. I'll try and put some time aside to work out how to call the module properly in templates rather than using string-edit hacks :-) Andrew Gray (talk) 21:10, 15 November 2017 (UTC)
I haven't looked at what would be involved, but in principle I could modify the module so it displays all returned values, in order, or perhaps limit it to the first two in case someone goes crazy at Wikidata. I say "in principle" because I'm short of time and it would not happen soon. Johnuniq (talk) 00:19, 16 November 2017 (UTC)
I'm not sure that would be a good thing. All the best: Rich Farmbrough, 22:48, 18 November 2017 (UTC).
S
Yes, restricting it to one would be best. In most cases where there's a duplicate the assumption is that one is secondary or will be deprecated at some point, anyway. There are a few cases where double IDs are encouraged & equally valid but I don't think we currently use any here. Andrew Gray (talk) 11:16, 19 November 2017 (UTC)

Journal IDs for Wikispecies[edit]

Over on Wikispecies, where we have few if any Lua coders, we wish to extend the local version of this template to use on items about journals, and to display the Wikidata properties ZooBank publication ID (P2007) and BPH journal ID (P4569). Can anyone assist (or talk me through the process of adding them) please? Andy Mabbett (Pigsonthewing); Talk to Andy; Andy's edits 21:32, 25 November 2017 (UTC)

@Pigsonthewing: See species:Special:Diff/3537951 for adding ZooBank. There isn't a formatter URL for BPH, so I don't know what to link. — JJMC89(T·C) 22:21, 25 November 2017 (UTC)
@JJMC89: Thank you. I've added IPNI publication ID (P2008) and copied both to the live template. Is it not possible to display IDs without a link, where no Formatter URL is possible? Andy Mabbett (Pigsonthewing); Talk to Andy; Andy's edits 22:33, 25 November 2017 (UTC)
I made a minor correction at species:Module:Authority control because function names must be unique (as fixed by JJMC89 in species:Module:Authority control/sandbox). The module can do whatever is wanted, so all that is needed is an example of what should be displayed. Ideally that would be an example of a Wikidata item where BPH is specified as a property, and the wikitext that the template should output given that property. Johnuniq (talk) 22:50, 25 November 2017 (UTC)
@Pigsonthewing and Johnuniq: species:Special:Diff/3538026 will add BPH without any links. species:ISSN 0028-0836 is an example for BPH (BPH: 68374). — JJMC89(T·C) 23:08, 25 November 2017 (UTC)
Thank you, both. Andy Mabbett (Pigsonthewing); Talk to Andy; Andy's edits 00:00, 26 November 2017 (UTC)

Label of P243 propertie[edit]

hello,
I need some help, can you tel me what is the label of the propertie P243) : OCLC control number ? I try "OCLC" and it not work. Same think with WORLDCAT (WORLDCATID is for and other propertie). I want to link to the http://www.worldcat.org/oclc/$1 web site. Thanks.
--FERNANDES Gilbert (talk) 17:04, 8 December 2017 (UTC)

@FERNANDES Gilbert: This relates to a discussion at frwiki and OCLC control number (P243). Please give an example of what is wanted. You might link to an article which displays the authority control box and say what extra text should appear, with the exact URL wanted. Johnuniq (talk) 22:54, 8 December 2017 (UTC)
I do not think OCLC control number (P243) qualifies as an authority control (Q36524) or a controlled vocabulary (Q1469824) since it is a publication identifier (Q36646373) for identifying an edition (Q3331189) of a work (Q386724) (not a manuscript (Q2376293) or specific print (Q11060274) of such). A better choice would be to add FAST ID (P2163) which seems like an applicable identifier also from Online Computer Library Center (Q190593). 50.53.1.21 (talk) 21:27, 12 January 2018 (UTC)

Suggestion adding Swedish Musical Heritage P4607 to the template[edit]

Wikidata Property P4607 contains biographies of Swedish related classical composers in english

- Salgo60 (talk) 05:50, 19 December 2017 (UTC)

Feeding Wikidata identifier into Wikipedia[edit]

I am writing from the National Library Board Singapore. We would like to expose the Wikidata identifier National Library Board Singapore ID (https://www.wikidata.org/wiki/Property:P3988) in English Wikipedia. How do we proceed from here?

E.g. National Library Board (https://www.wikidata.org/wiki/Q6974124) - The National Library Board Singapore ID l26-DGZwOIE only exists in Wikidata, but not found in the authority control of the English Wikipedia article National Library Board (https://en.wikipedia.org/wiki/National_Library_Board). Is there a way to expose the Wikidata identifier in Wikipedia?

Nlbkos (talk) 06:53, 29 December 2017 (UTC)

Please link to an article here at Wikipedia where the proposed addition would make a difference. What additional text with what link would be displayed in the authority control box at the article? There are a lot of libraries and they cannot all be listed so I'm not sure what should happen. Johnuniq (talk) 07:10, 29 December 2017 (UTC)
I am assuming the desire is to add a link like the following example to the authority control at the bottom of the Catherine Lim article:
The required additions would be something like:
local function nlbLink( id )
	return '[http://eresources.nlb.gov.sg/IDDOC/NLBDM/vocab/' .. id .. ' ' .. id .. ']' .. getCatForId( 'NLB' )
end
and:
	{ 'NLB', '[[National Library, Singapore|NLB]]', 3988, nlbLink},
Of course it is true there are many libraries and the question of how notable such is with regard to authority control and if we should include it should still be debated. 50.53.1.21 (talk) 20:51, 12 January 2018 (UTC)

I've tried adding the National Library Board Singapore ID l26-DGZwOIE to the Wikipedia article https://www.wikidata.org/wiki/Q6974124 : .

However, it does not display in the Wikipedia article: Am I missing something here? Nlbkos (talk) 00:50, 2 January 2018 (UTC)

Every property and/or identifier in Wikidata is NOT automatically added to articles which include Template:Authority control. Your comments on this particular talk page seem to indicate some sort of understanding of this. 50.53.1.21 (talk) 20:51, 12 January 2018 (UTC)