-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Closed
Labels
bugBugs and behaviour differing from documentationBugs and behaviour differing from documentationfeat / docFeature: Doc, Span and Token objectsFeature: Doc, Span and Token objects
Description
How to reproduce the behaviour
nlp = spacy.load("en_core_web_lg")
text = "The quick brown fox jumps over the lazy dog"
doc = nlp(text)
token = doc[0]
span = doc[0:1]
print(span == token)
Actual Result: TypeError: Argument 'other' has incorrect type (expected spacy.tokens.span.Span, got spacy.tokens.token.Token)
Expected Result: True
or False
Info about spaCy
- spaCy version: 3.6.1
- Platform: Linux-6.2.0-34-generic-x86_64-with-glibc2.35
- Python version: 3.10.10
- Pipelines: en_core_web_lg (3.6.0)
Metadata
Metadata
Assignees
Labels
bugBugs and behaviour differing from documentationBugs and behaviour differing from documentationfeat / docFeature: Doc, Span and Token objectsFeature: Doc, Span and Token objects