Commons:Categories

From Wikimedia Commons, the free media repository
Revision as of 15:57, 10 June 2011 by Rd232 (talk | contribs) (separate out category structure issues to Commons:Category_structure)
Jump to navigation Jump to search
Shortcuts
This project page in other languages:

A category is a software feature of MediaWiki, a special page which is intended to group related pages and media. In practice, it implies that you'll associate a single subject with a given category. The category name would be enough to guess the subject, but some extra text can be useful to precisely define it.

When creating new categories, or renaming categories to resolve naming issues, it is important to understand the Commons:Category structure.

Quick guide

  1. How to find the appropriate categories
    • Find categories with the search engine (see #Categorization tips)
    • or check how similar images are categorized (some may not be categorized though)
    • or try tools:~daniel/WikiSense/CommonSense.php
    • or start from the main topical category (Category:Topics)
    • Starting from these categories, check their parent or sub-categories to find an appropriate category. Avoid picking too general categories.
  2. Add the categories to the file/image

Categorizing pages

To add a page (be it an image, a gallery page, or a category page) to a category, add the following code to the end of the page.

[[Category:Category Name]]

For example, if you are uploading a diagram showing the orbit of comets, you could add the following to the image description page:

[[Category:Astronomy diagrams]]
[[Category:Comets]]

This will make the diagram show up in the categories Astronomy diagrams, Comets.

For information on how to find good categories for your uploads and galleries, read the section Find an appropriate category below.

Creating a new category

To create a new category:

  1. Do a thorough search, to be sure there isn't an existing category that will serve the purpose.
  2. Find images (or a gallery or other pages) which should be put in the new category. Edit this page, and at the end insert the new category reference. e.g. [[Category:Title]]. Save the edited page. The new category appears as a red link at the bottom of the page.
  3. Click on that red link. The new, empty, category page appears for editing. You can now edit the category like any other wiki page.

A category page should contain the following information (in order of importance):

  • Category-links that put it into one or more parent categories. At the bottom of the new page, insert lines of the form [[Category:Relevant categories]].
  • A short description text that explains what should be in the category. English is the preferred language for the description, other languages can be added (with the template {{ab|...}} for description in Abkhazian, {{en|...}} for description in English, etc, as listed in Commons:Templates for galleries).
  • Interwiki links to the article or category with the same topic in Wikipedia (i.e. interwiki link [[ab:...]] to the page in Abkhazian Wikipedia, [[en:...]] to the page in English Wikipedia, etc.).
  • If the category should be sorted according to a different string than the category title, add a {{DEFAULTSORT:}}. For instance, the title of a category about a person would not be the right sort string. For such categories, insert after the interwiki links a line like {{DEFAULTSORT:Lastname, firstname}} with the correct sort string. See meta:Categories#Sort key for more information.

See also Commons:Category structure#How to categorize: guidance by topic for guidance on specific classes of category, e.g. categories about #People.

Renaming or moving categories

Please see Commons:Rename a category.

Commons category structure

:see Commons:Category structure


Categorization workflow

Currently, a "bot" (an automated tool) checks if newly uploaded files are categorized in topical categories and attempts to categorize files that are not.

The workflow is the following:

  1. User uploads a new file and adds categories (or not)
  2. CategorizationBot checks if the file is categorized
  3. Users categorize files further (e.g. category diffusion below)

See also: User:CategorizationBot#Process, categorization statistics


Other, if manual, categorization workflows are possible :

  • Category filling : Use appropriate keywords in the search engine to find the files that should be in a given category, and put them there.
  • Category diffusing : Go to Category:Categories requiring diffusion, select a crowded category, create appropriate subcategories if needed, and move the files to the subcategories. Gadgets like Cat-a-lot and Hotcats can help.

Categories marked with "HIDDENCAT"

Many non-topical categories are marked with __HIDDENCAT__ on the category page (view e.g. Category:PD_NASA).

While categories are generally visible on every page, categories marked __HIDDENCAT__ are only visible:

  • on the edit screen (at the end of the screen, below the edit box)
  • on category pages
  • on file description pages and gallery pages for logged-in users: each user can choose to see them in a separate "Hidden categories" list, by checking "Show hidden categories" in the "Appearance" section of Special:Preferences.. Try any file in Category:PD_NASA.

This feature is generally used for template-based categories, such as license tag based categories. Sample: {{PD-old-100}} on a file description page adds the image to Category:Author died more than 100 years ago public domain images. These categories are generally non-topical and facilitate maintenance.

See also: mw:Help:Categories#Hidden categories

Tools

See also