def __call__(self, corpus):
        """Batchify a stream.

        Parameters
        ----------
        corpus : nlp.data.DatasetStream
            A stream of un-flattened CorpusDataset.

        Returns
        -------
        nlp.data.DataStream
            Batches of numericalized samples such that the recurrent states
            from last batch connects with the current batch for each sample.
            Each element of the Dataset is a tuple of data and label arrays for
            BPTT. They are of shape (seq_len, batch_size) respectively.
        """
        return _StreamBPTTBatchify(
            corpus, self._vocab, self._seq_len, self._batch_size,
            self._get_sampler(self._sampler), self._last_batch)
def __call__ ( self , corpus ) : return _StreamBPTTBatchify ( corpus , self . _vocab , self . _seq_len , self . _batch_size , self . _get_sampler ( self . _sampler ) , self . _last_batch )
Batchify a stream.

        Parameters
        ----------
        corpus : nlp.data.DatasetStream
            A stream of un-flattened CorpusDataset.

        Returns
        -------
        nlp.data.DataStream
            Batches of numericalized samples such that the recurrent states
            from last batch connects with the current batch for each sample.
            Each element of the Dataset is a tuple of data and label arrays for
            BPTT. They are of shape (seq_len, batch_size) respectively.