14
15
16:- module(illegalwords, [
17 is_illegalword/2 18 ]).
32is_illegalword(any, 'The word \'any\' is not allowed. Did you mean \'every\', \'some\', or \'a\'?').
33is_illegalword('Any', 'The word \'Any\' is not allowed. Did you mean \'Every\', \'Some\', or \'A\'?').
34is_illegalword(anybody, 'The word \'anybody\' is not allowed. Did you mean \'everybody\' or \'somebody\'?').
35is_illegalword('Anybody', 'The word \'Anybody\' is not allowed. Did you mean \'Everybody\' or \'Somebody\'?').
36is_illegalword(anything, 'The word \'anything\' is not allowed. Did you mean \'everything\' or \'something\'?').
37is_illegalword('Anything', 'The word \'Anything\' is not allowed. Did you mean \'Everything\' or \'Something\'?').
38
39is_illegalword(this, 'The word \'this\' is not allowed. Did you mean \'the\'?').
40is_illegalword('This', 'The word \'This\' is not allowed. Did you mean \'The\'?').
41is_illegalword(these, 'The word \'these\' is not allowed. Did you mean \'the\'?').
42is_illegalword('These', 'The word \'These\' is not allowed. Did you mean \'The\'?').
43
44is_illegalword(Pronoun, ErrorText) :-
45 is_illegal_pronoun(Pronoun),
46 with_output_to(atom(ErrorText), format("The pronoun \'~w\' is not allowed. Use only third person singular or plural.", [Pronoun])).
55is_illegal_pronoun('I').
56is_illegal_pronoun(me).
57is_illegal_pronoun('Me').
58is_illegal_pronoun(my).
59is_illegal_pronoun('My').
60is_illegal_pronoun(mine).
61is_illegal_pronoun('Mine').
62is_illegal_pronoun(yours).
63is_illegal_pronoun('Yours').
64is_illegal_pronoun(we).
65is_illegal_pronoun('We').
66is_illegal_pronoun(us).
67is_illegal_pronoun('Us').
68is_illegal_pronoun(our).
69is_illegal_pronoun('Our').
70is_illegal_pronoun(ours).
71is_illegal_pronoun('Ours').
72is_illegal_pronoun('Theirs')