Libraryless. Click here for Pure Java version (2349L/15K).
1 | static F1<S, Double> f1_scoreRegexpIC(Cl<S> plusExamples, Cl<S> minusExamples) {
|
2 | ret func(S regexp) -> double {
|
3 | new Scorer scorer; |
4 | fOr (S s : plusExamples) |
5 | scorer.add(regexpICFind(regexp, s)); |
6 | fOr (S s : minusExamples) |
7 | scorer.add(!regexpICFind(regexp, s)); |
8 | ret scorer!; |
9 | }; |
10 | } |
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: | #1024191 |
| Snippet name: | f1_scoreRegexpIC - percent score on positive and negative examples |
| Eternal ID of this version: | #1024191/2 |
| Text MD5: | d5af6634b57e37b84db48c7814bc0541 |
| Transpilation MD5: | 9515841fd23e100594e968464768654f |
| 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-24 21:15:57 |
| Source code size: | 315 bytes / 10 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 470 / 603 |
| Version history: | 1 change(s) |
| Referenced in: | [show references] |