diff --git a/python/mxnet/gluon/data/text/base.py b/python/mxnet/gluon/data/text/base.py index 6c4cf8778928..3c024245023f 100644 --- a/python/mxnet/gluon/data/text/base.py +++ b/python/mxnet/gluon/data/text/base.py @@ -20,7 +20,7 @@ """Base classes for text datasets and readers.""" -__all__ = ['WordLanguageReader'] +__all__ = ['CorpusReader', 'WordLanguageReader'] import io import os @@ -67,7 +67,7 @@ def read(self): if self._tokenizer: samples = [self._tokenizer(s) for s in samples if s] if self._flatten: - samples = flatten(samples) + samples = flatten_samples(samples) else: samples = [s for s in samples if s] return SimpleDataset(samples)