An artificial immune system tasked with language recognition discriminates self and foreign after negative selection on a subset of self. (A) Simulating negative selection in silico: (1) Motifs in the unbiased pre-selection repertoire (with all possible 276 ≈ 400 million motifs of six characters (a–z and _)) are deleted if their affinity for any of the training strings exceeds the functional response threshold t. (2) Unseen English and Xhosa strings are exposed to the post-selection repertoire to find the number of remaining motifs reacting to them with affinity ≥ t; (B) reacting motifs per million for unseen English and Xhosa strings, before and after negative selection on 500 English strings (∼1 page of text). Horizontal lines indicate medians. Each dot represents a test string, all from a single simulation; (C) median and interquartile range of English- and Xhosa-reactivity after negative selection on English strings, obtained from one simulation per training set size; (D) percentage of Xhosa strings among the 10% of strings with the most reacting motifs after negative selection on English strings (mean ± standard deviation, SD, of 30 simulations). No discrimination should result in equal amounts (50%) of English and Xhosa strings in this top 10%. Throughout this figure, we tested 50 English and 50 Xhosa strings using an affinity threshold t = 3 for negative selection.