asahi417 commited on
Commit
0160dcd
·
1 Parent(s): 1b48831

fix dataset

Browse files
Files changed (1) hide show
  1. process/tweet_ner.py +1 -0
process/tweet_ner.py CHANGED
@@ -38,6 +38,7 @@ def decode_ner_tags(tag_sequence: List, input_sequence: List):
38
  tmp_pos = []
39
  tmp_entity_type = None
40
  for n, (_l, _i) in enumerate(zip(tag_sequence, input_sequence)):
 
41
  if _l.startswith('B-'):
42
  _, _, _, out = update_collection(tmp_entity, tmp_entity_type, tmp_pos, out)
43
  tmp_entity_type = '-'.join(_l.split('-')[1:])
 
38
  tmp_pos = []
39
  tmp_entity_type = None
40
  for n, (_l, _i) in enumerate(zip(tag_sequence, input_sequence)):
41
+ _l = label2id[_l]
42
  if _l.startswith('B-'):
43
  _, _, _, out = update_collection(tmp_entity, tmp_entity_type, tmp_pos, out)
44
  tmp_entity_type = '-'.join(_l.split('-')[1:])