Comma before which

I'm not sure which of the following sentences is correct. Is the comma mandatory, optional or unnecessary? I've googled a bit about this topic, but I got confused.

Our mapping contains 2000 words, which map to more than one lemma.

or

Our mapping contains 2000 words which map to more than one lemma.

Context: In total, there are more than 2000 words.

I've read Is it appropriate to put a comma before "which"? . If I understand the answers correctly, my "which map to more than one lemma" is a defining clause and no comma is required. But is it wrong to add one?


Solution 1:

Non-restrictive (non-defining):

Our mapping contains 2000 words, which map to more than one lemma.

Our mapping contains exactly 2000 words, and those just happen to map to more than one lemma.

Restrictive (defining):

Our mapping contains 2000 words which map to more than one lemma.

Our mapping contains at least 2000 words because there are 2000 words all of which map to more than one lemma. (In AmE, "that" is preferred to "which.") Our mapping might contain more than 2000 words and if so, none, some, or all of them might map to more than one lemma.

Two choices of meaning, two choices of punctuation (comma and no comma).

Solution 2:

I would consider the one without a comma as describing 2000 of the words in the mapping (which possibly contains more words). With a comma it sounds like the mapping contains only 2000 words and are described as mapping to more than one lemma. Since you said the mapping contains more than 2000 words, either omit the comma or say something like:

Our mapping contains 9999 words, 2000 of which map to more than one lemma.

Solution 3:

Here is a simple method that you can use to determine (in most cases) whether to include or omit a comma before which in sentences like the on in question here: If you replace which with that and the sentence still conveys the meaning you intend, you shouldn't use a comma before which; if the sentence doesn't retain the intended sense after the switch, you should use a comma before which.

In you example, replacing which with that yields this sentence:

Our mapping contains 2000 words that map to more than one lemma.

The sense of this sentence is that your mapping contains an unspecified number of words (though not less than 2000) altogether, of which 2000 map to more than one lemma. If that's the meaning you intend, you should omit the comma before which:

Our mapping contains 2000 words which map to more than one lemma.

But if what you mean to say is that your mapping consists of 2000 words altogether, and that all of them map to more than one lemma, you should include the comma before which:

Our mapping contains 2000 words, which map to more than one lemma.

You may be wondering why—if replacing which with that provides a clarifying test of whether which is intended restrictively or nonrestrictively—you shouldn't just use that in place of which in the (restrictive) situations where using it retains the intended sense of the sentence. This is an argument that some grammar commentators have urged for many decades—and the answer to it seems to be that, in real life, personal preference trumps everything else.

Henry Fowler, A Dictionary of Modern English (1926) offers these judicious remarks about the use of that versus which in relative clauses:

The two kinds of relative clause, to one of which that and to the other of which which is appropriate, are the defining and the non-defining; and if writers would agree to regard that as the defining relative pronoun, and which as the non-defining, there would be much gain both in lucidity and in ease. Some there are who follow this principle now; but it would be idle to pretend that it is the practice either of most or of the best writers.

Ninety years later, the landscape of English usage has changed very little on this point, confirming an even more judicious observation by Fowler:

What grammarians say should be has perhaps less influence on what shall be than even the more modest of them realize; usage evolves itself little disturbed by their likes and dislikes.