User:Davidwr/Autocat

AUTOCAT: Automatic as-needed creation of "X in Y" sub-categories
Proposal:

Automatically creating categories for things like "[Things] in [political subdivision]" or "[People-category] from [place-category]".

How it would work:

An edit-filter would trigger if a page had a non-existent category.

If that non-existent category name matched a regular expression associated with a "parent" category, it would be processed by a script associated with that parent category.

A single script, such as "X_in_STATESINTHEUNITEDSTATES" could be used by hundreds or thousands of parent categories.

Here is an example:

If a page had the red-linked category Category:Acme Widget Makers in Alabama in it when it was saved, it would trigger an edit filter.

The edit filter or a bot called by the edit filter would check against a long list of "parent categories with auto-populate scripts associated with them".

It would find a parent category called Category:Acme Widget Makers in the United States which had a regular expression which matched  \:Category\:Acme Widget Makers in .* .

This parent category would have a script associated with it. This script would call X_in_STATESINTHEUNITEDSTATES, which would auto-create the category Category:Acme Widget Makers in Alabama based on a template or similar mechanism.

Special cases, like Category:Acme Widget Makers in Georgia (is it Georgia or Georgia (US State)?) would be handled as exceptions requiring human intervention.

The end result:


 * Most "sub-division"-type categories get auto-created as needed.
 * Auto-created categories will initially be created with a standard template. They could of course be manually edited later.
 * Fewer empty "X in Y" categories compared to mass-creation of "X in STATE" or similar category-trees.

Lightweight manual version
Have the edit filter and list of "parent categories with auto-populate scripts associated with them" as above, but the edit filter would JUST flag the edit for human intervention in some way, either by tagging the edit or by adding the page to a list of pages needing attention.