Libraryless. Click here for Pure Java version (10259L/74K).
sS ai_superSimpleVerbCorrector(S s) { LS tok = javaTok/*NPunctuation*/(s); for (int i = 1; i < l(tok)-2; i += 2) { S t = tok.get(i); if (mechCISetContains("Plural nouns", t)) tokReplaceIfNotNull(tok, i+2, mechCIMapGet("Singular verb => Plural", tok.get(i+2))); else if (mechCISetContains("Third person singular pronouns", t)) tokReplaceIfNotNull(tok, i+2, verbToThirdPerson(tok.get(i+2))); else if (mechCISetContains("First person nouns", t)) tokReplaceIfNotNull(tok, i+2, verbFromThirdPerson(tok.get(i+2))); } ret join(tok); }
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: | #1021266 |
Snippet name: | ai_superSimpleVerbCorrector |
Eternal ID of this version: | #1021266/7 |
Text MD5: | c393bf74e3caa05c4b69f18af5361db7 |
Transpilation MD5: | 7ef8aa2bdb5c50302bf732b0fef2b473 |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2019-10-03 17:14:29 |
Source code size: | 581 bytes / 13 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 334 / 450 |
Version history: | 6 change(s) |
Referenced in: | [show references] |