Encoding subtle stylometric features.
- 3.9 <= Python <= 3.12
- A HuggingFace account in order to run the preprocessing script or get access to some pre-trained models.
huggingface-cli login
pip install -r requirements.txt
It is recommended to use the shell scripts provided in the scripts
folder to run the code.
Make sure to modify the parameters in the scripts
but also in the configs
you want to use to fit your need.
The scripts are designed to be run from any directory.
If you still want to run the Python scripts directly:
usage: preprocess.py [-h] --config_path CONFIG_PATH [--num_proc NUM_PROC]
[--cache_dir CACHE_DIR]
Argument parser to flatten data from [StyleEmbedding
dataset](https://huggingface.co/datasets/AnnaWegmann/StyleEmbeddingData).
options:
-h, --help show this help message and exit
--config_path CONFIG_PATH
Path to the config file.
--num_proc NUM_PROC Number of processes to use. Default is the number of CPUs.
--cache_dir CACHE_DIR
Path to the cache directory.
Do not forget to set the parameters you want to tune and the ones you want to remain static in tune.yml
!
usage: tune.py [-h] --config_path CONFIG_PATH --ray_storage_path RAY_STORAGE_PATH
[--num_proc NUM_PROC] [--cache_dir CACHE_DIR]
Argument parser for hyper-parameter tuning.
options:
-h, --help show this help message and exit
--config_path CONFIG_PATH
Path to the config file.
--ray_storage_path RAY_STORAGE_PATH
Directory where Ray will save the logs and experiments results.
--num_proc NUM_PROC Number of processes to use. Default is the number of CPUs minus one.
--cache_dir CACHE_DIR
Path to the cache directory.
To cite DeepStylometry:
TBD
This project is licensed under the Apache License 2.0.