static S ai_ihnSie(S s) { L<S> tok = javaTok(s); for (int i : jfindAll(tok, "ihn/sie")) for (int j = i-2; j > 0; j -= 2) { S sex = mechMapCI("Name => Geschlecht").get(tok.get(j)); if (nempty(sex)) { replaceTokens(tok, i, i+5, eqic(sex, "männlich") ? "ihn" : "sie"); continue; } } ret join(tok); }
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: | #1014216 | 
| Snippet name: | ai_ihnSie | 
| Eternal ID of this version: | #1014216/1 | 
| Text MD5: | 77600ac35a66c00c35141a0a13110e4f | 
| Author: | stefan | 
| Category: | javax / a.i. | 
| Type: | JavaX fragment (include) | 
| Public (visible to everyone): | Yes | 
| Archived (hidden from active list): | No | 
| Created/modified: | 2018-04-16 01:20:41 | 
| Source code size: | 366 bytes / 14 lines | 
| Pitched / IR pitched: | No / No | 
| Views / Downloads: | 560 / 611 | 
| Referenced in: | [show references] |