def __init__(
        self,
        processor,
        model_name="distilbert-base-uncased",
        encoder="transformer",
        max_pos_length=512,
        cache_dir=".",
    ):
        """Initialize a ExtractiveSummarizer.

        Args:
            model_name (str, optional): Transformer model name used in preprocessing.
                check MODEL_CLASS for supported models.
                Defaults to "distilbert-base-uncased".
            encoder (str, optional): Encoder algorithm used by summarization layer.
                There are four options:
                    - baseline: it used a smaller transformer model to replace the bert
                        model and with transformer summarization layer.
                    - classifier: it uses pretrained BERT and fine-tune BERT with simple
                        logistic classification summarization layer.
                    - transformer: it uses pretrained BERT and fine-tune BERT with
                        transformer summarization layer.
                    - RNN: it uses pretrained BERT and fine-tune BERT with LSTM
                        summarization layer.
                Defaults to "transformer".
            cache_dir (str, optional): Directory to cache the tokenizer.
                Defaults to ".".
        """

        model = MODEL_CLASS[model_name].from_pretrained(
            model_name, cache_dir=cache_dir, num_labels=0, output_loading_info=False
        )
        super().__init__(model_name=model_name, model=model, cache_dir=cache_dir)

        if model_name not in self.list_supported_models():
            raise ValueError(
                "Model name {} is not supported by ExtractiveSummarizer. "
                "Call 'ExtractiveSummarizer.list_supported_models()' to get all  "
                "supported model names.".format(model_name)
            )
        self.processor = processor
        self.max_pos_length = max_pos_length
        self.model_class = MODEL_CLASS[model_name]
        default_summarizer_layer_parameters = {
            "ff_size": 512,
            "heads": 4,
            "dropout": 0.1,
            "inter_layers": 2,
            "hidden_size": 128,
            "rnn_size": 512,
            "param_init": 0.0,
            "param_init_glorot": True,
        }

        args = Bunch(default_summarizer_layer_parameters)
        self.model = BertSumExt(
            encoder, args, self.model_class, model_name, max_pos_length, None, cache_dir
        )
Initialize a ExtractiveSummarizer.

        Args:
            model_name (str, optional): Transformer model name used in preprocessing.
                check MODEL_CLASS for supported models.
                Defaults to "distilbert-base-uncased".
            encoder (str, optional): Encoder algorithm used by summarization layer.
                There are four options:
                    - baseline: it used a smaller transformer model to replace the bert
                        model and with transformer summarization layer.
                    - classifier: it uses pretrained BERT and fine-tune BERT with simple
                        logistic classification summarization layer.
                    - transformer: it uses pretrained BERT and fine-tune BERT with
                        transformer summarization layer.
                    - RNN: it uses pretrained BERT and fine-tune BERT with LSTM
                        summarization layer.
                Defaults to "transformer".
            cache_dir (str, optional): Directory to cache the tokenizer.
                Defaults to ".".
        
utils_nlp/models/transformers/extractive_summarization.py