'Apply extractor functions (and their parameters) to the present document.
We pass `document` as the first parameter of the extractor functions.
If we want to use the same extractor function multiple times, we have to
add it to the extractors with `add_feat_extractor` using multiple sets of
parameters (one for each call of the extractor function).
:param document: the document that will be passed as argument to the
feature extractor functions.
:return: A dictionary of populated features extracted from the document.
:rtype: dict'

def extract_features(self, document):

    all_features = {}
    for extractor in self.feat_extractors:
        for param_set in self.feat_extractors[extractor]:
            feats = extractor(document, **param_set)
        all_features.update(feats)
    return all_features
