public int distance(String nounA, String nounB) {
        if (!isNoun(nounA)) {
            throw new IllegalArgumentException(nounA + " is not a WordNet noun.");
        }
        if (!isNoun(nounB)) {
            throw new IllegalArgumentException(nounB + " is not a WordNet noun.");
        }
        return sap.length(tableNoun.get(nounA), tableNoun.get(nounB));
    }