private static void loadStringModels(String trigramFile) throws IOException {

		List<ResourceFile> modelFiles =
			Application.findFilesByExtensionInApplication(MODEL_FILE_EXTENSION);

		InputStream countFileContents = null;
		String filename = "";

		ResourceFile foundFile = null;

		for (ResourceFile resourceFile : modelFiles) {
			filename = resourceFile.getName();

			if (filename.equals(trigramFile)) {
				countFileContents = resourceFile.isFile() ? resourceFile.getInputStream() : null;
				foundFile = resourceFile;
				break;
			}
		}

		if (countFileContents == null) {
			lastLoadedTrigramModelPath = "";
			lastLoadedTrigramModel = "";
			throw new IOException("Was not able to load the strings model file (" + trigramFile +
				")");
		}

		loadStringModels(countFileContents, filename);
		lastLoadedTrigramModelPath = foundFile.getAbsolutePath();
	}
Initializes log probabilities based on counts from the given input file.

@param trigramFile     Name of trigram model file
@throws IOException
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/string/NGramUtils.java