-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathconfigure.sh
executable file
·84 lines (74 loc) · 1.92 KB
/
configure.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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
#!/bin/bash
echo "Building tokenizer..."
make --directory=./tokenizer
if [ $? -ne 0 ]
then
echo; echo "WARNING:"
echo "If you are using debian-like system, like ubuntu, try to install flex using apt-get"
exit 255
fi
echo "Checking dependencies..."
perl -e 'use Text::LevenshteinXS'
if [ $? -ne 0 ]
then
echo; echo "WARNING:"
echo "You need install this perl CPAN pkg: Text::LevenshteinXS. Try to run:"
echo -e "\tcpanp -i Text::LevenshteinXS"
exit 255
fi
perl -e 'use List::MoreUtils'
if [ $? -ne 0 ]
then
echo; echo "WARNING:"
echo "You need install this perl CPAN pkg: List::MoreUtils. Try to run:"
echo -e "\tcpanp -i List::MoreUtils"
exit 255
fi
perl -e 'use Parallel::Loops'
if [ $? -ne 0 ]
then
echo; echo "WARNING:"
echo "You need install this perl CPAN pkg: Parallel::Loops Try to run:"
echo -e "\tcpanp -i Parallel::Loops"
exit 255
fi
python -c 'import sklearn'
if [ $? -ne 0 ]
then
echo "You need install this python module: scikit-learn"
echo
echo "Try to run:"
echo -e "\tsudo apt-get install build-essential python-dev python-setuptools python-numpy python-scipy libatlas-dev libatlas3gf-base"
echo
echo -e "\tsudo pip install -U scikit-learn"
exit 255
fi
python -c 'import multiprocessing'
if [ $? -ne 0 ]
then
echo "You need install this python module: multiprocessing"
echo
echo -e "\tsudo pip install -U multiprocessing"
exit 255
fi
python -c 'import nltk'
if [ $? -ne 0 ]
then
echo
echo "You need install this python module: nltk"
echo "Try to run:"
echo
echo -e "\tsudo pip install -U nltk"
echo
echo "YOU MUST DOWNLOAD SOME NLTK DATA !!!"
echo
echo "run it in a python interpreter:"
echo "import nltk"
echo "nltk.download('stopwords')"
exit 255
fi
echo
echo "Config. complete !"
echo "You can run UGC normalization system by running:"
echo -e "\t./ugc_norm.sh INPUT_DIR OUTPUT_DIR"
exit 0