private List<Map<String, Double>> readFeatures(String fileName) {
        try (BufferedReader reader = IOUtils.createReader(fileName)) {
            List<Map<String, Double>> featureItems = new ArrayList<>();
            String line;
            Map<String, Double> featureItem = null;
            while (null != (line = reader.readLine())) {
                if (line.trim().equals("Printing Feature Set")) { // new feature item
                    featureItem = new HashMap<>();
                    featureItems.add(featureItem);
                }
                else { // a feature
                    line = line.replace("Feature key is ", "");
                    line = line.replace(" Feature Value is ", "=");
                    // now we have featurekey=featurevalue
                    String[] keyValue = line.split("=");
                    if (keyValue.length != 2)
                        System.err.println("Skipping invalid feature line '" + line + "'");
                    else
                        featureItem.put(keyValue[0], Double.parseDouble(keyValue[1]));
                }
            }
            System.out.println("Read " + featureItems.size() + " feature items");
            return featureItems;
        }
        catch (IOException e) {
            throw new RuntimeException(e);
        }
    }
Read an ad-hoc file format with some similarly ad hoc code
searchlib/src/test/java/com/yahoo/searchlib/rankingexpression/evaluation/StreamEvaluationBenchmark.java