Printing the names of groups of things

I noticed that this:

[code]An animal can be identified or unidentified. An animal is usually unidentified.
Rule for printing the name of an animal when the animal is unidentified:
say “animal”.

A dog is a kind of animal.
A cat is a kind of animal.

The yard is a room. In the yard are 2 cats and 1 dog.[/code]

Yields this:

How do you make naming rules apply to groups of things?

I don’t know which one is closer to what you want, but you might find either 17.11 “Printing the plural name of something” or 17.14 “Grouping together something” helpful.