Libraryless. Click here for Pure Java version (4690L/28K).
1 | svoid test_WordTokReplacerWithSecondIn() { |
2 | WordTokReplacerWithSecondIn rule = new( |
3 | "who is x", ll("x", "y"), "x is y", ll("x is y of course") |
4 | ); |
5 | assertTrueVerbose(rule.matches("who is john")); |
6 | L<Attractor> newRules = instancesOf Attractor(getEmits(rule)); |
7 | assertEqualsVerbose(1, l(newRules)); |
8 | assertEqualsVerbose(litciset("john is cool of course"), applyAttractors(newRules, "john is cool")); |
9 | } |
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: | 186 / 307 |
Version history: | 8 change(s) |
Referenced in: | [show references] |