Is it possible to get the offsets of sentences in the text? #71
Answered
by
rachnachakraborty
hehuan2112
asked this question in
Help on coding
-
I'm trying to get the sentences with detailed offsets for downstream task.
With the current code, I can get the three sentences:
And in my case, I need to get the offsets of each sentence in original text.
I'm wondering if there is any parameter or setting I could use to get those offsets? |
Beta Was this translation helpful? Give feedback.
Answered by
rachnachakraborty
Feb 8, 2022
Replies: 1 comment 2 replies
-
Hi @hehuan2112 Sure, you can use
returns the following
Thanks |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
hehuan2112
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi @hehuan2112
Sure, you can use
its.span
for sentence offsets.returns the following
[ [ 0, 4 ], [ 5, 9 ], [ 10, 14 ] ]
Thanks