Browse Source

fix a bug

tags/v0.2.0
xuyige 5 years ago
parent
commit
19332b8b08
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      fastNLP/core/dataset.py

+ 1
- 1
fastNLP/core/dataset.py View File

@@ -30,7 +30,7 @@ class DataSet(list):
return self

def index_field(self, field_name, vocab):
if isinstance(field_name, str) and isinstance(vocab, Vocabulary):
if isinstance(field_name, str):
field_list = [field_name]
vocab_list = [vocab]
else:


Loading…
Cancel
Save