mirror of
https://github.com/QData/TextAttack.git
synced 2021-10-13 00:05:06 +03:00
have flair use textattack tokenization method
This commit is contained in:
@@ -125,7 +125,9 @@ class AttackedText:
|
||||
Uses FLAIR part-of-speech tagger.
|
||||
"""
|
||||
if not self._pos_tags:
|
||||
sentence = Sentence(self.text)
|
||||
sentence = Sentence(
|
||||
self.text, use_tokenizer=textattack.shared.utils.words_from_text
|
||||
)
|
||||
textattack.shared.utils.flair_tag(sentence)
|
||||
self._pos_tags = sentence
|
||||
flair_word_list, flair_pos_list = textattack.shared.utils.zip_flair_result(
|
||||
|
||||
Reference in New Issue
Block a user