We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 873cb9b commit fc346e3Copy full SHA for fc346e3
python/paddle/v2/dataset/imdb.py
@@ -124,15 +124,15 @@ def test(word_idx):
124
re.compile("aclImdb/test/neg/.*\.txt$"), word_idx)
125
126
127
-def word_dict():
+def word_dict(cutoff=150):
128
"""
129
Build a word dictionary from the corpus.
130
131
:return: Word dictionary
132
:rtype: dict
133
134
return build_dict(
135
- re.compile("aclImdb/((train)|(test))/((pos)|(neg))/.*\.txt$"), 150)
+ re.compile("aclImdb/((train)|(test))/((pos)|(neg))/.*\.txt$"), cutoff)
136
137
138
def fetch():
0 commit comments