1 | static int ai_endOfNounPhrase(L<S> tok) {
|
2 | int i = 1; |
3 | while (i < l(tok)) {
|
4 | S t = get(tok, i); |
5 | if (i+2 < l(tok) && isKnownPhrase(t + " " + tok.get(i+2))) i += 4; |
6 | else if (i == 1 && eqicOneOf(t, "a", "the")) i += 4; |
7 | else if (nounPhraseContinuers().contains(lower(t)) || isAdjective(t) || isNoun(t)) i += 2; |
8 | else break; |
9 | } |
10 | ret i; |
11 | } |
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: | 741 / 781 |
| Version history: | 9 change(s) |
| Referenced in: | [show references] |