#!/bin/bash

set -u
set -e

VEC=${1:-text8.tar.gz}
DIR=${2:-word-similarities/}

# from http://stackoverflow.com/a/246128
SCRIPTDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"

echo "Evaluating $VEC on word rankings in $DIR" >&2

python "$SCRIPTDIR/evalrank.py" "$VEC" `find "$DIR" -name '*.txt'`

#!/bin/bash

set -u
set -e

VEC=${1:-text8.tar.gz}
DIR=${2:-word-similarities/}

echo "Evaluating $VEC on word rankings in $DIR" >&2

python evalrank.py $VEC `find "$DIR" -name '*.txt'`

--- 
+++ 
@@ -6,6 +6,9 @@
 VEC=${1:-text8.tar.gz}
 DIR=${2:-word-similarities/}
 
+# from http://stackoverflow.com/a/246128
+SCRIPTDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
+
 echo "Evaluating $VEC on word rankings in $DIR" >&2
 
-python evalrank.py $VEC `find "$DIR" -name '*.txt'`
+python "$SCRIPTDIR/evalrank.py" "$VEC" `find "$DIR" -name '*.txt'`
Allow invocation from other directories
