def METHOD_NAME(self, corpus):
    self.cancel()
    self.corpus = corpus
    self.last_config = None
    if corpus is not None:
        self.strings_attrs = [a for a in self.corpus.domain.metas
                              if isinstance(a, StringVariable)]
        self.tweet_attr_combo.setModel(VariableListModel(self.strings_attrs))
        self.tweet_attr_combo.currentIndexChanged.emit(self.tweet_attr)
        # select the first feature from 'text_features' if present
        ind = [self.strings_attrs.index(tf)
               for tf in corpus.text_features
               if tf in self.strings_attrs]
        if ind:
            self.tweet_attr = ind[0]
    self.commit.now()