Skip to content
Discussion options

You must be logged in to vote

Sorry this has been confusing. Tokens have token offsets in the i attribute and character offsets in the idx attribute; the token index is only referred to as offset (variable name) in the docs when it's an argument to the Token constructor. There is no guarantee that constructor arguments will have the same name when used as attributes.

You can find the list of attributes on the Token at the bottom of the page you linked to, which includes i and idx.

If that doesn't answer your question or I've misunderstood you let me know.

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by adrianeboyd
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation and website feat / doc Feature: Doc, Span and Token objects
2 participants
Converted from issue

This discussion was converted from issue #10336 on February 21, 2022 03:49.