Skip to content

Commit

Permalink
Allow input text of length up to max_length, inclusive (#2922)
Browse files Browse the repository at this point in the history
  • Loading branch information
danielhers authored and honnibal committed Nov 13, 2018
1 parent 75e7d50 commit d3d419e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion spacy/language.py
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ def __call__(self, text, disable=[]):
>>> tokens[0].text, tokens[0].head.tag_
('An', 'NN')
"""
if len(text) >= self.max_length:
if len(text) > self.max_length:
raise ValueError(Errors.E088.format(length=len(text),
max_length=self.max_length))
doc = self.make_doc(text)
Expand Down

0 comments on commit d3d419e

Please sign in to comment.