我必须对给定的一组句子进行 BIO 标记。
例如:
sentence = 'My name is XYZ, I live in United States of America,
my Phone number is (123)123-1234"
电话号码可以是任何格式。
预期结果:
但我得到:
代码:
import spacy
s= 'I live in United states of America, my Phone number is (123)123-1234'
nlp = spacy.load('en_core_web_sm')
doc = nlp(s)
test = pd.DataFrame([(e.text, e.pos_,e.ent_iob_,e.ent_type_) for e in doc])
有人可以帮忙吗?

