You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by zh...@apache.org on 2018/03/15 17:21:44 UTC
[incubator-mxnet] 03/04: fix CorpusReader (#10079)
This is an automated email from the ASF dual-hosted git repository.
zhasheng pushed a commit to branch nlp_toolkit
in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git
commit 911ff3bf0cbca4dc626edfcbd63c87388d23b153
Author: Xingjian Shi <xs...@ust.hk>
AuthorDate: Mon Mar 12 15:02:28 2018 -0700
fix CorpusReader (#10079)
try to accelerate
update
Revert "update"
This reverts commit 7d409b54e0fdb006e6d8be50749a90e24b12715d.
Revert "try to accelerate"
This reverts commit b7d93f9184323909ae59d77445d45588ea76aaa5.
---
python/mxnet/gluon/data/text/base.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/python/mxnet/gluon/data/text/base.py b/python/mxnet/gluon/data/text/base.py
index 6c4cf87..3c02424 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 @@ class CorpusReader(DataReader):
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)
--
To stop receiving notification emails like this one, please contact
zhasheng@apache.org.