'Returns a new Model with documents only containing the given list of features,
for example a subset returned from Model.feature_selection().'

def filter(self, features=[], documents=[]):

    documents = (documents or self.documents)
    features = set(features)
    model = Model(weight=self.weight)
    model.extend([Document(dict(((w, f) for (w, f) in d.terms.items() if (w in features))), name=d.name, type=d.type, language=d.language, description=d.description) for d in documents])
    return model
