-
-
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 documentation
Description
nlp = spacy.load("en")
doc1 = nlp(u"I am here")
doc2 = nlp(u"Hello")
doc1[0] == doc2[0]
True
In the above snippet, spacy is treating 1st token of both the docs as equal. So, in the below source code the richcmp method it is using index to compare.
def __richcmp__(self, Token other, int op):
# http://cython.readthedocs.io/en/latest/src/userguide/special_methods.html
my = self.idx
their = other.idx if other is not None else None
Environment
- Python version: 2.7.10
- Platform: Darwin-16.0.0-x86_64-i386-64bit
- spaCy version: 1.9.0
- Installed models: en
Metadata
Metadata
Assignees
Labels
bugBugs and behaviour differing from documentationBugs and behaviour differing from documentation