def test_bio_iobes_i_to_e_at_b(): in_ = ["O", "B-X", "I-X", "B-Y", "I-Y"] gold = ["O", "B-X", "E-X", "B-Y", "E-Y"] res = convert_bio_to_iobes(in_) assert res == gold
def test(): spans = generate_spans() gold_bio = generate_bio(spans) res = convert_iobes_to_bio(convert_bio_to_iobes(gold_bio)) assert res == gold_bio
def test_bio_iobes_single_b(): in_ = ["O", "B-X", "O"] gold = ["O", "S-X", "O"] res = convert_bio_to_iobes(in_) assert res == gold
def test(): spans = generate_spans() bio = generate_bio(spans) gold_iobes = generate_iobes(spans) iobes = convert_bio_to_iobes(bio) assert iobes == gold_iobes