Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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