Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel

preprocess.sh 592 B

You have to be logged in to leave a comment. Sign In
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
  1. #!/bin/bash
  2. ENTITIES="euadr GAD"
  3. MAX_LENGTH=128
  4. SCRIPT_FILE=relation-extraction/scripts/preprocess.py
  5. for ENTITY in $ENTITIES
  6. do
  7. echo "***** " $ENTITY " Preprocessing Start *****"
  8. for SPLIT in {1..10}
  9. do
  10. DATA_DIR=datasets/RE/$ENTITY/$SPLIT
  11. PREPROCESSED_DIR=preprocessed_datasets/RE/$ENTITY/$SPLIT
  12. mkdir -p $PREPROCESSED_DIR
  13. # Preprocess for BERT-based models
  14. python $SCRIPT_FILE $DATA_DIR/train.tsv train > $PREPROCESSED_DIR/train.tsv
  15. python $SCRIPT_FILE $DATA_DIR/test.tsv test > $PREPROCESSED_DIR/test.tsv
  16. done
  17. echo "***** " $ENTITY " Preprocessing Done *****"
  18. done
Tip!

Press p or to see the previous file or, n or to see the next file

Comments

Loading...