Skip to content
Discussion options

You must be logged in to vote

The code in the video (time link), including as you have pasted it, uses lower_ with an underscore. This hasn't changed between v2 and v3.

The underscore methods are for token attributes that are strings. For efficiency purposes they are stored as hashes (integers), and the underscore versions convert the hashes back to strings. If you want to read more about this you can see the dev docs, though you don't have to know all that to use the API.

Also, the general convention in Python is that members that start with an underscore are for internal use. The spaCy underscore properties can be used freely.

Replies: 1 comment 1 reply

Comment options

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

Answer selected by martymcgee3
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