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