gbure

Graph-based approaches on unsupervised relation extraction evaluated as a fewshot problem
git clone https://esimon.eu/repos/gbure.git
Log | Files | Refs | README | LICENSE

README (1193B)


      1 This repository presents some results of graph-based approaches on unsupervised relation extraction evaluated as a fewshot problem.
      2 
      3 $ export DATA_PATH="/tmp" # the directory for storing datasets (<100MiB for each dataset, except T-REx which need a bit less than 40GiB)
      4 $ export LOG_PATH="/tmp" # the directory where the models will be saved (around 12GiB per model)
      5 $ https://esimon.eu/repos/gbure.git
      6 $ cd gbure
      7 $ python3 -m gbure.data.prepare_semeval
      8 $ python3 -m gbure.data.prepare_kbp37
      9 $ python3 -m gbure.data.prepare_fewrel
     10 $ python3 -m gbure.train gbure/config/soares_semeval.py
     11 $ python3 -m gbure.train gbure/config/soares_kbp37.py
     12 $ python3 -m gbure.train gbure/config/soares_fewrel.py
     13 
     14 To evaluate on the static (already sampled) FewRel subset used for evaluation you should use the sample_io.py script from FewRel:
     15 $ python3 sample_io.py $DATA_PATH/FewRel/val.json 50000 5 1 0 input > $DATA_PATH/FewRel/val_50000_5_1_0_input
     16 $ python3 sample_io.py $DATA_PATH/FewRel/val.json 50000 5 1 0 output > $DATA_PATH/FewRel/val_50000_5_1_0_output
     17 $ python3 -m gbure.data.prepare_sampled_fewrel bert-base-cased $DATA_PATH/FewRel/val_50000_5_1_0_input $DATA_PATH/FewRel/val_50000_5_1_0_output