src/io/github/marwlod/word_net/Outcast.java
// given an array of WordNet nouns, return an outcast
given an array of WordNet nouns, return an outcast
given an array of WordNet nouns return an outcast
public String outcast(String[] nouns) {
        String leastRelated = null;
        int maxDist = Integer.MIN_VALUE;
        for (String curr : nouns) {
            int distToOthers = 0;
            for (String other : nouns) {
                distToOthers += wordNet.distance(curr, other);
            }
            if (distToOthers > maxDist) {
                maxDist = distToOthers;
                leastRelated = curr;
            }
        }
        return leastRelated;
    }
public String outcast ( String [ ] nouns ) { String leastRelated = null ; int maxDist = Integer . MIN_VALUE ; for ( String curr : nouns ) { int distToOthers = 0 ; for ( String other : nouns ) { distToOthers += wordNet . distance ( curr , other ) ; } if ( distToOthers > maxDist ) { maxDist = distToOthers ; leastRelated = curr ; } } return leastRelated ; }
given an array of WordNet nouns, return an outcast
given an array of WordNet nouns return an outcast