Jump to content

Nova Resource:Catgraph/Deepcat

From Wikitech

Functionality

The DeepCat Gadgets extends the possibility to search in categories on Wikipedia:

  • Subcategory search: a search e.g. in category "physics" will also automatically search in all subcategories of "physics".
  • Category intersection: it is possible to search for articles that are e.g. in category "physics" and category "Germany".

DeepCat acts as interface between a graph database and MediaWiki's search engine. The Wiki's category structure is stored via their page-ids in the graph database while the Gadget does the translation of the search string, retrieves the information from the database and sends it to the search engine.

You can find a list of supported Wikis here.

Activation

On the German Wikipedia the gadget is available via the user preferences and can be activated there. See as well on the German help page.

To use it on one of the other Wiki-projects each user has to include it on their user page. In order to do that, the following line has to be added to the user's own common.js:

mw.loader.load( "https://de.wikipedia.org/w/index.php?title=MediaWiki:Gadget-DeepCat.js&action=raw&ctype=text/javascript" );

Usage

In order to use the gadget, the keyword "deepcat" must be used, followed by a colon. To get e.g. articles from the category "physics" and all subcategories, the following search string has to be entered into the search field, starting with capital letter:

deepcat:physics

Limitations

  • Due to technical limitations and performance reasons the system is limited to search in 70 categories at once and to search in subcategories up to a maximal depth of 15.
  • The gadget is not available in mobile view (e.g. on Smartphones). You need to switch to the desktop version of the page on your mobile device to be able to use the gadget.

Examples

These are examples taken from Wikimedia Commons.

Results for the category "Internet" and its subcategories:

deepcat:Internet


Results for the category "Internet" and its subcategories which contain the keyword "art":

art deepcat:Internet


Results that can be found in the categories and subcategories of both "Felis silvestris catus" and "Internet":

deepcat:Felis_silvestris_catus deepcat:Internet


Results that can be found in the category and subcategories of "Felis silvestris catus" but not in "Internet":

deepcat:Felis_silvestris_catus -deepcat:Internet


Results that can be found in the categories and subcategories of both "Felis silvestris catus" and "Internet", containing the word "art":

deepcat:Felis_silvestris_catus art deepcat:Internet


Results that can be found in the categories and subcategories of both "Felis silvestris catus" and "Internet", not containing the word "art":

deepcat:Felis_silvestris_catus -art deepcat:Internet


Results for categories when the title consists of more than one word:

deepcat:"Felis silvestris catus"
deepcat:Felis_silvestris_catus