static int ai_endOfNounPhrase(L<S> 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; }
Began life as a copy of #1011064
download show line numbers debug dex old transpilations
Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1011073 |
Snippet name: | ai_endOfNounPhrase |
Eternal ID of this version: | #1011073/10 |
Text MD5: | 8a204f2ccddf6c5d7a18b5d5a3cd25fa |
Author: | stefan |
Category: | javax / a.i. |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2017-12-07 03:42:51 |
Source code size: | 364 bytes / 11 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 506 / 535 |
Version history: | 9 change(s) |
Referenced in: | [show references] |