/** * Returns a new Document with the same meta-data as <tt>in</tt> and the same words * except those on the stop list this filter was constructed with. */ public Document<L, F, Word> processDocument(Document<L, F, Word> in) { Document<L, F, Word> out = in.blankDocument(); for (Word w: in) { if (!stoplist.contains(w)) { out.add(w); } } return (out); } }