static Map<String, com.yahoo.prelude.semantics.RuleBase> toMap(SemanticRulesConfig config) throws ParseException {
            RuleImporter ruleImporter = new RuleImporter(config, true, new SimpleLinguistics());
            Map<String, com.yahoo.prelude.semantics.RuleBase> ruleBaseMap = new HashMap<>();
            for (SemanticRulesConfig.Rulebase ruleBaseConfig : config.rulebase()) {
                com.yahoo.prelude.semantics.RuleBase ruleBase = ruleImporter.importConfig(ruleBaseConfig);
                if (ruleBaseConfig.isdefault())
                    ruleBase.setDefault(true);
                ruleBaseMap.put(ruleBase.getName(), ruleBase);
            }
            return ruleBaseMap;
        }
Builds the semantic rules for an application package and validates them
config-model/src/main/java/com/yahoo/vespa/model/container/search/SemanticRules.java