I am following this keras link https://keras.io/examples/nlp/ner_transformers/
to train my own NER model. I am not clear why we have tags +=1
in the following function
def map_record_to_training_data(record):
record = tf.strings.split(record, sep="\t")
length = tf.strings.to_number(record[0], out_type=tf.int32)
tokens = record[1 : length + 1]
tags = record[length + 1 :]
tags = tf.strings.to_number(tags, out_type=tf.int64)
tags += 1
return tokens, tags
Could anyone help clear this?