1 | static S ai_ihnSie(S s) { |
2 | L<S> tok = javaTok(s); |
3 | |
4 | for (int i : jfindAll(tok, "ihn/sie")) |
5 | for (int j = i-2; j > 0; j -= 2) { |
6 | S sex = mechMapCI("Name => Geschlecht").get(tok.get(j)); |
7 | if (nempty(sex)) { |
8 | replaceTokens(tok, i, i+5, eqic(sex, "männlich") ? "ihn" : "sie"); |
9 | continue; |
10 | } |
11 | } |
12 | |
13 | ret join(tok); |
14 | } |
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: | 349 / 390 |
Referenced in: | [show references] |