def fit(self, texts):
        if self.lowercase:
            texts = [text.lower() for text in texts]
        self.encoder = token_encoder(texts, character=self.character, max_features=self.max_features-3, min_df=self.min_df)
        self.encoder['PAD'] = 0
        self.encoder['END'] = 1
        self.encoder['UNK'] = 2
        self.decoder = dict(zip(self.encoder.values(), self.encoder.keys()))
        self.n_features = len(self.encoder)
        return self
dataset/ETHPy150Open IndicoDataSolutions/Foxhound/foxhound/preprocessing.py/Tokenizer.fit/original