public void addModel(Path path) {
        log.fine(() -> "Loading model from " + path);
        ObjectMapper objectMapper = new ObjectMapper();
        try {
            InputStream in = path.toString().endsWith(".zst") ?
                    new ZstdInputStream(new FileInputStream(path.toFile())) :
                    new FileInputStream(path.toFile());

            SignificanceModelFile file = objectMapper.readValue(in, SignificanceModelFile.class);
            for (var pair : file.languages().entrySet()) {

                var languagesStr = pair.getKey();
                log.fine(() -> "Found model for languages '%s'".formatted(languagesStr));
                String[] languageTags = languagesStr.split(",");

                for (var languageTag : languageTags) {
                    var language = Language.fromLanguageTag(languageTag);
                    log.fine(() -> "Adding model for language %s with id %s".formatted(language, file.id()));
                    this.models.put(language, new DefaultSignificanceModel(pair.getValue(), file.id()));
                }
            }
        } catch (IOException e) {
            throw new UncheckedIOException("Failed to load model from " + path, e);
        }
    }
Default implementation of {@link SignificanceModelRegistry}.
This implementation loads models lazily and caches them.

@author MariusArhaug
linguistics/src/main/java/com/yahoo/language/significance/impl/DefaultSignificanceModelRegistry.java