# Symbol-Compiler (Ours)

## Enviorment Setup

```commandline
conda create -n DSL_compiler_symbol python==3.9
conda activate DSL_compiler_symbol
pip install -r requirements.txt
python preprocess_protocol.py
python -m spacy download en_core_web_sm
python -m spacy download en_core_web_lg
python -m spacy download en_core_web_trf
gdown https://drive.google.com/uc?id=0B7XkCwpI5KDYNlNUTTlSS21pQmM
python preprocess_protocol.py 
python preprocess_profile.py # get fig3 A result
python preprocess_testset.py
```

## DSL Program Generation

Please unzip `llm_cache` and copy it along with `llm_embedding` into the root directory of this project. 

If you want to replicate the method of obtaining the training set, please download https://drive.google.com/file/d/1cg-Ib0V0GJtC64eE2x6DsGoK3azwO4kM/view?usp=sharing and unzip it into the folder `data/original_protocol` in our project. Then execute the following command.

```
python preprocess_data.py
```

Execute the following command, and you will obtain the translation results of Ours-SY in the `results` folder.

```
python main.py
```

It should be consistent with the corresponding algorithm output in the `AutoDSL-Translation-Resources/results/program_output` folder.

