Overview of the code:
- analyse_attacks.py: provides functions to help analyse attacks
- CNN.py: provides a class to handle a convolution neural network using keras
- 'Composition of spam.ipynb': jupiter notebook that looks into the composition of spams
- 'Draw learning curve.ipynb': jupiter notebook that shows the learning curves of our models
- 'Evaluate cross-validation.ipynb': jupiter notebook giving the results of the cross-validation for our models
- 'Evaluate preprocessing quality.ipynb': jupiter notebook that looks into preprocessed data to validate the preprocessing
- 'keras to torch.ipynb': short jupiter notebook that translates a keras model into a torch model
- 'Launch textattack on our models.ipynb': jupiter notebook in which we attack our models using the library textattack
- learning_curve.py: module providing utility functions to draw learning curves of models
- 'Looking at the data.ipynb': jupiter notebook for looking into the data and understanding its composition
- ML_models.py: module providing for each bag of words model its hyperparameters (for cross-validation)
- ML.py: module allowing to train bag of words models using the scikit-learn library
- myAttackRecipies.py: module defining our attacks (hot-flip and text fooler)
- myConstraints.py: module defining new types of constraints
- myWordEmbedding.py: module re-implementing the WordEmbedding module from the TextAttack library
- myWordSwapGradientBased.py: module re-implementing the WordSwapGradientBased module from the TextAttack library, the modifications are not sufficient to fully take into account particular structures
- ParticularStructures.py: module giving the constants for particular structures
- torch_cnn.py: module giving utility functions for transforming keras CNN into torch
- 'Training curve.ipynb': jupiter notebook that shows the training curves for our models
- 'Train without particular structures.ipynb': jupiter notebook in which we train our models once again, this time not taking particular structures into account
- util.py: module regrouping many utility functions; in particular it allows to load data and preprocess emails
