You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Expected behavior
Something like ValueError: Cannot create a Sentence object from an empty string or some Error or Exception mentioning that the string is empty or a Sentence object "" - 0 tokens
Environment (please complete the following information):
I feel this is applicable to any OS/version, but anyway:
Windows 10
flair-0.4.1
Python 3.6.8
The text was updated successfully, but these errors were encountered:
I believe that the if text is not None condition could be changed to if texthere to catch the empty string, but I need to know if this could break code elsewhere. @alanakbik If this is a go, I'm willing to submit a PR 👍
bharatr21
pushed a commit
to bharatr21/flair
that referenced
this issue
Feb 25, 2019
Describe the bug
If one tries to create a
Sentence
object from an empty string, anUnboundLocalError
of theindex
variable is thrownTo Reproduce
Expected behavior
Something like
ValueError: Cannot create a Sentence object from an empty string
or someError
orException
mentioning that the string is empty or aSentence object "" - 0 tokens
Environment (please complete the following information):
I feel this is applicable to any OS/version, but anyway:
The text was updated successfully, but these errors were encountered: