static int ai_endOfNounPhrase(L tok) { int i = 1; while (i < l(tok)) { S t = get(tok, i); if (eqicOneOf(t, "a", "the")) i += 4; else if (nounPhraseContinuers().contains(lower(t)) || isAdjective(t)) i += 2; else break; } ret i; }