Forked from Cresson Remi / otbtf
Source project has a limited visibility.
exp_fev_18.sh 3.65 KiB
#!/usr/bin/env bash

if [ "$1" == "generate" ]; then

    python3 generate_data.py data/EPI_ELENA/raw_text  data/graph_exp_fev_18/normal  asso.json normal;

    python3 generate_data.py data/EPI_ELENA/raw_text  data/graph_exp_fev_18/extension_1  asso.json extension -a 1;
    python3 generate_data.py data/EPI_ELENA/raw_text  data/graph_exp_fev_18/extension_2  asso.json extension -a 2;
    python3 generate_data.py data/EPI_ELENA/raw_text  data/graph_exp_fev_18/extension_3  asso.json extension -a 3;


    python3 generate_data.py data/EPI_ELENA/raw_text  data/graph_exp_fev_18/gen_all_1  asso.json generalisation -t all -n 1;
    python3 generate_data.py data/EPI_ELENA/raw_text  data/graph_exp_fev_18/gen_all_2  asso.json generalisation -t all -n 2;

    python3 generate_data.py data/EPI_ELENA/raw_text  data/graph_exp_fev_18/gen_town  asso.json generalisation -t bounded -b town;
    python3 generate_data.py data/EPI_ELENA/raw_text  data/graph_exp_fev_18/gen_region  asso.json generalisation -t bounded -b region;
    python3 generate_data.py data/EPI_ELENA/raw_text  data/graph_exp_fev_18/gen_capital  asso.json generalisation -t bounded -b capital;
    python3 generate_data.py data/EPI_ELENA/raw_text  data/graph_exp_fev_18/gen_country  asso.json generalisation -t bounded -b country;
fi

if [ "$1" == "eval" ]; then
    ## Normal STR eval
    dir=normal;
    mesure=("MCS" "VEO" "HED" "GREEDY" "BOC" "GED" "JACCARD" "BOWSE");
    for me in ${mesure[@]}; do
        echo $me" for STR "$dir;
        python3 eval.py $me data/EPI_ELENA/raw_text  data/graph_exp_fev_18/$dir data/graph_exp_fev_18/$dir/asso.json -s data/graph_exp_fev_18/selected.json  -o data/graph_exp_fev_18/result_eval/$dir/;
    done;

    ## Generalised STR eval
    dir=gen_all_1
    mesure=( "MCS" "VEO"  "JACCARD" "HED" "GREEDY" "BOC" "BOWSE");
    for me in ${mesure[@]}; do
        echo $me" for STR "$dir;
        python3 eval.py $me data/EPI_ELENA/raw_text  data/graph_exp_fev_18/$dir data/graph_exp_fev_18/$dir/asso.json  -s data/graph_exp_fev_18/selected.json  -o data/graph_exp_fev_18/result_eval/$dir/;
    done;

    dir=gen_all_2
    mesure=( "MCS" "VEO"  "JACCARD" "HED" "GREEDY" "BOC" "BOWSE");
    for me in ${mesure[@]}; do
        echo $me" for STR "$dir;
        python3 eval.py $me data/EPI_ELENA/raw_text  data/graph_exp_fev_18/$dir data/graph_exp_fev_18/$dir/asso.json  -s data/graph_exp_fev_18/selected.json  -o data/graph_exp_fev_18/result_eval/$dir/;
    done;

    dir=gen_region
    for me in ${mesure[@]}; do
        echo $me" for STR "$dir;
        python3 eval.py $me data/EPI_ELENA/raw_text  data/graph_exp_fev_18/$dir data/graph_exp_fev_18/$dir/asso.json  -s data/graph_exp_fev_18/selected.json  -o data/graph_exp_fev_18/result_eval/$dir/;
    done;

    dir=gen_country
    for me in ${mesure[@]}; do
        echo $me" for STR "$dir;
        python3 eval.py $me data/EPI_ELENA/raw_text  data/graph_exp_fev_18/$dir data/graph_exp_fev_18/$dir/asso.json  -s data/graph_exp_fev_18/selected.json  -o data/graph_exp_fev_18/result_eval/$dir/;
    done;

    ## Extended STR eval
    dir=extension_1
    mesure=( "MCS" "VEO" "JACCARD" "BOC" "WLSUBTREE" "BOWSE");
    for me in ${mesure[@]}; do
        echo $me" for STR "$dir;
        python3 eval.py $me data/EPI_ELENA/raw_text  data/graph_exp_fev_18/$dir data/graph_exp_fev_18/$dir/asso.json  -s data/graph_exp_fev_18/selected.json  -o data/graph_exp_fev_18/result_eval/$dir/;
    done;
    dir=extension_2

    for me in ${mesure[@]}; do
        echo $me" for STR "$dir;
        python3 eval.py $me data/EPI_ELENA/raw_text  data/graph_exp_fev_18/$dir data/graph_exp_fev_18/$dir/asso.json  -s data/graph_exp_fev_18/selected.json  -o data/graph_exp_fev_18/result_eval/$dir/;
    done;
fi