-
Notifications
You must be signed in to change notification settings - Fork 375
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #100 from QData/refactor
Refactor
- Loading branch information
Showing
62 changed files
with
890 additions
and
564 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -37,3 +37,6 @@ wandb/ | |
|
||
# checkpoints | ||
checkpoints/ | ||
|
||
# vim | ||
*.swp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
84 changes: 45 additions & 39 deletions
84
...s/1_Introduction_and_Transformtions.ipynb → .../1_Introduction_and_Transformations.ipynb
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
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( | ||
(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 | ||
(is_black_box): True | ||
) | ||
|
||
Load time: /.*/s | ||
Running in interactive mode | ||
---------------------------- | ||
Enter a sentence to attack or "q" to quit: | ||
Attacking... | ||
[92m1[0m-->[91m0[0m | ||
All that [92mglitters[0m is not gold | ||
All that [91mglisten[0m is not gold | ||
Enter a sentence to attack or "q" to quit: |
Oops, something went wrong.