@Test public void testStopwordDoNotGetPutInBag() { BagOfWordsFactory factory = new BagOfWordsFactory(ImmutableSet.of("test")); BagOfWords bag = factory.bag(ImmutableList.of("test")); assertTrue(bag.isEmpty()); }
public BagOfWords bag(Collection<String> words) { return bag(words.stream()); }
BagOfWordsFactory { public BagOfWords bag(Collection<String> words) { return bag(words.stream()); } }
BagOfWordsFactory { public BagOfWords bag(Collection<String> words) { return bag(words.stream()); } BagOfWordsFactory(Collection<String> stopwords); }
BagOfWordsFactory { public BagOfWords bag(Collection<String> words) { return bag(words.stream()); } BagOfWordsFactory(Collection<String> stopwords); BagOfWords bag(Collection<String> words); BagOfWords bagSentences(Collection<Sentence> sentences); BagOfWords bagLines(Collection<String> lines); }
BagOfWordsFactory { public BagOfWords bag(Collection<String> words) { return bag(words.stream()); } BagOfWordsFactory(Collection<String> stopwords); BagOfWords bag(Collection<String> words); BagOfWords bagSentences(Collection<Sentence> sentences); BagOfWords bagLines(Collection<String> lines);  }