Skip to content

Commit

Permalink
GH-2534: fix typing in regexp_tagger.py
Browse files Browse the repository at this point in the history
  • Loading branch information
helpmefindaname committed Dec 6, 2021
1 parent d4cf148 commit 7fdf215
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions flair/models/regexp_tagger.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,8 @@ def predict(self, sentences: Union[List[Sentence], Sentence]) -> List[Sentence]:
"""
Predict the given sentences according to the registered mappings.
"""
if not isinstance(sentences, list):
sentences = [sentences]
if not sentences:
return sentences

Expand Down

0 comments on commit 7fdf215

Please sign in to comment.