Skip to content

Commit

Permalink
Merge pull request #552 from ankitgv0/patch-3
Browse files Browse the repository at this point in the history
Fixed the "no attribute" error from #536
  • Loading branch information
qiyanjun committed Nov 5, 2021
2 parents d009b60 + d225359 commit e6f9c56
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions textattack/constraints/grammaticality/part_of_speech.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,13 @@

import textattack
from textattack.constraints import Constraint
from textattack.shared.utils import LazyLoader, device
from textattack.shared.validators import transformation_consists_of_word_swaps

# Set global flair device to be TextAttack's current device
flair.device = textattack.shared.utils.device
flair.device = device

stanza = textattack.shared.utils.LazyLoader("stanza", globals(), "stanza")
stanza = LazyLoader("stanza", globals(), "stanza")


class PartOfSpeech(Constraint):
Expand Down

0 comments on commit e6f9c56

Please sign in to comment.