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