mirror of
https://github.com/QData/TextAttack.git
synced 2021-10-13 00:05:06 +03:00
49 lines
1.2 KiB
Plaintext
49 lines
1.2 KiB
Plaintext
/.*/Attack(
|
||
(search_method): GreedyWordSwapWIR(
|
||
(wir_method): unk
|
||
)
|
||
(goal_function): UntargetedClassification
|
||
(transformation): WordSwapEmbedding(
|
||
(max_candidates): 50
|
||
(embedding_type): paragramcf
|
||
)
|
||
(constraints):
|
||
(0): WordEmbeddingDistance(
|
||
(embedding_type): paragramcf
|
||
(min_cos_sim): 0.5
|
||
(cased): False
|
||
(include_unknown_words): True
|
||
)
|
||
(1): PartOfSpeech(
|
||
(tagger_type): nltk
|
||
(tagset): universal
|
||
(allow_verb_noun_swap): True
|
||
)
|
||
(2): UniversalSentenceEncoder(
|
||
(metric): angular
|
||
(threshold): 0.904458599
|
||
(compare_with_original): False
|
||
(window_size): 15
|
||
(skip_text_shorter_than_window): True
|
||
)
|
||
(3): RepeatModification
|
||
(4): StopwordModification
|
||
(5): InputColumnModification(
|
||
(matching_column_labels): ['premise', 'hypothesis']
|
||
(columns_to_ignore): {'premise'}
|
||
)
|
||
(is_black_box): True
|
||
)
|
||
/.*/
|
||
Running in interactive mode
|
||
----------------------------
|
||
Enter a sentence to attack or "q" to quit:
|
||
Attacking...
|
||
[92m1 (59%)[0m --> [91m0 (72%)[0m
|
||
|
||
All that [92mglitters[0m is not gold
|
||
|
||
All that [91mglisten[0m is not gold
|
||
|
||
Enter a sentence to attack or "q" to quit:
|