Browse Source

Update preprocess.py

tags/v0.1.0
Yige XU GitHub 6 years ago
parent
commit
5c671078b6
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      fastNLP/core/preprocess.py

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

@@ -239,7 +239,7 @@ class SeqLabelPreprocess(BasePreprocess):
label2index: dict of {str, int}
"""
# In seq labeling, both word seq and label seq need to be padded to the same length in a mini-batch.
label2index = {} # DEFAULT_WORD_TO_INDEX.copy()
label2index = DEFAULT_WORD_TO_INDEX.copy()
word2index = DEFAULT_WORD_TO_INDEX.copy()
for example in data:
for word, label in zip(example[0], example[1]):


Loading…
Cancel
Save