svoid test_EnglishNumberAttractor() { test_EnglishNumberAttractor("i want twenty two ice cones", "twenty two", "22"); // test_EnglishNumberAttractor("i want twenty two million ice cones", "twenty two million", "22000000"); // bug in parseEnglishNumbers test_EnglishNumberAttractor("three are enough for everyone", "three", "3"); } svoid test_EnglishNumberAttractor(S input, S textual, S digits) { EnglishNumberAttractor a = cast getSingleton(pAttractor_allMatches2(new EnglishNumberAttractor, javaTok(input))); assertEqualsVerbose(textual, a.matchedString()); assertEqualsVerbose(digits, a.value); }
download show line numbers debug dex old transpilations
Travelled to 7 computer(s): bhatertpkbcr, cfunsshuasjs, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1022881 |
Snippet name: | test_EnglishNumberAttractor |
Eternal ID of this version: | #1022881/3 |
Text MD5: | 6edbf301b36fa06fcd4f024a2ec4de41 |
Author: | stefan |
Category: | javax / a.i. |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2019-04-12 17:34:49 |
Source code size: | 622 bytes / 11 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 293 / 315 |
Version history: | 2 change(s) |
Referenced in: | #1006654 - Standard functions list 2 (LIVE, continuation of #761) #1022884 - test_DateAttractor_ymd |