Jump to content

Template talk:Authority control

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by Luckyz (talk | contribs) at 14:26, 11 November 2022 (→‎Should DBI been included as Biographical dictionary for Italy?). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.


Authority control incorrectly (?) identifying errors

National Diet Library ID error

Cao Zhiyun reports "The NDL id a1100032495 is not valid" but the WikiData entry flags up no issues and the link works. Does anyone know what's causing this error? – Scyrme (talk) 00:09, 15 July 2022 (UTC)[reply]

If you know what the format of this identifier should be, I can try to update it here. It seems that 0?\d{8} is not correct now — Martin (MSGJ · talk) 07:26, 29 July 2022 (UTC)[reply]
@MSGJ: Apologies for the late response. It seems like 0?\d{8} is still correct for most identifiers, however some have 9 digits and others prefix the 9 digits with a1, which is the case with Cao Zhiyun's identifier. I wasn't able to find any examples exceeding 9 digits which were not prefixed with a1. I don't know if it's possible to search through a list of every id to look for exceptions.
Examples
  • Prefixed with "a1": a1 100 032 495; a1 100 028 952; a1 100 016 921
  • 9 digits: 032 138 882; 001 360 828; 201 339 322
  • 8 digits: 00 564 222; 00 451 456; 00 090 252
My knowledge of regex notation is limited, and I'm unsure how to restate this in the proper format. I think the correct regex would be something like (a1)?[0-9]?\d{8}. Does that seem correct to you? – Scyrme (talk) 00:28, 8 August 2022 (UTC)[reply]
For a list of format violations you could refer to this. I haven't got time to check your regex just now but will look back shortly — Martin (MSGJ · talk) 08:16, 8 September 2022 (UTC)[reply]
There's one, s00946354, eight digits prefixed with an "s", which my suggested regex wouldn't cover. Perhaps (a1|s)?[0-9]?\d{8} would work, covering "a1 or s, possibly followed by a digit between 0 and 9, all before 8 digits between 0 and 9". – Scyrme (talk) 17:19, 28 September 2022 (UTC)[reply]

Testing looks good: — Martin (MSGJ · talk) 12:50, 10 November 2022 (UTC) {{authority control/sandbox|NDL=s00946354}} gives:[reply]

{{authority control/sandbox|NDL=a1100032495}} gives:

{{authority control/sandbox|NDL=00451456}} gives:

{{authority control/sandbox|NDL=032138882}} gives:

DBLP identifier errors

The authority control templates on Paul Green (engineer) and Richard Harvey (scientist) flag up that their respective DBLP ids are not valid, yet WikiData doesn't flag up any errors and their respective links ([1], [2]) appear to demonstrate that the ids are correct. Does anyone know what the issue is and how to fix it? – Scyrme (talk) 21:55, 15 July 2022 (UTC)[reply]

Paul Green and Richard Harvey are listed as exceptions to the rule on Wikidata, see wikidata:Property:P2456#P2302. I'm not sure if we could/should code up similar exceptions in Module:Authority control — Martin (MSGJ · talk) 07:30, 29 July 2022 (UTC)[reply]
@MSGJ: I think a better approach would be to update the regular expression both here and on WikiData, rather than code up ad hoc exceptions. This would make the exceptions unnecessary and prevent future errors.
WikiData exceptions
  • Type 1: 12/4426jr; 05/5804r; 82/451mp; 00/2186Cabot; 89/4185-p
  • Type 2: j/1
The first type of exceptions actually follows the first format given by Wikidata, before the |, except it appends a string of non-numerical characters to the end. The second type follows the the second format, after the |, except that it has a number after the slash instead of a letter.
\d{2,3}/\d+(-\d+)?|[a-z]/[a-zA-Z][0-9A-Za-z]*(-\d+)? < Current expression given be Wikidata.
\d{2,3}\/\d+(-\d+)?[a-zA-Z-]*(-\d+)?|[a-z]\/[0-9a-zA-Z][0-9A-Za-z]*(-\d+)? < What I think is the new, correct expression.
\d{2,3}\/\d+(-\d+)?[a-zA-Z-]*(-\d+)?|[a-z]\/[0-9A-Za-z]*(-\d+)? < This simpler expression might also work, but I'm unsure.
What do you think? Do you agree? – Scyrme (talk) 00:56, 8 August 2022 (UTC)[reply]
@MSGJ: If you are very busy, do you know of anyone else on Wikipedia I could ask for assistance with checking that my suggested regex is correct? Even if you are too busy to update the template any time soon, it could save some time to at least know that these are the correct expressions and I could update Wikidata in the meantime. – Scyrme (talk) 19:39, 27 August 2022 (UTC)[reply]
Sorry for the late reply. I suggest you code these up in Module:Authority control/sandbox and test if they work correctly. — Martin (MSGJ · talk) 07:59, 8 September 2022 (UTC)[reply]
@MSGJ: Sorry, I don't know how. I had a look at the sandbox code and tried figuring it out, but the code clearly doesn't use the notation I'm familiar with, and I don't know how to translate from one to the other. – Scyrme (talk) 17:14, 28 September 2022 (UTC)[reply]
Yes, that's correct. Lua uses a very slimmed down version of regular expressions. You can read more at https://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Patterns — Martin (MSGJ · talk) 17:25, 28 September 2022 (UTC)[reply]
\d{2,3} translates to %d%d%d? (two digits and possibly a third) — Martin (MSGJ · talk) 17:30, 28 September 2022 (UTC)[reply]
@MSGJ: I've made an attempt at translating and updated the sandbox.
I ran the test cases, which I assume uses the sandbox code, and 9 failed but they also failed after I undid my changes and appear to be entirely unrelated to DBLP and NDL. In-fact, I looked at the testcases page and I'm not sure that any of them actually check DBLP and NDL sequences.
Is there something else I should be doing to test my suggested changes? – Scyrme (talk) 12:50, 1 October 2022 (UTC)[reply]
@MSGJ: Still too busy? – Scyrme (talk) 12:30, 8 November 2022 (UTC)[reply]

{{authority control/sandbox|DBLP=12/4426jr}} gives:

{{authority control/sandbox|DBLP=89/4185-p}} gives:

Seems to work! — Martin (MSGJ · talk) 12:39, 10 November 2022 (UTC)[reply]

@MSGJ: Great! I can update WikiData, but unfortunately I can't edit the actual module on Wikipedia myself because I don't have the permissions, so I can't paste the changes from the sandbox into the live module. When you have a spare moment, could you update the module? – Scyrme (talk) 19:53, 10 November 2022 (UTC)[reply]

Does RERO need an update?

Dear Wikipedians, I have noticed that in the case of the RERO ID (obsolete) (P3065), the out-linking URL and the digits of the authority identifier might need an update. Might someone with better knowledge of this take a look? Take the example of Voltaire (which is an example in the RERO ID's Wikidata): the link his authority data connects to does not seem to work anymore, please see here. On RERO's website, the link now connects to a new "MEF ID" and different URL ending digits from the ones we have for him (02-A000173676); please see here. Would appreciate some insight on what can be done to connect to the updated RERO catalogue. Kind regards, Spinster300 (talk) 11:24, 15 September 2022 (UTC).[reply]

If there is no way to convert to the new identifier then the current identifiers are next to useless. We may be able to use the Internet Archive to retrieve these pages. — Martin (MSGJ · talk) 17:53, 28 September 2022 (UTC)[reply]
Dear Martin, I think that is a good idea for the old identifiers. While for the new identifiers, might it help if we make a complementary authority identifier like we have done for the old and new Polish and Catalonian identifiers? Several latest entries into the RERO+ catalogue seem to be importing data from IdRef and GND and making only those aforementioned MEF IDs, if you could see these examples for Walter Henry Thompson and Lyssa Kay Adams. Of course these are only suggestions, I encourage someone with more expertise in library sciences/programming authority control on Wikipedia to look into this. Kind regards, Spinster300 (talk) 19:59, 29 September 2022 (UTC).[reply]

Should DBI been included as Biographical dictionary for Italy?

Dear all, should we include Dizionario Biografico degli Italiani as a Biographical dictionary for Italy? On wikidata we have over 30 360 biographies covered. --Luckyz (talk) 13:45, 28 September 2022 (UTC)[reply]

Dear Luckyz, I support this addition. Kind regards, Spinster300 (talk) 20:08, 29 September 2022 (UTC).[reply]
@Luckyz: feel free to code this up in Module:Authority control/sandbox — Martin (MSGJ · talk) 13:04, 10 November 2022 (UTC)[reply]
@MSGJ: I tried but I don't know how to test the sandbox and, given my restricted programming skills, I could bet something is always wrong on the first try. --Luckyz (talk) 14:26, 11 November 2022 (UTC)[reply]

what is this module thing?

what is this module thing? i have not seen this before? mediawiki feature? something created just on wikipedia? thanks. limitless peace. Michael Ten (talk) 02:52, 27 October 2022 (UTC)[reply]

Please see Wikipedia:Lua — Martin (MSGJ · talk) 11:39, 27 October 2022 (UTC)[reply]