For a computer program equipped with a good lexical database, on the other hand, complying with this rule is fairly trivial: just check whether the answer is a person or not and whether it is singular or plural and prefix who/what and is/are accordingly.