AttributeError: 'Token' object has no attribute 'tags'
Closed this issue · 0 comments
Hello, I am trying to run the example.ipynb but the cell for training gives me the following error.
How can I get unstuck here?
AttributeError Traceback (most recent call last)
/tmp/ipykernel_1560670/1467165288.py in
6
7
----> 8 train_dataset = prepare_flair_corpus(corpus.train)
9 val_dataset = prepare_flair_corpus(corpus.dev)
10
~/sequence_tagging/bert_sequence_tagger-master/src/bert_sequence_tagger/bert_utils.py in prepare_flair_corpus(corpus, name, filter_tokens)
20 else:
21 result.append(([token.text for token in sent.tokens],
---> 22 [token.tags[name].value for token in sent.tokens]))
23
24 return result
~/sequence_tagging/bert_sequence_tagger-master/src/bert_sequence_tagger/bert_utils.py in (.0)
20 else:
21 result.append(([token.text for token in sent.tokens],
---> 22 [token.tags[name].value for token in sent.tokens]))
23
24 return result
AttributeError: 'Token' object has no attribute 'tags'