private int parseSynsets(String synsets) {
        tableNoun = new SeparateChainingHashST<String, Bag<Integer>>();
        tableID = new SeparateChainingHashST<Integer, String>();
        In in = new In(synsets);
        int lines = 0;
        while (in.hasNextLine()) {
            String line = in.readLine();
            String[] fields = line.split(",");
            int id = Integer.parseInt(fields[0]);
            String[] nouns = fields[1].split(" ");
            for (String noun : nouns) {
                if (isNoun(noun)) {
                    tableNoun.get(noun).add(id);
                } else {
                    Bag<Integer> bag = new Bag<Integer>();
                    bag.add(id);
                    tableNoun.put(noun, bag);
                }
            }
            tableID.put(id, fields[1]);
            lines++;
        }
        return lines;
    }