-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathcheck_graphan.sh
More file actions
executable file
·71 lines (47 loc) · 1.12 KB
/
check_graphan.sh
File metadata and controls
executable file
·71 lines (47 loc) · 1.12 KB
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
#!/bin/sh
# Checking Dialing/DWDS tokenizer
# written by Alexey Sokirko 2003, sokirko@yandex.ru
halt() {
echo "======================"
echo "Error: $errorstr"
echo
exit 1
}
bad_arguments() {
errorstr="the first argument should be Russian, English or German"
halt;
}
if [ $# != 1 ]; then
bad_arguments;
fi
for i in Russian English German; do
if [ $i = $1 ]; then
Language=`expr substr $i 1 3`
break;
fi
done
if [ -z $Language ]; then
bad_arguments;
fi
if [ -z $RML ]; then
errorstr="you should first register variable \$RML"
halt;
fi;
echo "================ Compiling GraphmatThick ==================="
gmake -C $RML/Source/GraphmatThick mode=release
if [ "$?" -ne "0" ]; then
errorstr="cannot compile GraphmatThick"
halt;
fi
echo "======== Checking $1 tokenizer ========"
Bin/GraphmatThick $1 Test/Graphan/$Language/text1.txt
cmp Test/Graphan/$Language/text1.gra Test/Graphan/$Language/result.gra
if [ "$?" -ne "0" ]; then
rm Test/Graphan/$Language/text1.gra
errorstr="The tokenizer doesn't work!The simple test failed!"
halt;
fi
rm Test/Graphan/$Language/text1.gra
echo
echo "Everything is OK."
echo