static SS ai_negateVerb_map = asCaseInsensitiveMap(litorderedmap_bidi("is not", "is", "isn't", "is", "are", "aren't", "am", "am not", "was", "wasn't", "can", "can't"); static S ai_negateVerb(S verb) { try answer mapGet(ai_negateVerb_map, verb); if (endsWithIC(verb, " not")) ret dropSuffixICTrim("not", verb); // Try first word L tok = nlTok(verb); S s = mapGet(ai_negateVerb_map, second(tok)); if (s != null) ret s + joinSubList(tok, 2); if (isThirdPersonVerb(verb)) ret "doesn't " + verbToBaseForm(verb); ret "don't " + verb; }