Jump to content

User:Ohconfucius/script/Common Terms

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Ohconfucius (talk | contribs) at 06:49, 20 May 2011. The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

Please refer all technical matters (only) to me at my talk page – it's not my fault if someone misuses this script.

Installing the script

  1. Assuming that you are now using the new skin... Open/create your vector.js page by clicking on this link.
    • Alternatively, go to your user page and append '/vector.js' to the end of the URL.
      If you are still using the old skin, open/create your monobook.js page, by clicking on this link.
      If you make a straight copy of this script, instead of "importing" it, you may not benefit from the enhancements and bug-fixes that are made from time to time. In the latter case, you may choose to watchlist this page so you will know when to update your cache for modifications to this script.
  2. Copy the following command onto your vector.js or monobook.js page:
    importScript('User:Ohconfucius/script/Common Terms.js');  //[[User:Ohconfucius/script/Common Terms.js]]
  3. Save the page and (re-)load it – refresh the cache by following the instructions at the top of your vector.js or monobook.js page.
  4. Bookmark the script page. This will be your cue to to purge the cache on your browser for any updates to take effect.

Use with AWB

A module adapted for use with AWB is available at User:Ohconfucius/AWB modules/Unlinking.

Actions and test

Use of the Safari browser is highly recommended. I have found it consistently executes much faster in Safari than Firefox, but feel free to give me your feedback on that issue. It runs quickly as it is composed of fairly straightforward regexes.

Once you are in edit mode, there is ONE button from this script in the toolbox in the left margin:

  1. Delink COMMON terms

By consensus, articles should be suitably linked. In my experience, a large number of Wikipedia articles link to common terms, even when this does not enhance the readers' understanding of the subject in question. Common words like 'English', 'President of the United States', 'United States dollar', 'singer', 'newspaper', 'sitcom', 'divorce', heart attack' are routinely linked, usually just because they appear relevant at first glance. However, on deeper reflection it is obvious that they impart a definition, and no greater understanding of the subject to the reader.

Chain-linking – a frequent sight – is detrimental to parsing and to the click-through, as well as to the aesthetics of an article. Links to articles on current-existing countries, where part of a chain of links, are also a frequent sight. The script will remove all instances of country links where they are preceded by another linked term. Specific piped links to US cities, districts of London, Oxford and Cambridge colleges are simplified to remove unnecessary parts of 'chain links' rather than total unlinking. (for example, '[[Wichita, Kansas|Wichita]], [[Kansas]]' becomes '[[Wichita, Kansas|Wichita]], Kansas'). Chain links involving certain countries (namely, France, England, Spain, Italy, Germany, Canada, China) and their subdivisions are removed: thus [[Munich]], [[Bavaria]], [[Germany]] will be simplified to [[Munich]], Bavaria, Germany.

It so happens that many of these 'most-overlinked terms' include many of the top 100 most-linked wikipedia articles, and may remove most serious cases of overlinking in the judgement of the author, removal of some or other of these links may not be appropriate in 100 percent of cases.

Users are reminded of the following provisions of Wikipedia:Manual of Style (linking):

Overlinking and underlinking

Provide links that aid navigation and understanding, but avoid adding obvious or redundant links. An article is said to be underlinked if words are not linked that aid understanding of the article. However, overlinking should be avoided, as it can make it more difficult for the reader to identify and follow those links which are likely to be of value.

  • Do not link to a page that redirects back to the page the link is on.
  • Do not be afraid to create links to potential articles that do not yet exist (see Red links below).
  • Think before removing a link—it may be useful to other readers.
  • If you feel that a certain link does not belong in the body of the text, consider moving it to a "See also" section at the bottom of the article. (Remember that links can also be useful when applying the "What links here" feature from the target page.)

Some editors feel that the lead section is a special case. It may be desirable to have a smaller proportion of links in the lead section than in the main text; while some links make it easier to scan a lead by highlighting key terms, too many make it harder. On the other hand, in technical articles that use many uncommon terms in the introduction, a higher-than-usual link density in the lead section may be necessary to facilitate understanding. In such cases, try to provide an informal explanation in the lead, avoiding using too many technical terms until later in the article—see WP:Make technical articles accessible and point 5 of WP:NOT#Wikipedia is not a manual, guidebook, textbook, or scientific journal.

Known limitations

The script

  • is binary – links conforming to a certain pattern are removed wholescale and without exception. The user may need to reinsert the first occurrence of the link should he judge it necessary. Some countries (those permanent members of the UN Security Council), cities (major capitals) and states (Florida, California, New York) are deemed by the author to be so well known that they are unlinked)
  • may be non-exhaustive in unlinking piped variants of terms, as some very creative pipings are created. There are limitless permutations editors use to pipe links, and not all are removed.

Disclaimer

Users are expected to exercise careful judgement in the context of each article in which they run this script. Use at your own risk and make sure you check the edit changes before you save.

Test page

A test page is available at User:Ohconfucius/Common Terms test page. As the script is frequently added to (almost on a daily basis), the list may not be up to date and may also be incomplete; a small number of cases are not unlinked by the script (and may be for illustrative purposes). Please feel free to update any omissions.