mirror of
https://github.com/explosion/spaCy.git
synced 2024-12-26 01:46:28 +03:00
Allow input text of length up to max_length, inclusive (#2922)
This commit is contained in:
parent
75e7d503b7
commit
d3d419ecc0
|
@ -334,7 +334,7 @@ class Language(object):
|
||||||
>>> tokens[0].text, tokens[0].head.tag_
|
>>> tokens[0].text, tokens[0].head.tag_
|
||||||
('An', 'NN')
|
('An', 'NN')
|
||||||
"""
|
"""
|
||||||
if len(text) >= self.max_length:
|
if len(text) > self.max_length:
|
||||||
raise ValueError(Errors.E088.format(length=len(text),
|
raise ValueError(Errors.E088.format(length=len(text),
|
||||||
max_length=self.max_length))
|
max_length=self.max_length))
|
||||||
doc = self.make_doc(text)
|
doc = self.make_doc(text)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user