1 | static Map<TokenAndRange> ai_createNounRefMap_1(L<TokenAndRange> tokens, Set<S> pronouns, Set<S> nouns) { |
2 | new Map<TokenAndRange> map; |
3 | TokenAndRange lastNoun = null; |
4 | for (TokenAndRange t : tokens) { |
5 | if (contains(pronouns, uncurly(t.token))) |
6 | mapPut(map, t, lastNoun); |
7 | if (contains(nouns, uncurly(t.token)) || contains(nouns, dropLeadingDollar(t.token))) |
8 | lastNoun = t; |
9 | } |
10 | ret map; |
11 | } |
download show line numbers debug dex old transpilations
Travelled to 7 computer(s): bhatertpkbcr, cfunsshuasjs, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1021205 |
Snippet name: | ai_createNounRefMap_1 |
Eternal ID of this version: | #1021205/4 |
Text MD5: | 0f688052c88325b2f9030e799a98de5f |
Author: | stefan |
Category: | javax / parsing |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2019-02-09 16:51:04 |
Source code size: | 418 bytes / 11 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 283 / 335 |
Version history: | 3 change(s) |
Referenced in: | [show references] |