@Test public void testEvaluationDependingFunctionTakingArguments() { ModelsEvaluator models = createModels("src/test/resources/config/rankexpression/"); FunctionEvaluator function = models.evaluatorOf("macros", "secondphase"); function.bind("match", 3); function.bind("rankBoost", 5); assertEquals(32.0, function.evaluate().asDouble(), delta); }
public FunctionEvaluator evaluatorOf(String modelName, String ... names) { return requireModel(modelName).evaluatorOf(names); }
ModelsEvaluator extends AbstractComponent { public FunctionEvaluator evaluatorOf(String modelName, String ... names) { return requireModel(modelName).evaluatorOf(names); } }
ModelsEvaluator extends AbstractComponent { public FunctionEvaluator evaluatorOf(String modelName, String ... names) { return requireModel(modelName).evaluatorOf(names); } @Inject  ModelsEvaluator(RankProfilesConfig config,
                           RankingConstantsConfig constantsConfig,
                           FileAcquirer fileAcquirer);  ModelsEvaluator(Map<String, Model> models); }
ModelsEvaluator extends AbstractComponent { public FunctionEvaluator evaluatorOf(String modelName, String ... names) { return requireModel(modelName).evaluatorOf(names); } @Inject  ModelsEvaluator(RankProfilesConfig config,
                           RankingConstantsConfig constantsConfig,
                           FileAcquirer fileAcquirer);  ModelsEvaluator(Map<String, Model> models); Map<String, Model> models(); FunctionEvaluator evaluatorOf(String modelName, String ... names); Model requireModel(String name); }
ModelsEvaluator extends AbstractComponent { public FunctionEvaluator evaluatorOf(String modelName, String ... names) { return requireModel(modelName).evaluatorOf(names); } @Inject  ModelsEvaluator(RankProfilesConfig config,
                           RankingConstantsConfig constantsConfig,
                           FileAcquirer fileAcquirer);  ModelsEvaluator(Map<String, Model> models); Map<String, Model> models(); FunctionEvaluator evaluatorOf(String modelName, String ... names); Model requireModel(String name);  }