Offsets (spans) for tokens #80
Answered
by
rachnachakraborty
andrefs
asked this question in
Help on coding
-
Hello, is it possible to get spans for tokens? 😎 From the documentation it seems they are available for sentences only. Many thanks! 🙏 |
Beta Was this translation helpful? Give feedback.
Answered by
rachnachakraborty
May 27, 2022
Replies: 1 comment 1 reply
-
Hey @andrefs Here is sample code to get you started. It is inspired from the code you have mentioned in the discussion, we have replaced the
It will produce the following output:
Try it on runkit with Node V 16 Cheers, |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
andrefs
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hey @andrefs
Here is sample code to get you started. It is inspired from the code you have mentioned in the discussion, we have replaced the
doc.sentences
withdoc.tokens