mirror of
https://gitee.com/fastnlp/fastNLP.git
synced 2024-12-03 04:37:37 +08:00
Update preprocess.py
This commit is contained in:
parent
b3e8db74a6
commit
5c671078b6
@ -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…
Reference in New Issue
Block a user