Browse Source

fix a bug

tags/v0.2.0
xuyige 6 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 return self


def index_field(self, field_name, vocab): 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] field_list = [field_name]
vocab_list = [vocab] vocab_list = [vocab]
else: else:


Loading…
Cancel
Save