1% This file is part of the Attempto Parsing Engine (APE).
    2% Copyright 2008-2013, Attempto Group, University of Zurich (see http://attempto.ifi.uzh.ch).
    3%
    4% The Attempto Parsing Engine (APE) is free software: you can redistribute it and/or modify it
    5% under the terms of the GNU Lesser General Public License as published by the Free Software
    6% Foundation, either version 3 of the License, or (at your option) any later version.
    7%
    8% The Attempto Parsing Engine (APE) is distributed in the hope that it will be useful, but WITHOUT
    9% ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
   10% PURPOSE. See the GNU Lesser General Public License for more details.
   11%
   12% You should have received a copy of the GNU Lesser General Public License along with the Attempto
   13% Parsing Engine (APE). If not, see http://www.gnu.org/licenses/.
   14
   15
   16:- module(illegalwords, [
   17		is_illegalword/2           % +IllegalWord:atom, -ErrorMessage
   18	]).
 is_illegalword(+IllegalWord:atom, -ErrorMessage) is semidet
Arguments:
IllegalWord- is a word that is not allowed in ACE
ErrorMessage- is an error message explaning how to act

This is a simple list of (function) words that are not allowed in ACE. BUG: The question remains if one could be allowed to define such words as content words and use them anyway. In this case, the error message would be misleading. Should we in ACE define a set of words that are not ACE function words and that can not be ACE content words either.

   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])).
 is_illegal_pronoun(+Pronoun:atom) is semidet
Arguments:
Pronoun- is an English pronoun

Succeeds if Pronoun is not allowed in ACE.

   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')