svoid ai_combinePosAndNegNGramScorersForLanguageDetectionTask(LanguageDetectionTask task) { LS exprs = pairsA((LPairS) dm_callAndImport(dm_languageDetectionNGramScorersCRUD(), 'expressionsForTask, task.task())); LS pos = notStartingWith(exprs, "^"); LS neg = startingWith(exprs, "^"); Set seen = ciSet(); new DynamicTopTen tt; repeat 1000 { S expr = firstNotSeen_nAttempts(1000, seen, () -> ai_combineNGramScorers_noDuplicates(random(pos), random(neg)) ); if (expr == null) break with print("Can't find any new expressions"); tt.add(expr, scoreNGramScorer(expr, task.pos, task.neg)); } pnl(tt.withScores()); dm_saveLanguageDetectionNGramScorers(task, tt); }