AssertionError on multiple dots
See original GitHub issueWhen there are more than 5 consecutive dots in a string, Spacy throws AssertionError. 5 or less dots are ok.
from spacy.en import English
nlp = English()
nlp(u'some.....dots')
out: some.....dots
nlp(u'some......dots')
File "python2.7/site-packages/spacy/language.py", line 225, in __call__
tokens = self.tokenizer(text)
File "spacy/tokenizer.pyx", line 132, in spacy.tokenizer.Tokenizer.__call__ (spacy/tokenizer.cpp:4835)
File "spacy/tokenizer.pyx", line 159, in spacy.tokenizer.Tokenizer._tokenize (spacy/tokenizer.cpp:5409)
File "spacy/tokenizer.pyx", line 231, in spacy.tokenizer.Tokenizer._attach_tokens (spacy/tokenizer.cpp:6444)
File "spacy/tokens/doc.pyx", line 282, in spacy.tokens.doc.Doc.push_back (spacy/tokens/doc.cpp:8356)
AssertionError
Issue Analytics
- State:
- Created 7 years ago
- Reactions:2
- Comments:8 (2 by maintainers)
Top Results From Across the Web
Python argparse AssertionError - Stack Overflow
The underlying cause of the problem is an assert check within the Python code that only occurs when Python attempts to break the...
Read more >Python's assert: Debug and Test Your Code Like a Pro
The AssertionError immediately points you to the specific problem: .radius has unexpectedly changed to a negative number. You have to figure out ...
Read more >AssertionError in Python - Javatpoint
Since AssertionError is an inheritance class of the Exception class, there are two potential ways to handle this error. First, the user handles...
Read more >7. Simple statements — Python 3.11.1 documentation
One leading dot means the current package where the module making the import exists. Two dots means up one package level. Three dots...
Read more >Programming With Assertions - Oracle Help Center
When an AssertionError is generated by an assert statement in which Expression2 is absent, why isn't the program text of the asserted condition...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I got 0.100.7 from the conda channel recommended in the Spacy docs a couple days ago, so expected that would be the latest/recommended version. Should whatever’s at PyPI be generally preferred?
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.