Skip to content
Discussion options

You must be logged in to vote

If you also want to get the trailing space for sentence spans, use sent.text_with_ws instead of sent.text. See the Span attributes here: https://spacy.io/api/span#attributes

It looks like the only change in spaCy since Ines's answer in the linked issue is that it's text_with_ws and not text_with_ws_.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@saraswat40
Comment options

Answer selected by adrianeboyd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat / doc Feature: Doc, Span and Token objects
2 participants
Converted from issue

This discussion was converted from issue #10531 on March 24, 2022 15:34.