Code example for Splitter

Methods: split

0
    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();
        return (contained * 1.0) / shorter.size();
    } 
 
    private boolean titleMissing(Content subject) {
        return Strings.isNullOrEmpty(subject.getTitle());
    } 
 
}