-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmakefile
41 lines (30 loc) · 1.09 KB
/
makefile
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
CC=gcc
test: test_compile test_run
test_compile:
$(CC) hashString.c testHashString.c -o testHashString -g -Wall
$(CC) hashString.c gram.c testGram.c -o testGram -g -Wall
$(CC) gramBT.c testGramBT.c -o testGramBT -g -Wall
test_run:
./testHashString
./testGram
./testGramBT
compile:
$(CC) -pg hashString.c gram.c gramBT.c readFile.c findMax.c -o findMax -g -Wall
run:
./findMax
get_data:
wget https://d396qusza40orc.cloudfront.net/dsscapstone/dataset/Coursera-SwiftKey.zip -P data
unzip data/Coursera-SwiftKey.zip -d data
rm data/Coursera-SwiftKey.zip
create_test_file:
head -n 10000 data/final/en_US/en_US.twitter.txt > data/final/en_US/en_US.test.txt
clean_txt_files:
./cleanTextFile.sh < data/final/en_US/en_US.twitter.txt > data/en_US.twitter.clean.txt
./cleanTextFile.sh < data/final/en_US/en_US.blogs.txt > data/en_US.blogs.clean.txt
./cleanTextFile.sh < data/final/en_US/en_US.news.txt > data/en_US.news.clean.txt
prepare_data_simple_prediction:
cd R; Rscript prepareDataSimplePrediction.R
generate_tests:
cd R; Rscript generateTest.R
accuracy:
cd R; Rscript accuracy.R