Libraryless. Click here for Pure Java version (1300L/9K/32K).
!7 sS text1 = [[ Consider the string "abc" How long is it? 3 characters ]], text2 = [[ Consider the string "johnnie" How long is it? 7 characters ]]; sS tester = [[ Consider the string "Hello World" How long is it? ]]; sS testerAnswer = [[ 11 characters ]]; sS tester2 = [[ Consider the string "Hello World" ]]; static L functionsToUse = ll(f lstrAfterUnquote); static O solver; // func(S) -> S p { solver = ai_relateTwoTokens(text1, text2, functionsToUse, false); print("Tester: " + quote(tester)); S answer = cast callF(solver, tester); print("Answer: " + quote(answer)); assertTrue(codeTokensEqual(testerAnswer, answer)); print("Yo!"); print("Tester 2: " + quote(tester2)); solver = ai_relateTwoTokens(text1, text2, functionsToUse, true); answer = (S) callF(solver, tester2); print("Answer:\n" + indentx(answer) + "\n"); }
Began life as a copy of #1009489
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: | #1009497 |
Snippet name: | Test ai_relateTwoTokens [OK] |
Eternal ID of this version: | #1009497/6 |
Text MD5: | 9dda008780baaa3facd765dbe678841f |
Transpilation MD5: | 07bf66ac6225b3e80d18d83fa16476b6 |
Author: | stefan |
Category: | javax / a.i. |
Type: | JavaX source code |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2017-08-04 18:10:39 |
Source code size: | 892 bytes / 40 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 503 / 596 |
Version history: | 5 change(s) |
Referenced in: | -