-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathprocess_count.sh
executable file
·53 lines (47 loc) · 1.72 KB
/
process_count.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#! /bin/bash
: ${TAKE_SVD_OR_NOT:=mc} # mc, nosvd
: ${NONLINEAR_PREPROCESSING=CountPow025} # CountPow025, Count etc. See v5_indisvd_level2.m file
: ${TRUNCATE_TO_TOP_COLUMNS=trunccol12500} # Truncate Columns.
: ${SIZE_AFTER_SVD=500}
: ${REG=1e-5}
: ${DEBUG:=no}
if [ "${DEBUG}" = no ]
then
MAKE='make -f process_count.mk'
else
MAKE='make -n -f process_count.mk'
fi
DIR=`make -f commonheader.mk -s echovar_PROCESS_COUNT_FOLDER`
OPTIONS=${TAKE_SVD_OR_NOT}~${NONLINEAR_PREPROCESSING}-${TRUNCATE_TO_TOP_COLUMNS}~${SIZE_AFTER_SVD}~${REG}
PROCESS_COUNT_FILES=`make -f commonheader.mk -s echovar_PROCESS_COUNT_FILENAMES`
printf '' > $PROCESS_COUNT_FILES
CORPUS_TYPE=polyglotwiki
for matrix in {1..15}; do
FILE=${DIR}/v5_indisvd_${CORPUS_TYPE}_cooccurence_${matrix}~${OPTIONS}.mat;
echo $FILE >> $PROCESS_COUNT_FILES
$MAKE $FILE
done
CORPUS_TYPE=bitext
for matrix in ar cs de es fr zh; do
FILE=${DIR}/v5_indisvd_${CORPUS_TYPE}_cooccurence_${matrix}~${OPTIONS}.mat
echo $FILE >> $PROCESS_COUNT_FILES
$MAKE $FILE
done
CORPUS_TYPE=agigastandep
for matrix in advmod agent amod conj_and conj_but dobj nsubj pobj prep_as prep_at prep_between prep_by prep_for prep_from prep_in prep_of prep_on prep_to prep_with rcmod xsubj; do
FILE=${DIR}/v5_indisvd_${CORPUS_TYPE}_cooccurence_${matrix}~${OPTIONS}.mat
echo $FILE >> $PROCESS_COUNT_FILES
$MAKE $FILE ;
done
CORPUS_TYPE=fnppdb
for matrix in l xl; do
FILE=${DIR}/v5_indisvd_${CORPUS_TYPE}_cooccurence_${matrix}~${OPTIONS}.mat
echo $FILE >> $PROCESS_COUNT_FILES
$MAKE $FILE
done
CORPUS_TYPE=morphology
for matrix in inflection; do
FILE=${DIR}/v5_indisvd_${CORPUS_TYPE}_cooccurence_${matrix}~${OPTIONS}.mat;
echo $FILE >> $PROCESS_COUNT_FILES
$MAKE $FILE
done