User:أحمد/mediawiki-extensions-SemanticCategoriesIntersection

This is a proposal for an extension to facilitate the model of atomic categories paired with basic category set operations, mainly the intersection of two categories. This could simplify the organisation of several types of wikis. For example:

could be replaced with the intersection of the two atomic categories  and

Many proposals are being considered for category math implementations and UI. See for example wikipedia:Wikipedia:Category intersection and Category math None of which have yet been incorporated in the core MW code, and it is unknown when/if any will be.

There are also extensions that implement similar functionality: and hacks such as http://smw.referata.com/wiki/Replace_list_of_pages_in_a_Category_by_a_semantic_query which depends on Extension:CSS and Extension:SMW
 * Extension:DynamicPageList (Wikimedia)
 * Extension:DynamicPageList3
 * Extension:Multi-Category Search

However neither of the above implemented methods integrates seamlessly with the current category system and UI. They require the transclusion of page lists in regular pages, or category pages which content has been muted from display, or in the case of SMW Concepts, a concept that is separate from the category system.

The approach described here depends on SMW and aims to integrate in how categories are perceived by the user.

Approach
By semantically marking certain categories their names joined together, when they are present on a page, in a way that results in the name of a compound/intersection under which the page is also categorised.

This gives the user a visual aid on the existence of the intersected category in the ame manner other categories are displayed on a page, and allows them to immediately navigate to teh intersected category and browse its contents.

Example
assume:
 * is assigned the semantic property
 * is assigned the semantic property . It is also categorised as

Now for every page categorised as category:People from Germany and, such as Andreas Eschbach, an automatic category is added, i.e. the page is categorised under it, which name is derived from the other categories that have the proper semantic properties. So that the result would be:

The automatically added category, i.e  should be visually distinguishable, probably by being grouped under a label such as "automatic categories:", or by being surrounded by parentheses.

Optionally, an atomic category could be marked as to not be displayed when intersecting with certain other categories, probably by assigning them - or their meta-categories - a semantic property such hidden when intersects with