def negated(input_words, include_nt=True):
 neg_words = []
 neg_words.extend(NEGATE)
 for word in neg_words:
  if (word in input_words):
   return True
 if include_nt:
  for word in input_words:
   if ("n't" in word):
    return True
 if ('least' in input_words):
  i = input_words.index('least')
  if ((i > 0) and (input_words[(i - 1)] != 'at')):
   return True
 return False

def negated ( input_words , include_nt = True ) : neg_words = [ ] neg_words . extend ( NEGATE ) for word in neg_words : if ( word in input_words ) : return True if include_nt : for word in input_words : if ( "n't" in word ) : return True if ( 'least' in input_words ) : i = input_words . index ( 'least' ) if ( ( i > 0 ) and ( input_words [ ( i - 1 ) ] != 'at' ) ) : return True return False
determine if input contains negation words .