Libraryless. Click here for Pure Java version (4690L/28K).
svoid test_WordTokReplacerWithSecondIn() { WordTokReplacerWithSecondIn rule = new( "who is x", ll("x", "y"), "x is y", ll("x is y of course") ); assertTrueVerbose(rule.matches("who is john")); L<Attractor> newRules = instancesOf Attractor(getEmits(rule)); assertEqualsVerbose(1, l(newRules)); assertEqualsVerbose(litciset("john is cool of course"), applyAttractors(newRules, "john is cool")); }
download show line numbers debug dex old transpilations
Travelled to 6 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1023771 |
Snippet name: | test_WordTokReplacerWithSecondIn |
Eternal ID of this version: | #1023771/9 |
Text MD5: | 7e03499b4fb8c21ef1bf11e462edd43f |
Transpilation MD5: | 5fac9cc5241103330a6a0e1573f9d16f |
Author: | stefan |
Category: | javax / a.i. |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2019-07-08 23:27:54 |
Source code size: | 418 bytes / 9 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 187 / 308 |
Version history: | 8 change(s) |
Referenced in: | #1006654 - Standard functions list 2 (LIVE, continuation of #761) |