public static void init() throws IOException { if (values == null && path != null) { values = new HashMap<>(); BufferedReader reader = new BufferedReader(new FileReader(path)); String line; while ((line = reader.readLine()) != null) { line = line.trim(); if (line.startsWith("#")) { continue; } String[] parts = line.split("\t"); if (parts.length < 4) { continue; } String pos = parts[0]; String id = parts[1]; Double posScore = Double.parseDouble(parts[2]); Double negScore = Double.parseDouble(parts[3]); String wnID = id + "-" + pos; values.put(wnID, new PosNegPair(posScore, negScore)); } reader.close(); } }