Libraryless. Click here for Pure Java version (2424L/16K).
1 | static PosNegMatrix<LS> posNegMatrixForRegexpIC(S regexp, Cl<S> pos, Cl<S> neg) {
|
2 | PosNegMatrix<LS> matrix = posNegMatrixOfLists(); |
3 | for (S s : pos) |
4 | (containsRegexpIC(s, regexp) ? matrix.pos : matrix.falseNeg).add(s); |
5 | for (S s : neg) |
6 | (containsRegexpIC(s, regexp) ? matrix.falsePos : matrix.neg).add(s); |
7 | ret matrix; |
8 | } |
download show line numbers debug dex old transpilations
Travelled to 7 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv
No comments. add comment
| Snippet ID: | #1027472 |
| Snippet name: | posNegMatrixForRegexpIC - for testing a regexp on pos/neg examples |
| Eternal ID of this version: | #1027472/2 |
| Text MD5: | 9675f65697eb4baf7877989b6de20da7 |
| Transpilation MD5: | 674859069d1f875c60e01da1a1a789e7 |
| Author: | stefan |
| Category: | javax / a.i. |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2020-03-22 14:07:38 |
| Source code size: | 337 bytes / 8 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 407 / 539 |
| Version history: | 1 change(s) |
| Referenced in: | [show references] |