维基数据:名字脚本

From Wikidata
Jump to navigation Jump to search
This page is a translated version of the page Wikidata:Namescript and the translation is 92% complete.

namescript是一个用户脚本,用于清理数据项的名称(名、姓等)。

根据项中的声明数据,它可自动填写所有缺失的标签、描述和别名。

设置

将下列内容加入您的common.js

mw.loader.load( '//www.wikidata.org/w/index.php?title=User:Harmonia_Amanda/namescript.js&action=raw&ctype=text/javascript' );

用法

使用该脚本前,数据项的instance of (P31)声明应有下列之一的值: male given name (Q12308941)female given name (Q11879590)family name (Q101352)double family name (Q29042997)unisex given name (Q3409032)

它还需要有效的native label (P1705)writing system (P282)声明(对日文名还需要有效的name in kana (P1814)声明)。

If all these statements are there, there is a link “add labels and descriptions” below the instance of (P31) statement. It won't overwrite any existing labels/descriptions, so you need to remove the wrong ones before using the script. The script will add all missing labels, descriptions and aliases.

目前不能处理一切书写体系。脚本目前可处理:Latin script (Q8229)kanji (Q82772)Greek alphabet (Q8216)Georgian scripts (Q161428)Hangul (Q8222)Arabic alphabet (Q8196), Hebrew alphabet (Q33513)Cyrillic script (Q8209)Armenian alphabet (Q11932)Devanagari (Q38592)

独立版本

管理员也可在自己的计算机上运行namescript的独立版本,这对于大量名称的效率高很多。 访问https://github.com/lucaswerkmeister/namescript并按显示的说明操作。