I am trying to analyze the sentence:
"When particles and antiparticles collide, they explode."
This outputs:
particles and antiparticles: [particles and antiparticles, they]
This glues "particles" and "antiparticles" together, but I need a mapping from all tokens in this fragment to the token indices in the original document.
i.e., I need something like:
[[particles, antiparticles], they]
I am trying to analyze the sentence: "When particles and antiparticles collide, they explode."
This outputs:
particles and antiparticles: [particles and antiparticles, they]
This glues "particles" and "antiparticles" together, but I need a mapping from all tokens in this fragment to the token indices in the original document.
i.e., I need something like: [[particles, antiparticles], they]
Can it be done? Thanks.