szha closed pull request #10079: Fix CorpusReader
URL: https://github.com/apache/incubator-mxnet/pull/10079
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/python/mxnet/gluon/data/text/base.py 
b/python/mxnet/gluon/data/text/base.py
index 6c4cf877892..3c024245023 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)


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to