private Digraph parseHypernyms(String hypernyms) {
        Digraph dg = new Digraph(V);
        In in = new In(hypernyms);
        while (in.hasNextLine()) {
            String[] fields = in.readLine().split(",");
            int id = Integer.parseInt(fields[0]);
            for (int i = 1; i < fields.length; i++) {
                dg.addEdge(id, Integer.parseInt(fields[i]));
            }
        }
        return dg;
    }