Jump to content

User:DexDor/Namespaces and categories

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by DexDor (talk | contribs) at 15:02, 5 December 2015 (Top-level category structure). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

Every Wikipedia page (e.g. an article, a talk page or even a redirect) is in a single namespace. Many/most Wikipedia pages are also in one or more categories. This essay contains the results of an analysis of how these 2 schemes interact - i.e. how pages in each namespace fit into the category structure.

The essay also contains some information about detecting anomalies in the categorization and correcting them.[1]

Namespace-category matrix

Note: The information in this matrix should not be used directly to support an argument about whether or not a particular page should be in a parent category. However, this matrix may indicate where the applicable policy/guideline can be found.

The analysis was carried out in 2014-2015 using category intersection tools. Some aspects of the analysis are currently incomplete and may not incorporate later changes to the categorization structure.

Explanation of matrix

The matrix is designed so that each page in the English Wikipedia satisfies the criteria for one (and only one) of the rows.[2] Which row a page matches is determined primarily by which namespace the page is in; for some namespaces other criteria are also considered -

  • Some rows are only applicable to disambiguation pages (i.e. pages that are under Category:Disambiguation pages) or non-disambiguation pages. The column headed "D?" indicates whether each row includes disambiguation pages - "Y" means only dab pages, "N" means excluding dab pages and "-" means either.
  • Some rows are only applicable to hard redirects or to pages that are not hard redirects. The column headed "R?" indicates whether each row includes hard redirects. "Y" means only hard redirects, "N" means excluding hard redirects and "-" means either.
  • Some rows are only applicable to subpages. The column headed "S?" indicates whether each row includes subpages. "Y" means only subpages, "N" means excluding subpages and "-" means either. Subpages are not allowed in some namespaces.
  • Some rows are only applicable to pages that are, or are not, in certain categories.

Having identified which row of the matrix a page belongs to the coloured cells on that row then indicate which high-level categories the page should/may be in (green cells) and should not be in (pink cells). The matrix can also be used in the opposite way; for a particular high-level category it is possible to go down the corresponding column to see what types of pages are expected to be in that category. Amber cells indicate where there is currently uncertainty about whether or not that is a valid combination. A more detailed key to the colours is provided below the matrix.

Matrix

Child page Parent category
Name- space Type D? R? S? None Articles Books Dab pages Essays Files Help Inact. Portals Redi­rects Temp- lates Wiki­pedians Wiki­Projects
0 Main Page N N (N) yes no none no none no? no no? no(NP) no no none no
Article[a] N N (N) never all never tbd[3] some tbd(TS)
Other N N (N) no(NC) never tbd some[4]
Dab page Y N (N) never tbd(NY) all no? no tbd(TN)
Redirect (hard) - Y (N) no?(NA) some none none some? all(AR) some[5]
2 User (excl. t.) - - - some no(NU) no(NB) no some tbd some? tbd(TI) no? some never some some
User (template) - - - never none no? tbd no? none all tbd some
4 Wp dab page Y - - never no none all none none none none none none none none none
Essay (not dab) N N - never never all no some? some none some? none no? some
Wp redir (hard) - Y - no(NA) none some? none some some all(AR) some none some?
WikiProject N N - never never never no? tbd(TH) no? no some(ST) some? all
Wikipedia (other) N N - some(SW) never never tbd some tbd some tbc never
6 File - - (N) no(NA) some? none none none all some some some? tbd tbd no? tbd
8 MediaWiki - - (N) all none none none none no no? none none some none no? none
10 Template - N - no no?(NX) no? no... none? some? tbd some tbd tbd all some(SV) some
Template redir - Y - none tbd none none some tbd none tbd
12 Help - - - no?(NA) none none some tbd no all some none some some? none no?.
None CA CB CD CE CF CH CI CP CR CT CU CW
14 Category:Contents - - (N) yes no no no no no no no no no no no no
Category (other) - - (N) no some some some some some some some some some some some some
None CA CB CD CE CF CH CI CP CR CT CU CW
100 Portal (dab) Y - - never none none all none no none none none none none none none
Portal (h/redir) N Y - some(SR) none never none no? some some(SR) none tbd
Portal (not d/sp) N N N no(NA) all? no tbd all(AP) some no no
Portal s/page N N Y some(SP) no some some(SP) tbd tbd
108 [[Wikipedia:Books|]] (dab) Y - - never no none all none none no none none none none none no
[[Wikipedia:Books|]] (hard redir) N Y - some(SB) none none never none some(SB) none
[[Wikipedia:Books|]] (encyc'c) N N - no(NA) all?(AB) all no none no?
[[Wikipedia:Books|]] (Wp) N N - no? no all? some?
118 Draft - - - some no(ND) no(ND) no(ND) none tbd no?(NS) none no(ND) some no?[6] no tbd
446 Ed. Program - - (N) some? none none none none none none none none none none none none
710 TimedText - - - some? none none none none none none none none some none none none
828 Module - - - some? no? none none none no? tbd none none some tbd(TM) none tbd(TW)
None CA CB CD CE CF CH CI CP CR CT CU CW
1 Talk - - - some no(NT) no none none
tbd tbd no? some? some tbd no some
3 User talk - - - some no(NT) no no tbd tbd no? none some no? some some
5 Wikipedia talk - - - some(SG) no(NT) none none tbd some? no? none some tbd no? some
7 File talk - - - some tbd(T7)(NT) none none no no no some? some none none some
9 MediaWiki talk - - - some(SG) no(NT) none none none some? no none some none none some
11 Template talk - - - some(SG) no(NT) none no? none tbd tbd(TI) no? some tbd no some
13 Help talk - - - some(SG) no(NT) none none none some? no? none some none none some
15 Category talk - - - some(SG) no(NT) none no none some? no? none some none no some
101 Portal talk - - - some(SG) no(NT) none none none none no? no? some none none some
109 [[Help:Using talk pages|]] - - - some(SG) no(NT) no none none some? no no some none none some
119 Draft talk - - - some(SG) no(NT) none none no? none no none some none none some
447 Ed. Prog. talk - - - some(SG) no(NT) none none none tbd(TE) no none none none none some
711 TimedText talk - - - some(SG) no(NT) none none none none no none some none none some
829 Module talk - - - some(SG) no(NT) none none none none no none some tbd. no? some
2600 Topic - - - all none none none none no none none none none none none none
None CA CB CD CE CF CH CI CP CR CT CU CW
Note: The following namespaces are not shown in the table above: 2300&2301 (Gadget) and 2302&2303 (Gadget definition).

Legend:

  Column headings
  Row definitions
  Not a possible combination (i.e. there can not be any pages at this position)
  A Wikipedia guideline says (or the existence of a database report implies) that there should be no pages at this intersection
  Few/no pages are found at this intersection - and any such pages are probably mis-categorized
  Should be empty, but pages often get placed here (often temporarily) and it doesn't matter that much
  Is/possibly a valid namespace-category combination
  Valid - by definition every page in that row must be in that parent category (but not necessarily vice versa)
  To be decided - e.g. further investigation or discussion needed to resolve whether or not this is a valid combination

Notes about why a particular namespace-category combination isn't valid:

(NA) - As there is an "all" elsewhere on this row then there should be no uncategorized pages of this type.
(NB) - See note ("Do not categorize books from the User: namespace (user books) ...") at Category:Wikipedia books and Wikipedia:Categories_for_discussion/Log/2010_April_27#Wikipedia_books.
(NC) - See, for example, Category:All uncategorized pages.
(ND) - WP:DRAFTNOCAT says "Pages in the draft namespace ... do not belong in content categories..." - however, in practice many draft pages are placed in article categories temporarily and this does little harm (user pages in article categories is much worse).
(NI) - Wikipedia content (articles etc) should not overlap with Wikipedia administration (wikiprojects, user pages, talk pages etc). I.e. a content category should not be under an administration category and vice versa.
(NP) - "This category is meant to contain pages ... in Wikipedia's portal namespace. It should not be used to categorize articles or pages in other namespaces." (Category:Portals, August 2014). Note: when a redirect (e.g. to portal space) is taken to RFD it is not considered by Catscan to be a redirect and hence (for the period of the RFD) will be listed.
(NQ) - WP:CAT#T: "... Category:String quartets by composer templates ... should be a subcategory of Category:Music navigational boxes (kind) but not Category:String quartets (content)."
(NS) - In the spirit of WP:DRAFTNOCAT.
(NT) - "... discussion pages ... are not articles." - Wikipedia:What is an article?, August 2014.
(NU) - "User pages are not articles, and thus do not belong in content categories such as Living people or Biologists." - WP:USERNOCAT (as of August 2014)
(NX) - "... templates ... are not articles." - Wikipedia:What is an article?, August 2014.
(NY) - "Disambiguation pages ... are not articles." - Wikipedia:What is an article?, August 2014.

Notes clarifying the definition of a row:

Some rows (e.g. the "Articles" row) have a mouseover.

Notes about why there's a "some" in the table:

(SB) - About a third of hard redirects in Book namespace are uncategorized[7] and there is no obvious way to identify such redirects.
(SG) - A talk page can be navigated to from the associated non-talk page so categorization of the talk page itself is unnecessary.
(SP) - Currently (March 2015) some portal subpages are categorized under Category:Portals and some have been left uncategorized. Rather than have a debate about how these subpages should be categorized both options are currently shown in the table as "some". Wikipedia:Portal/Categorizing#Topical_portal_categories says "A portal that transcludes content in from separate subpages can be given its own category to help portal editors manage the components that come together to form the portal. Such a category is not mandatory, but recommended.".
(SR) - Most hard redirects in Portal namespace are uncategorized[8] and there is no obvious way to identify such redirects.
(ST) - There are many templates in many namespaces and (afaik) there is no rule against this. Help:Template says "some template pages are placed in other namespaces".
(SV) - Lots of templates that are intended to place a page in a category (e.g. a userpage in a Wikipedians category) also (inadvertently) place the template itself in that category. This is often because includeonly markup is negated by it being on a template documentation page.
(SW) - Attempting to ensure that every page in Wikipedia namespace is categorized is unlikely to be worth the effort it would take. Afaik there's no database report to find uncategorized pages in the Wikipedia namespace.

Notes about why there's a "TBD" in the table:

(T7) - Lots leak via Category:Spoken article reviews.
(TA) - As of Aug 2014 there are township dab page cats and cyclone dab page cats.
(TE) - See discussion at DexDor's talk (March 2016) re " supported by Wiki Ed".
(TH) - This is a "TBD" pending discussion of scope of Help namespace and scope of WikiProjects.
(TI) - Category:Inactive project pages makes clear that it's for project namespace pages (i.e. pages in the Wikipedia namespace). However, Template:Historical has been added to some pages in other namespaces - including to category pages.
(TM) - As of December 2015, many modules (i.e. pages in Module namespace) are categorized in a templates category - however, there is also Category:Wikipedia modules.
(TN) - As of January 2016, Category:Pages using New York City Subway service templates is putting lots of pages, including dab pages, under a wikiproject category.
(TQ) - Many book categories are placed in article categories (e.g. Category:Wikipedia books on Berlin is in Category:Berlin), although not always in a consistent way. Note: Books (like portals) are considered part of the encyclopedia content (not administration).
(TS) - For example, Category:Aviation stubs is in Category:Stub categories which is below Category:WikiProject Stub sorting (as of March 2015).
(TW) - As of December 2015, some Module namespace pages are in templates categories (which might be OK), but then the template category is in a WikiProject category (e.g. Category:Map templates is (via other categories) under Category:WikiProject Geography - which is probably wrong).

Other notes:

(AB) - "When adding a book category to its corresponding encyclopedia category ..." (Category:Wikipedia books, August 2014). However, as of 16/5/2015, many Wikipedia books about encyclopedic topics are not in an article category (examples).
(AP) - Check this as some (e.g. Category:Ancient Near East portal) aren't.
(AR) - Some editors prefer redirects to be categorized.[9] However, the main reasons why categorization is useful for articles (navigation, spotting content forks etc) do not apply to redirects and there is, AFAIK, no database report of uncategorized redirects.


Top-level category structure

The diagram below shows the top levels of the category structure. The two-letter codes are those used in the matrix above.

           Contents
             |
   -----------------------------------------------------------------------...
  |                              |          |        |           |
Wikipedia administration     Articles    Help    Portals    Wikipedia books
  |                             (CA)      (CH)      (CP)         (CB)
  |
   -----------------------------------------------------------------------------------------------...
      |                 |         |            |         |            |              |
 Wikipedia templates    |   Wikipedia essays   |   WikiProjects   Wikipedians   Wikipedia files
     (CT)               |        (CE)          |       (CW)          (CU)            (CF)
                        |                      |
            Wikipedia redirecting        Wikipedia disambiguation
                        |                      |
            Wikipedia redirects          Disambiguation pages
                       (CR)                   (CD)


Contents
Wikipedia administrationArticles
(CA)
Help
(CH)
Portals
(CP)
Wikipedia books
(CB)
Wikipedia templates
(CT)
Wikipedia redirectingWikipedia essays
(CE)
Wikipedia redirects
(CR)

Maintenance of the matrix

Template used to generate the matrix

The namespace-category matrix shown above is generated using a template (User:DexDor/Cmtp). The advantage of using a template rather than placing the details directly in this page is that parameters can be used to control how the template is displayed - thus, the template can generate both the compact format shown above and a longer more detailed format used during development of the matrix. There is also a similar template which expands the CA column into lower level article categories. Other templates are also used by the 2 top templates to avoid unnecessary repetition of code.

Note: watchlisting this page will not show changes to the matrix - for that it's necessary to watchlist the template.

Category intersection tools

The following table summarises facilities that some/all current category intersection tools do not have that would be useful to help identify whether there are any pages at particular positions in the grid.

Facility http://tools.wmflabs.org/quick-intersection http://tools.wmflabs.org/catscan2/catscan2.php
Option to select only subpages No TBD
Option to exclude subpages No TBD
Category intersection with no cat - e.g. pages in Book namespace that are not in Category:Books TBD TBD
Not follow redirect when click on link (it is confusing and it wastes time loading what can be a big page when it's actually the redirect page that is of interest) TBD TBD

Finding and fixing anomalies

Record

Record of some clearing up (to track cells that need to be checked):

Intersection   Depth  User     Date      Before   After
 14AinCU        6     DexDor   8/3/2015     9        0
   5inCA        6     DexDor  14/3/2015    36       23 (mostly AFC drafts)

Tips

To run a category intersection query: Press shift key click (normally in a way that causes a new window/tab to be opened) on a query link in the matrix, alter the depth if necessary (to minimise processing needed and to avoid unnecessary difficulty in resolving don't use too high a value), click on "Do it!".

Tips for investigating pages at unexpected namespace-category intersections:

  • When pages are examined in most cases it's easy to find a [[Category:Foo]] or [[W:Category:Foo]] tag that's causing the categorization. Sometimes it's not so obvious - usually because of a template - e.g. Template:Film date was putting pages (e.g. User talk:Musfar23) in a category (since deleted) which was under Category:Articles. In these cases Special:ExpandTemplates may help to identify where in the page the category is appearing - and hence which template is adding the category (and it's worth looking in the category for the template page).

Tips for fixing such pages:

  • If the page found is a talk page and has no corresponding non-talk page and has no inlinks (apart from any maintenance pages) and is not transcluded[7] (how tell?) and is not needed for licencing (??? see this) then propose the page for deletion by WP:CSD#G8.
  • Be aware that when you use a category intersection query to find pages in one namespace that you may end up at a page in a different namespace - for example the page shown by the query may be a redirect or the page shown by the query may transclude another page (in this case clicking on an "Edit" link on one page can actually start editing a different page[10]). It's a good idea to check that you are editing the page you think you are editing before clicking on the "Save" button. Looking at your recent contributions to check that they are in the namespace you thought you were editing may also be a good idea.

Types of problems found

The table below shows examples of things found when checking pages at namespace-category intersections - and how to fix them. This table does not generally include problems caused by the category structure being incorrect (e.g. a category for Wikipedia administration being placed under Category:Articles).

Cause Why it's a problem Fix

Article (etc) is in a template category (0inCT) (database report)
A template is used on an article (or even on a category page), but the template is missing noinclude markup. ?? (e.g. corrected by [8])
An article is placed directly in a template category. ?? (e.g. corrected by [9])
(CATEGORY) A category for articles is incorrectly placed under a category for templates. ?? (e.g. corrected by [10])

Disambiguation page is in an article category (0DinCA)
A disambiguation page contains incorrect category tag. Clutters up parent category, blurs distinction between an article and a dab page. Remove the incorrect category tag(s) (e.g. [11]).

Page in User namespace in article category (2inCA)
A userpage (e.g. a fake article) has been placed in a category (e.g. in Category:Musicians). Clutters up the article category 1. Comment out the category tag(s) (per WP:USERNOCAT).
2. Consider whether the page should be blanked or deleted (e.g. by CSD#U5).

Page in Wikipedia namespace in article category (4inCA)
An article is in the wrong namespace (having either been created in the wrong namespace or moved to the wrong namespace). Causes confusion 1. Check if there's already an article in the correct namespace - if so see row below.
2. Consider deleting the page (e.g. MFD).
3. If not then move the article ([12][13]). Optionally delete the redirect that has been left in Wikipedia namespace (e.g. ??).
An article is duplicated in the wrong namespace. Duplicate article, causes confusion Delete the page in the wrong namespace (e.g. MFD/CSD) or turn it into a (cross-namespace) redirect (e.g. ??) (and then RFD/CSD the redirect?).
A Wikipedia admin page is incorrectly categorized as an article. Clutters up parent category Remove incorrect category tag (e.g. [14][15]). If necessary, add a more appropriate category tag (e.g. [16]).
A bot-generated list of pages refers to a category, but not using ":".[11] Clutters up parent category, confuses users of list 1. Insert ":" (e.g. [17]).
2. Optionally, see if the bot is still making this error (i.e. has made this error recently) and if so contact the bot operator (e.g. ??).
A Wikipedia admin page (e.g. a discussion page such as AFD) refers to a category, but without the extra ":". Clutters up parent category, confuses text/discussion[12] Insert ":" (e.g. [18][19][20]). Optionally put the category tag inside markup (e.g. "<small>[[:Category:Foobar]]</small>") as a bit of an indication that this is not how the text appeared earlier (e.g. [21]).
A template is transcluded into a Wikipedia admin page and the template puts the page in an article category. Typically this occurs where a wikiproject has a list of templates relevant to the wikiproject that shows what the template looks like. Clutters up parent category 1. Note what articles are in the category.
2. Decide whether it's appropriate for the template to categorize the page (generally it's not appropriate for a template to place a page in an article category).
3. Identify which template is causing the categorization.
4. Edit the template to remove the category tag (e.g. [22][23][24][25][26]) or to only categorize pages in mainspace (e.g. [27]).
5. Check whether or not articles (that were) in the category need the category tag to be added (e.g. [28]).
A category for Wikipedia administration that contains pages in the Wikipedia namespace (e.g. a Wikiproject category) has been placed in an article category. Clutters up parent category, prevents other checks Remove the incorrect category tag (e.g. [29][30]). Optionally replace by a more appropriate category tag (e.g. ??).

Template page is in an article category (10inCA)
A template page contains incorrect category tag. Clutters up parent category, may hide fact that template is not appropriately categorized under Category:Wikipedia templates. Remove the incorrect category tag (e.g. [31][32]).

Talk page in article category (1inCA, 3inCA, 5inCA ...)
A comment on the talk page refers to a category, but without the extra ":". Clutters up category, confuses discussion Insert ":" (e.g. ??).
A category for Wikipedia administration that contains talk pages (e.g. a Wikiproject category) has been placed in an article category. Clutters up category, prevents other checks Remove the incorrect category tag (e.g. ??, similar to above).

Other: An article is transcluded into a page in a different namespace (e.g. a user page).

See also

References

  1. ^ Some examples of corrections made: [1][2][3].
  2. ^ Note: Currently there may be a small number of pages that don't fit any row of this matrix.
  3. ^ E.g. there are articles below Category:Wikipedia articles incorporating a Leigh Rayment's Peerage Pages template that is below Category:Wikipedia sources.
  4. ^ Pages that are soft redirects (e.g. see Category:Redirects to Wiktionary) are at this intersection. Also (temporarily) hard redirects that are at RFD. Pages that have been (incorrectly) placed under a redirected category are at this intersection - see Category:Wikipedia non-empty soft redirected categories.
  5. ^ As of March 2015 there's also lots of pages at this intersection because of redirects in Category:WikiProject Artemis Fowl and Category:Redirects from books (which is, possibly incorrectly, categorized under a wikiproject).
  6. ^ Pages get here for a variety of reasons - (1) because a template (example) is created in Draft namespace and has been placed in a templates category, (2) a page in Draft namespace (example) uses a template in such a way that it puts the page in a tracking category (e.g. Category:WikiProject banners with formatting errors or Category:Geobox usage tracking for region type) that is under Category:Templates (which itself is dubious), (3) a page in Draft namespace (example) is in Category:Template test cases that is under Category:Templates.
  7. ^ As of November 2015: 108RinCR indicates that there are 255 hard redirects that are in Book namespace in Category:Wikipedia redirects. Wikipedia:Database reports/Page count by namespace shows there are 764 (presumably hard) redirects in Book namespace.
  8. ^ As of November 2015: 100RinCR indicates that there are 1587 hard redirects that are in Portal namespace in Category:Wikipedia redirects. Wikipedia:Database reports/Page count by namespace shows there are 11227 (presumably hard) redirects in Portal namespace.
  9. ^ E.g. "Please ... add [redirect] templates ... when you create a redirect".
  10. ^ This[4] is an example of an incorrect edit made after a user page transcluded an article.
  11. ^ Note: Lists of pages generated by users can also have this error - e.g. [5]
  12. ^ E.g. "It is also important to add your articles to the and the prospective subcategories such as." prior to this edit[6].


Cite error: There are <ref group=lower-alpha> tags or {{efn}} templates on this page, but the references will not show without a {{reflist|group=lower-alpha}} template or {{notelist}} template (see the help page).