Closed iknoorjobs closed 4 years ago
I want to get the index of span element in text.
Example:
doc = nlp('My sister has a dog. She loves him') doc._.coref_clusters Output: [My sister: [My sister, She], a dog: [a dog, him]]
Now,
doc._.coref_clusters[0].mentions[1] Output: She
I want to get the starting index of "She" in doc. (Starting index of "She" is 21)
Basically, I want the output as [My sister: [0, 21], a dog: [14, 31]]
Fixed it. Thanks
I want to get the index of span element in text.
Example:
Now,
I want to get the starting index of "She" in doc. (Starting index of "She" is 21)
Basically, I want the output as [My sister: [0, 21], a dog: [14, 31]]