Code example for Ordering

Methods: maxmin

0
        if (titleMissing(subject) || titleMissing(candidate)) {
            return false; 
        } 
        Set<String> subjectWords = filterCommon(lowerCaseTitleWords(subject));
        Set<String> candidateWords = filterCommon(lowerCaseTitleWords(candidate));
        Set<String> shorter = collectionSize.min(subjectWords, candidateWords);
        Set<String> longer = collectionSize.max(candidateWords, subjectWords);
        return percentOfShorterInLonger(shorter, longer) >= threshold;
    } 
 
    private Set<String> filterCommon(Set<String> words) {
        return Sets.difference(words, commonWords);
    } 
 
    private ImmutableSet<String> lowerCaseTitleWords(Content subject) {
        return ImmutableSet.copyOf(splitter.split(subject.getTitle().toLowerCase()));
    } 
 
    private double percentOfShorterInLonger(Set<String> shorter, Set<String> longer) {
        int contained = Sets.intersection(shorter, longer).size();
Connect your IDE to all the code out there  Get Codota for Java