#!/bin/bash

if (( $# != 2 ))
then
  echo "Usage:"
  echo "       $0 grafon_config.ini prefix"
  echo ""
  exit
fi

grafon_cfg=$1
prefix=$2
out_dir=sim_packs
pack_dir=/mnt/dane_eksperymenty/entailment/paczki-lingiwsci/paczki/unzip/
wiki_graphs=/mnt/dane_eksperymenty/entailment/grafon-experiments/wikinews-graphs/complex/

if [ ! -d ${out_dir} ]
then
  mkdir -p ${out_dir}
fi

for pnum in `ls ${pack_dir}`
do
  echo -e "\n[*]Searching possible rels in pack $pnum..."
  python search_rels_in_pack.py \
    -c ${grafon_cfg} \
    -w ${wiki_graphs} \
    -l /home/pkedzia/dokumenty/Projekty/CLARIN/Entailment/semantic_relations_zestawienie_v2-used-docs.csv \
    --bias 0.29 \
    -p ${pack_dir}/${pnum} \
    -o ${out_dir}/${prefix}-sim-${pnum}_pack.csv
done
