Help:Categorization

From AHWiki
Jump to: navigation, search
For a list of current AHWiki categories, see Special:Categories
For a quick introduction to categories, see AHWiki:Categorization FAQ. For detailed technical information on how to use categories, see Help:Category.

When to use categories[edit]

Categories (along with other features like cross-references, lists, and infoboxes) help readers find information, even if they don't know that it exists or what it's called.

Every page in the article namespace should belong to at least one category. The categories to be included, which serve as classifications, should be the significant (useful) topics to which the subject of the article most closely belongs to as a member, and where readers are most likely to look if they can't remember the name of the thing they are trying to look up. For example:

Article: Michael Jackson
Useful category: Category:Pop singers
Not as useful: Category:Musicians whose first name starts with M

Questions to ask to determine whether it is appropriate to add an article to a category:

  • If the category does not already exist, is it possible to write a few paragraphs or more on the subject of the category, explaining it?
  • If you go to the article from the category, will it be obvious why the article was put in the category? Is the category subject prominently discussed in the article?
  • Does the category fit into the overall category system? Categories that don't fit are often deleted. To familiarize yourself with the types of categories that routinely get deleted read AHWiki:Overcategorization.

If the answer to any of these questions is no, then the category is probably inappropriate. Note that it is always appropriate to add articles to categories that fit into well established taxonomies. For example, every article about a musical album is categorized in some [[Category:Artistname albums]] category, which is in turn categorized in Category:Albums by artist.

Guidelines[edit]

Some general guidelines[edit]

  1. Categories are mainly used to browse through similar articles. Make decisions about the structure of categories and subcategories that make it easy for users to browse through similar articles.
  2. An article will often be in several categories. Restraint should be used as categories become less effective the more there are on any given article. Use the Template:Too many categories tag if you feel the article is in too many categories.
  3. Usually, articles should not be in both a category and its subcategory. For example, Golden Gate Bridge is in Category:Suspension bridges, so it should not also be in Category:Bridges. However, there are occasions when this guideline can and should be ignored. For example, Robert Duvall is in Category:Film actors as well as its subcategory Category:Best Actor Academy Award winners. See #5 for another exception. For more about this see AHWiki:Categorization and subcategories
  4. Check to see where siblings of the article reside. If there are few if any articles in a category, the article probably belongs in one of the subcategories.
  5. Articles should be placed in categories with the same name. However, the article and the category do not have to be categorized the same way. The article can also be placed in categories populated with similar articles. The category can be put into categories populated with similar subcategories. For an example of this see George W. Bush and Category:George W. Bush.
  6. There are often occasions when articles might ideally be moved from a category to two or more of its subcategories, but not all of the subcategories exist. In such cases consider creating the additional subcategories, but if you decide not to do so, leave the articles in the parent category for the time being.
  7. Categories appear without annotations, so be careful of NPOV when creating or filling categories. Categories that are not self-evident, or are shown through reliable sources to be controversial, should not be included on the article; a list might be a better option.
  8. An article should normally possess all the referenced information necessary to demonstrate that it belongs in each of its categories. Avoid including categories in an article if the article itself doesn't adequately show it belongs there. For example, avoid placing a category for a profession or award unless the article provides some verification that the placement is accurate. Use the {{Category unsourced}} tag if the article is in a category but no sources demonstrate the category is appropriate.
  9. Generally, the relationship between an article and its categories should be definable as "(Article) is (category)": John Goodman is an American actor, Copenhagen is a city in Denmark, Jane Austen is an English writer, etc. Do not apply categories whose relationship to the topic is definable only as "(Article) is a subject related to (category)", such as filing a teacher directly into Category:Education, an album directly into Category:Music or a book about skydiving directly into Category:Parachuting. Similarly, categorize articles by characteristics of the topic, not characteristics of the article: a biographical article about a specific person, for example, does not belong in Category:Biography.
  10. If you don't know where to put an article, don't worry about it. Instead of adding a category, add the {{uncategorized}} template to bring attention to the article. (Include the "|date = Month YYYY" parameter so a bot doesn't have to add this, in a separate edit.) Editors who love to categorize articles will find a good home for your article.
  11. Bend the rules above when it makes sense, especially when it is the best solution that can be found under the circumstances.

Categories vs. Lists vs. Navigational Templates[edit]

Categories are not the only way to organize articles. For alternative methods of grouping articles, and the circumstances in which they should be used, see AHWiki:Categories, lists, and navigational templates.

Categories applied to articles on people[edit]

A separate AHWiki page AHWiki:Categorization of people was created to help you in designing, applying and checking categories that are used for articles on people.

Categories do not form a tree[edit]

Each AHWiki article can appear in more than one category, and each category can appear in more than one parent category. Multiple categorization schemes co-exist simultaneously. In other words, categories do not form a strict hierarchy or tree structure, but a more general directed acyclic graph (or close to it; see below).

Nevertheless, parts of the category graph will be tree-like, and it may be convenient to think of parts of the category graph as being like multiple overlapping trees. When applying the guidelines above, consider each tree to be independent of the overlapping trees. A person browsing through a hierarchy should find every article that belongs in that hierarchy. This can lead to a good deal of debate as to what the hierarchies actually are. To clarify the structure of the hierarchy and help people browse through it, you can add a classification to each category. For more about this, see AHWiki:Classification.

Cycles should usually be avoided[edit]

Although the MediaWiki software does not prevent cycles (loops), these usually should be avoided. Cycles can be confusing to some readers, they can challenge some automated searching processes, and they can grow quite large. For example, in January 2006 a 22-member category cycle was discovered and eliminated.

However, acceptable loops also exist. Self-referencing systems such as the meta- fields naturally create cycles that provide many examples. This type of cycle involves making a category one of its own subcategories. A real-world example of a self-referencing system is “education about education,” such as:

Classification: Education: Social sciences: Academic disciplines: Academia: Education: ...

Another type of cycle involves making two categories subcategories of each other. Loops such as these can be avoided by linking the categories manually to each other by adding "See also:Category:Foo" to each category page. For an example of this see Category:World Trade Center and Category:September 11, 2001 attacks.

How to categorize an article[edit]

Template:Style Categorizing an article is simply performed by editing it to include one or more category declarations. For instance, to add Felis silvestris catus article to the "fluffy creatures" category, you would edit the article and enter [[Category:Fluffy creatures]] at the bottom, but before any stub templates and interlanguage links. The appeal of categories is that unlike lists, they update themselves automatically, and you don't have to edit the category to add an article to it. However, categories are not a substitute for lists, and you will find that many articles belong to both lists and categories.

When adding an article to a category, or creating categories, one should be careful to use the correct categories and subcategories. Horizontal categorization, directly below, refers to placing an article in the correct category while vertical categorization refers to placing an article in the correct subcategory.

When assigning an article into categories, try to be thorough in a "horizontal" sense. The topic may be associated with a geographic area, a historical period, an academic subfield, a certain type of thing (like a food or an ornament), and/or a special interest topic (like Roman Empire or LGBT). You might need to poke around the category hierarchy a bit to find the right place. Try searching for articles similar to the article you are categorizing to get ideas or to find the most appropriate place.

In the "vertical" dimension, AHWiki has traditionally been more frugal, placing articles only in the most specific categories they reasonably fit in. Thus, if there is a Category:American film actors, John Wayne would go there and not in Category:Film actors or Category:American actors. However, there is a school of thought that argues that, because different users may be interested in different categories, and because placing articles in multiple categories takes up minimal additional space, in some cases one should place articles in all the categories that apply.

Categories should always be applied directly: for instance, to place John Wayne in Category:American film actors as noted above, place [[Category:American film actors|Wayne, John]] at the bottom of the article. Using [[Category:Actors|Film]] or [[Category:Film actors|American]] does not produce the desired result.

For more about this see AHWiki:Categorization and subcategories

When creating categories...[edit]

Category naming[edit]

Categories follow the same general naming conventions as articles, for example do not capitalize regular nouns. For specific conventions related to categories, see AHWiki:Naming conventions (categories). Whatever categories you add, make sure they do not implicitly violate the neutral point of view policy. If the nature of something is in dispute (e.g., if an event is considered a war crime), you may want to avoid labelling it or mark the categorization as disputed. Most categorizations are pretty straightforward, though.

Look before you leap[edit]

Before creating a category, look to see if one already exists. The best way to do this is to first add the category to your article but preview before saving. When previewing a page, scroll right to the very bottom of the browser window to see the categories. If the category appears in blue, the category already exists. If it is in red, then you will be creating a new category. Check the capitalization of the category name. For any red categories, you should look for categories with similar names before creating a new category. One way to do this is to think of the parent category for the new category. Search for it and then look at the subcategories in the parent. You may find that a category already exists that is similar to the one you are thinking about creating.

For a list of existing categories see Special:Categories

Before creating a new category, familiarize yourself with all the guidelines on this page, and related pages. Pay particular attention to the established naming conventions for categories. Categories are deleted, merged and renamed at AHWiki:Categories for discussion. For more about types of categories that may be likely to get deleted, see AHWiki:Overcategorization.

You may see some inconsistencies when first creating the category: it may alternate between appearing empty and appearing with your first additions. It will probably correct itself in a few minutes. Note that, although "uncreated" categories will correctly list articles that have been assigned to them, the category page itself does not exist until it is manually created. The easiest way to create the category page is to follow the red category link from your article and create a new category page with a parent category and a category description as explained in the next section.

How to create subcategories[edit]

Subcategories may be created by putting [[Category:parent_category_name]] onto the page that you would like to make into a subcategory. This may seem counterintuitive, because you edit the subcategory page rather than the parent category page.

Let's say that you wanted to make the category called Roses into a subcategory of the category called Flowers.

Step 1 - Go to the page called [[Category:Roses]], and click edit this page.
Step 2 - Place the text [[Category:Flowers]] within the body of the [[Category:Roses]] article, and save.
Finished! Roses is now a subcategory of Flowers, and [[Category:Roses]] will be visible on [[Category:Flowers]].

When writing the description for a category try to give it at least two parent categories. For example, Category:British writers should be in both Category:Writers by nationality and Category:British people. A few categories do only merely subdivide their parent category, but unless the parent category has many potential articles under it, or many potential subdivisions, if you can't think of a second parent category, it might be a better idea to fold your smaller category into the parent.

How to delete or rename a category[edit]

Please refer to AHWiki:Categories for discussion

Organizing categories[edit]

Large categories[edit]

When there are more than 200 entries in a category, only 200 are displayed on the screen and users have to click through multiple screens to see all the entries. To make it easy to navigate, add a TOC (table of contents). TOCs are added by typing:

{{CategoryTOC}} - which adds a complete TOC (Top, 0 - 9, A-Z)
{{CatAZ}} - which adds a TOC without numbers. This is for categories with members that only start with letters.

Another possibility is dividing the category into several subcategories. Note that there is no technical consideration, policy or guideline requiring that large categories must be divided into smaller subcategories. When creating subcategories, group similar articles together in a meaningful and useful way that will make it easy for readers to navigate later. Remember that several subcategorization schemes can coexist (for example, if Category:Software gets too big, you don't have to choose between subdividing it by function or subdividing it by platform, you can simultaneously subdivide it in both ways).

How to depopulate a very large category[edit]

If you decide that a large category should be depopulated and the entries re-categorized into sub-categories, add this template to the category page:

{{Verylarge}}

For large categories that will require continual diffusion into sub-categories (such as categories of people), add this template to the category page:

{{catdiffuse}}

Subcategories of large categories[edit]

The names of all subcategories may not show in the first display of a multi-screen category listing, even if there are only a few subcategories; the same alphabetical split is used for the subcategory list as for the article list. To make all next level sub-categories immediately visible, add this code to the page as well:

<categorytree>Category name</categorytree>

Grouping categories[edit]

A set of related categories often forms a hierarchy or a nexus. This can take several different forms, all of which are welcome and encouraged:

Searching for articles in categories[edit]

In addition to browsing through hierarchies of categories, it is possible to use the search tool to find specific articles in specific categories. This can be used to find articles that are members of more than one category (see AHWiki:Category intersection — a proposal for a more sophisticated version of this feature). To search for articles in a specific category, type +incategory:"CategoryName" in the search box. For example +incategory:"Suspension bridges" +incategory:"Bridges in New York City" will return the articles that are common to both categories — the suspension bridges in New York City.

Other requirements[edit]

Links to categories[edit]

You can create a link to a category page without adding the page to that category by inserting a colon before the word Category. For example, [[:Category:1984]] produces Category:1984.

In some cases, particularly in the middle of a category tree, it is helpful to use {{cat see also}} to expose the existence of important sub-categories lower down in the hierarchy. This prevents newer editors from incorrectly adding articles to a higher category level, and readers in locating such. On particularly well-populated categories, it can be used to bring the default skin's 'parent categories' (which display at the page bottom) up above the page lists to ease navigation. The similar template can be utilized on lower level categories to give editors and browsing customer readers ready access to commons subtrees. See Template:Cat for an example.

Outside of mainspace, the following templates can be used to display a category in different ways, or link to its maintenance pages.

  1. {{cl}} produces Template:Cl
  2. {{ccl}} produces Template:Ccl
  3. {{lcs}} produces Template:Lcs

AHWiki namespace[edit]

Mainspace articles do not belong in categories relating to the project namespace. For example, WikiProject and assessment categories belong on the talk pages of articles. Their relevance is generally exclusive to editors and do not aid in readers' browsing.

Maintenance categories[edit]

Categories which refer not to the subject of an article but to the present status of an article (Articles needing cleanup, Articles containing unsourced statements etc.) are known as maintenance categories. These do not help users navigate the encyclopedia, but assist in AHWiki maintenance projects. Articles are normally placed in these categories through the addition of certain templates, such as {{cleanup}} and {{fact}}.

Since these categories do not aid navigation, they should not be displayed in the Categories section of article pages. This is ensured by adding the following template: {{hiddencat}} to the category page, which makes use of the magic word __HIDDENCAT__. (One exception to this are the maintenance categories dealing with uncategorized articles; these categories should not be hidden.) However, to allow would-be maintainers to find the relevant category, it is suggested that an inline link to the category be included in the template itself, using the [[:Category:XXX]] syntax. (Notice also that any user may elect to unhide hidden categories, using My Preferences.)

Hidden categories may be found in Category:Hidden categories.

User namespace[edit]

User pages do not belong in mainspace categories such as Category:Living people or Category:Biologists, which are reserved for articles of the encyclopedia (in mainspace).

Likewise, user subpages that are draft versions of articles should not be categorized into mainspace categories. If you copy an article from mainspace to userspace and it already has categories at the bottom, you can decategorize by one of the above ways. Restore the categories when you restore the article into mainspace.

However, it is appropriate to add user pages to user categories (subcategories of Category:AHWikins) such as Category:AHWikin biologists. Such userspace categories are intended for the purposes of navigation, and collaboration with other users, as AHWiki is not a social networking site.

See AHWiki:User categories for further information.

Image namespace[edit]

See categorizing images for information on how to categorize images. For a place to start, see Category:AHWiki images by subject or its parent category Category:AHWiki images. You may need to navigate the category hierarchy to find the appropriate category.

Redirected categories[edit]

Although it is possible to attempt to redirect categories by adding a line such as #REDIRECT [[:Category:Automotive technologies]] to a category, it is not generally recommended because of limitations in the mediawiki software. Categories "redirected" in this way do not prevent the addition of articles to the redirected category. Articles added to the "redirected" category do not show up as in the target category. Until these issues are addressed (in future versions of the software), #REDIRECT should not be added to category pages.

"Soft" redirects for categories can be created using {{Category redirect}}. A bot traverses categories redirected in this manner moving articles out of the redirected category into the target category, see Template talk:Category redirect.

Category sorting[edit]

Pipe tricks and sort keys[edit]

Contrary to some expectations, text after a pipe ("|") in a category link is not used in place of the category text. Rather, this text is used as the sort key on the category page itself. However, again contrary to expectations, that sort text is not displayed. One common application is to ignore "The" in article names, so [[Category:Rock and Roll Hall of Fame inductees|Beatles, The]] will make "The Beatles" list under B rather than T in the category — however, on the category page itself, the listing will still display as The Beatles.

As another example, the Category:Three-digit Interstate Highways uses this property to sort secondary interstates by their primary. That is, the category link in the article for Interstate 190 (South Dakota) is [[Category:Three-digit Interstate Highways|90-1 South Dakota]]. This causes "Interstate 190 (South Dakota)" to be listed right after "Interstate 190 (New York)" and right before "Interstate 290 (Illinois)" under the heading "9" in the category page.

This feature is very useful for categories in which:

Using this method to sort category entries is sometimes informally referred to as the pipe trick. However, this use of the pipe character is very different from the original MediaWiki pipe trick which allows one to easily hide parenthetical disambiguation in links.

Sort key shortcuts[edit]

Setting a default sort key[edit]

The default sort key of a page for categories can be changed using the {{DEFAULTSORT}} magic word. For instance, on George Washington, {{DEFAULTSORT:Washington, George}} would cause [[Category:United States presidents]] to be equivalent to [[Category:United States presidents|Washington, George]], not [[Category:United States presidents|George Washington]]. This is especially useful when the article belongs in many categories. If more than one default sort key magic word is present on a page, the last occurrence is the one used. The {{DEFAULTSORT}} magic word affects all categories that the article is in, regardless of the position of the magic word relative to the category. It does not just affect subsequent categories. The default sort key can be overridden for individual categories applied to an article by manually applying a sort key.

In the absence of a {{DEFAULTSORT}}, the default sort key is the article title. It is therefore not technically necessary to provide a {{DEFAULTSORT}} value if the article title is the desired default sort key. However, it is still a good idea to provide an explicit {{DEFAULTSORT}} in these cases. Explicitly stating a default sort key is preferable to having no default sort key, as this leaves a record of the decision that the title is the sort key. Leaving it blank means that later editors cannot tell which articles have been checked for default sort and which have not.

Some editing tools, notably AWB, will attempt to infer an appropriate {{DEFAULTSORT}} value if one is not provided. For example, the most appropriate default sort key for Acacia acanthoclada is the article title, yet that article is also in Category:Acacia with the sort key "Acanthoclada". If "Acacia acanthoclada" is not explicitly declared the default sort key, then AWB may declare the default sort key to be "Acanthoclada". There are also several bots that add DEFAULTSORT if existing category sort keys are in agreement, and remove the un-needed category sort keys: see the requests for approval for SmackBot XIII and BOTijo 5.

An easy way of overriding the magic word and using the current article name as the sort key is to use the {{PAGENAME}} template after the pipe, e.g. [[CATEGORY:Articles ordered by name|{{PAGENAME}}]]. Using this template will cause the article to appear in the position appropriate to its full article name if the article is moved. Many templates that add the article to categories already do this, for instance the magic word does not affect AHWiki article categories such as Category:Items to be merged when introduced by the {{merge}} template.

The default sort magic word is sometimes mistaken as a template. Template:DEFAULTSORT exists to correct such mistakes, but it should not be used. All tranclusions of the template in articles should eventually be replaced by the magic word. In other words, {{DEFAULTSORT:Washington, George}} is correct, but {{DEFAULTSORT|Washington, George}} is incorrect and should not be used.

Priority sort keys[edit]

It is possible to force an article or subcategory to the top of the list by using a non-alphanumeric character as the first after the pipe. For example, using [[Category:Ford| Ford Motor Company]] (note the space) or [[Category:Ford|*Ford Motor Company]] would force that article to be displayed before all the others. Many editors feel that the space character produces the best aesthetic appearance when the category is displayed. Using a space or asterisk after the pipe is the customary way to categorize an article in a category with the same name, indicating that the article is the main topic article for that specific category. For an example, see Category:Suspension bridges. Using {{Catmore}} may be preferable - no consensus has been established yet. To list at the end (after z) of a category, the sort key ~ can be used [[Category:Polyhedra|~Polyhedra templates]].

Sorting with templates[edit]

Template:See also Occasionally, categorization is done with a template. This can be done by adding a category to the template itself, which will then add to that category all pages on which the template is transcluded. This is usually reserved for pages not in the article namespace, such as talk, project, or user pages. In such cases, it is often desirable to use the magic word {{PAGENAME}} to define a generic sort key that removes the namespace, so that the transcluded pages will be sorted by the page name instead. In one example, a WikiProject (such as WikiProject Architecture) may wish to categorize relevant articles into the project category (Category:Unassessed Architecture articles) by placing the {{Architecture}} template on the relevant talk pages (such as Talk:Bonus room). Using {{PAGENAME}} as the category sort key for the template will avoid having all pages sorted by the "Talk" namespace. In our example, the page would then appear sorted by the page name only ("Bonus room") instead of by the complete name including namespace ("Talk:Bonus room").

Other specifics[edit]

  • For more detailed guidelines about sorting names of people, see AHWiki:Categorization of people#Ordering names in a category.
  • Don't start the category sort key with a lower case letter, unless you want to create a separate caption with that lower case letter in the category (note that the first lower case letter caption starts only after the last upper case letter caption)
  • When trying to sort with numbers (e.g. AHWiki:Naming conventions (pieces of music)), don't forget to add an extra zero when more than 9 entries in the category are expected; and a second extra zero when more than 99, etc...: [[Category:Symphonies by Joseph Haydn|Symphony 13]] → [[Category:Symphonies by Joseph Haydn|Symphony 013]] (he wrote 108 symphonies). Categories sort by the first character, so leaving out the preceding zero would cause 10 to be sorted before 2.
  • Ordinals often have to be converted to Arabic numerals: e.g. Pope John IX: [[Category:Popes|John 09]] (+ zero added, there are XXIII popes with the name John)
  • Letters with accents or diacritics should generally be avoided in sort keys, because they are sorted incorrectly by the Mediawiki software. For example, the software sorts "á" after "z", which is not correct in any language. For this reason, articles with accented characters in the title will almost certainly require an explicit sort key instead of relying on the default "sort by article title" behavior. For example, the article about the Hungarian town of Ács uses Acs as its sort key. Remember that sort keys are not displayed, so the article title will still show up with the correct spelling in the category page.

Year categories[edit]

See also AHWiki:naming conventions (numbers and dates)#Articles on other standard time periods

In categories which are years, such as Category:2004, special sorting guidelines apply:

  • Entries should generally be sorted by topic, so the article 2004 in film, for example, would contain the category reference [[Category:2004|Film]] while 2004 Canadian budget would contain the reference [[Category:2004|Canadian budget]]; List of religious leaders in 2004 would contain [[Category:2004|Religious leaders]].
  • The article about the year itself, 2004, should be sorted first among all articles by using a space [[Category:2004| ]].
  • Articles for individual months, such as October 2004, should be sorted chronologically in the first section on the category page, in this case using [[Category:2004|*2004-10]].

Interlanguage links to categories[edit]

Interlanguage links work just as they do for regular articles; [[de:Kategorie:Mathematik]] in Category:Mathematics connects to the German counterpart. This can be a useful way to compare coverage, or to look for articles in need of interlanguage links. Note that the different languages may have adopted different standards and practices for categorization, so a given category might not exist in other languages.

Tools[edit]

  • Pearle can be used to automatically move articles from one category to another, get dumps of the category trees, and accomplish some other useful category-related tasks.

Current projects[edit]

See: AHWiki:WikiProject Categories/Current subprojects

Known category-related bugs[edit]

Please report new category-related bugs on bugzilla and list them below.

(Bugs higher than 1775 have not been checked)

Redirects[edit]

Special:Categories[edit]

Large categories[edit]

Updating problems[edit]

General[edit]

See also[edit]

Browsing categories
Maintenance
Other

Template:AHWiki policies and guidelines