Libraryless. Click here for Pure Java version (3776L/24K).
svoid ai_combineBestNGramScorersForLanguageDetectionTask(LanguageDetectionTask task) { LS exprs = takeFirst(10, (LS) dm_callAndImport(dm_languageDetectionNGramScorersCRUD(), 'expressionsForTaskByScore, task.task())); Set<S> seen = ciSet(); new DynamicTopTen<S> tt; repeat 1000 { S expr = firstNotSeen_nAttempts(1000, seen, () -> ai_combineNGramScorers_noDuplicates(random(exprs), random(exprs)) ); if (expr == null) break with print("Can't find any new expressions"); tt.add(expr, print(scoreNGramScorer(expr, task.pos, task.neg))); } pnl(tt.withScores()); dm_saveLanguageDetectionNGramScorers(task, tt); }
Began life as a copy of #1027504
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: | #1027505 |
| Snippet name: | ai_combineBestNGramScorersForLanguageDetectionTask |
| Eternal ID of this version: | #1027505/3 |
| Text MD5: | 863b3c79c7db9de607d8dac7c4747e44 |
| Transpilation MD5: | 7607da1f2088dad35b0b6a04dfb4c9b7 |
| Author: | stefan |
| Category: | javax |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2020-03-22 16:31:59 |
| Source code size: | 668 bytes / 17 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 383 / 497 |
| Version history: | 2 change(s) |
| Referenced in: | [show references] |