Libraryless. Click here for Pure Java version (1389L/10K/32K).
!7 static SS data = litorderedmap( "rjmpeccijegweswt mqxvooyvssenlrzh", "I am your father", "rjmpeccijegweswt xuppnisnjrerjrcq", "I am your mother", ); p { int tests = 0; for (S s : keys(data)) { S e = data.get(s); assertEquals(s, fromEnglish(e)); assertEqualsIC(e, toEnglish(s)); tests += 2; } print("OK (" + n(tests, "tests") + ")"); } static S fromEnglish(S s) { new Matches m; if "i am your ..." ret "rjmpeccijegweswt " + fromEnglish($1); if "father" ret "mqxvooyvssenlrzh"; if "mother" ret "xuppnisnjrerjrcq"; ret s; } static S toEnglish(S s) { new Matches m; if "rjmpeccijegweswt ..." ret "I am your " + toEnglish($1); if "mqxvooyvssenlrzh" ret "father"; if "xuppnisnjrerjrcq" ret "mother"; ret s; }
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: | #1006518 | 
| Snippet name: | English <-> Computer Language Tests [dev.] | 
| Eternal ID of this version: | #1006518/1 | 
| Text MD5: | 3f2acf34a07e968412d05f2cfc58bf33 | 
| Transpilation MD5: | 6e63888eb669925743aed79b24fb488d | 
| Author: | stefan | 
| Category: | javax / a.i. | 
| Type: | JavaX source code | 
| Public (visible to everyone): | Yes | 
| Archived (hidden from active list): | No | 
| Created/modified: | 2017-01-13 18:28:33 | 
| Source code size: | 799 bytes / 35 lines | 
| Pitched / IR pitched: | No / No | 
| Views / Downloads: | 742 / 883 | 
| Referenced in: | [show references] |