def test(): spans = generate_spans() gold_bio = generate_bio(spans) res = convert_iob_to_bio(convert_bio_to_iob(gold_bio)) assert res == gold_bio
def test_bio_iob_b_after_same(): in_ = ["O", "B-X", "B-X", "O"] gold = ["O", "I-X", "B-X", "O"] res = convert_bio_to_iob(in_) assert res == gold
def test(): spans = generate_spans() bio = generate_bio(spans) gold_iob = generate_iob() iob = convert_bio_to_iob(bio) assert iob == gold_iob