Skip to content
This repository
Browse code

Remove redundant Makefiles.

  • Loading branch information...
commit 152a1511b37c021dc227ff5023b20d6267905003 1 parent 3f72372
Casper Ti. Vector authored August 17, 2012
124  build/Makefile
... ...
@@ -1,124 +0,0 @@
1  
-DICT_FILE = dict.utf8
2  
-CORPUS_FILE = corpus.utf8
3  
-
4  
-SLM_TARGET = lm_sc
5  
-IDS_FILE = ${SLM_TARGET}.ids
6  
-
7  
-BIGRAM_STAT = ${SLM_TARGET}.id2gram
8  
-SLM2_RAW_FILE = ${SLM_TARGET}.2gram
9  
-SLM2_FILE = ${SLM_TARGET}.2gm
10  
-SLM2_TEXT_FILE = ${SLM_TARGET}.2gm.arpa
11  
-TSLM2_FILE = ${SLM_TARGET}.t2g
12  
-TSLM2_TEXT_FILE = ${SLM_TARGET}.t2g.arpa
13  
-
14  
-TRIGRAM_STAT = ${SLM_TARGET}.id3gram
15  
-SLM3_RAW_FILE = ${SLM_TARGET}.3gram 
16  
-SLM3_FILE = ${SLM_TARGET}.3gm 
17  
-SLM3_TEXT_FILE = ${SLM_TARGET}.3gm.arpa 
18  
-TSLM3_FILE = ${SLM_TARGET}.t3g
19  
-TSLM3_TEXT_FILE = ${SLM_TARGET}.t3g.arpa
20  
-
21  
-PYTRIE2_FILE = pydict2_sc.bin
22  
-PYTRIE2_LOG_FILE = pydict2_sc.log
23  
-PYTRIE3_FILE = pydict3_sc.bin
24  
-PYTRIE3_LOG_FILE = pydict3_sc.log
25  
-
26  
-all: bootstrap3
27  
-
28  
-mmseg_ids: ${DICT_FILE} ${CORPUS_FILE}
29  
-	mmseg -f bin -s 10 -a 9 -d ${DICT_FILE} ${CORPUS_FILE} > ${IDS_FILE}
30  
-
31  
-slm2_ids: ${DICT_FILE} ${CORPUS_FILE} ${TSLM2_FILE}
32  
-	slmseg -f bin -s 10 \
33  
-		-d ${DICT_FILE} -m ${TSLM2_FILE} ${CORPUS_FILE} > ${IDS_FILE}
34  
-
35  
-slm3_ids: ${DICT_FILE} ${CORPUS_FILE} ${TSLM3_FILE}
36  
-	slmseg -f bin -s 10 \
37  
-		-d ${DICT_FILE} -m ${TSLM3_FILE} ${CORPUS_FILE} > ${IDS_FILE}
38  
-
39  
-bigram_stat: ${BIGRAM_STAT_FILE}
40  
-${BIGRAM_STAT_FILE}: ${IDS_FILE}
41  
-	ids2ngram -n 2 -p 20000000 -s $@.tmp -o $@ $<
42  
-	rm -f $@.tmp
43  
-
44  
-slm2_raw: ${SLM2_RAW_FILE}
45  
-${SLM2_RAW_FILE}: ${BIGRAM_STAT_FILE}
46  
-	slmbuild -n 2 -w 200000 -c 0,2 -d ABS,0.005 -d ABS -b 10 -e 9 -o $@ $<
47  
-
48  
-slm2: ${SLM2_FILE}
49  
-${SLM2_FILE}: ${SLM2_RAW_FILE}
50  
-	slmprune $< $@ R 100000 200000
51  
-
52  
-tslm2: ${TSLM2_FILE}
53  
-${TSLM2_FILE}:${SLM2_FILE}
54  
-	slmthread $< $@
55  
-
56  
-lexicon2: ${PYTRIE2_FILE}
57  
-${PYTRIE2_FILE}: ${DICT_FILE} ${TSLM_FILE2}
58  
-	genpyt -i ${DICT_FILE} -s ${TSLM_FILE2} -l ${PYTRIE2_LOG_FILE} -o $@
59  
-
60  
-slm2_info: ${SLM2_TEXT_FILE}
61  
-${SLM2_TEXT_FILE}: ${DICT_FILE} ${SLM2_FILE}
62  
-	slminfo -p -v -l ${DICT_FILE} ${SLM2_FILE} > $@
63  
-
64  
-tslm2_info: ${TSLM2_TEXT_FILE}
65  
-${TSLM2_TEXT_FILE}: ${DICT_FILE} ${TSLM2_FILE}
66  
-	tslminfo -v -l ${DICT_FILE} ${TSLM2_FILE} > $@
67  
-
68  
-tslm2_pack: ${DICT_FILE} ${TSLM2_TEXT_FILE}
69  
-	tslmpack ${TSLM2_TEXT_FILE} ${DICT_FILE} ${TSLM2_FILE}
70  
-
71  
-trigram_stat: ${TRIGRAM_STAT_FILE}
72  
-${TRIGRAM_STAT_FILE}: ${IDS_FILE}
73  
-	ids2ngram -n 3 -p 20000000 -s $@.tmp -o $@ $<
74  
-	rm -f $@.tmp
75  
-
76  
-slm3_raw: ${SLM3_RAW_FILE}
77  
-${SLM3_RAW_FILE}: ${TRIGRAM_STAT_FILE}
78  
-	slmbuild -n 3 -w 200000 -c 0,2,2 -d ABS,0.0005 -d ABS -d ABS -b 10 -e 9 \
79  
-		-o $@ $<
80  
-slm3: ${SLM3_FILE}
81  
-${SLM3_FILE}: ${SLM3_RAW_FILE}
82  
-	slmprune $< $@ R 100000 2500000 1000000
83  
-
84  
-tslm3: ${TSLM3_FILE}
85  
-${TSLM3_FILE}: ${SLM3_FILE}
86  
-	slmthread $< $@
87  
-
88  
-slm3_info: ${SLM3_TEXT_FILE}
89  
-${SLM3_TEXT_FILE}: ${DICT_FILE} ${SLM3_FILE}
90  
-	slminfo -p -v -l ${DICT_FILE} ${SLM3_FILE} > $@
91  
-
92  
-tslm3_info: ${TSLM3_TEXT_FILE}
93  
-${TSLM3_TEXT_FILE}: ${DICT_FILE} ${TSLM3_FILE}
94  
-	tslminfo -p -v -l ${DICT_FILE} ${TSLM3_FILE} > $@
95  
-
96  
-tslm3_pack: ${DICT_FILE} ${TSLM3_TEXT_FILE}
97  
-	tslmpack ${TSLM3_TEXT_FILE} ${DICT_FILE} ${TSLM3_FILE}
98  
-
99  
-lexicon3: ${PYTRIE3_FILE}
100  
-${PYTRIE3_FILE}: ${DICT_FILE} ${TSLM_FILE3}
101  
-	genpyt -i ${DICT_FILE} -s ${TSLM_FILE3} -l ${PYTRIE3_LOG_FILE} -o $@
102  
-
103  
-tmp_clean:
104  
-	rm -f *.tmp ${IDS_FILE}
105  
-	rm -f ${BIGRAM_STAT} ${SLM2_RAW_FILE}
106  
-	rm -f ${TRIGRAM_STAT} ${SLM3_RAW_FILE}
107  
-
108  
-mmseg_bigram: mmseg_ids tslm2_info
109  
-mmseg_trigram: mmseg_ids tslm3_info
110  
-slm_bigram2: slm2_ids tslm2_info
111  
-slm_bigram3: slm3_ids tslm2_info
112  
-slm_trigram2: slm2_ids tslm3_info
113  
-slm_trigram3: slm3_ids tslm3_info
114  
-
115  
-bootstrap2:
116  
-	make mmseg_bigram
117  
-	make slm_bigram2
118  
-	make lexicon2
119  
-
120  
-bootstrap3:
121  
-	make mmseg_trigram
122  
-	make slm_trigram3
123  
-	make lexicon3
124  
-
54  build/SConscript
... ...
@@ -1,54 +0,0 @@
1  
-import os
2  
-
3  
-Import('env')
4  
-
5  
-def program(name, objlist):
6  
-    src = ['../src/' + obj for obj in objlist]
7  
-    return env.Program(name, source=src,
8  
-                       CPPPATH=['..'] + env['CPPPATH'])
9  
-
10  
-program('genpyt', ['portability.o', 'slm/slm.o', 'slm/tslmendian/writer.o',
11  
-                   'lexicon/trie_writer.o', 'lexicon/genPYT.o',
12  
-                   'lexicon/pytrie.o', 'lexicon/pytrie_gen.o',
13  
-                   'pinyin/pinyin_data.o'])
14  
-        
15  
-program('slmthread', ['portability.o', 'slm/sim_slm.o',
16  
-                      'slm/thread/ValueCompress.o', 'slm/thread/slmthread.o'])
17  
-
18  
-program('testvc', ['slm/thread/ValueCompress.o', 'slm/thread/test_vc.o'])
19  
-
20  
-program('tslminfo', ['portability.o', 'slm/slm.o', 'slm/tslminfo/tslminfo.o'])
21  
-
22  
-program('tslmpack', ['portability.o', 'slm/slm.o',
23  
-                     'slm/thread/ValueCompress.o', 'slm/tslmpack/slmpack.o',
24  
-                     'slm/tslmpack/arpa_conv.o', 'slm/tslmpack/arpa_slm.o'])
25  
-
26  
-program('tslmendian', ['slm/tslmendian/slm_file.o',
27  
-                       'slm/tslmendian/slm_endian.o',
28  
-                       'slm/tslmendian/writer.o'])
29  
-
30  
-program('slminfo', ['portability.o', 'slm/slminfo/slminfo.o'])
31  
-
32  
-program('slmprune', ['portability.o', 'slm/sim_slm.o',
33  
-                     'slm/slmprune/slmprune.o'])
34  
-
35  
-program('getWordFreq', ['portability.o', 'slm/slm.o',
36  
-                        'slm/getWordFreq/getWordFreq.o'])
37  
-
38  
-program('slmbuild', ['portability.o', 'slm/sim_slmbuilder.o',
39  
-                     'slm/slmbuild/slmbuild.o'])
40  
-
41  
-program('mmseg', ['portability.o', 'slm/sim_dict.o', 'slm/sim_sen.o',
42  
-                  'slm/mmseg/mmseg.o'])
43  
-
44  
-program('slmseg', ['portability.o', 'slm/sim_dict.o', 'slm/sim_sen.o',
45  
-                   'slm/slm.o', 'slm/slmseg/slmseg.o'])
46  
-
47  
-program('ids2ngram', ['portability.o', 'slm/ids2ngram/ids2ngram.o'])
48  
-
49  
-program('idngram_merge', ['portability.o', 'slm/ids2ngram/idngram_merge.o'])
50  
-
51  
-Command("../data/tslmpack", "tslmpack", Copy("$TARGET", "$SOURCE"))
52  
-Command("../data/tslmendian", "tslmendian", Copy("$TARGET", "$SOURCE"))
53  
-Command("../data/genpyt", "genpyt", Copy("$TARGET", "$SOURCE"))
54  
-
29  data/Makefile
... ...
@@ -1,29 +0,0 @@
1  
-LM_SC_ARPA = ../raw/lm_sc.t3g.arpa
2  
-DICTFILE = ../raw/dict.utf8
3  
-PYTRIE_LOG = pydict_sc.log.utf8
4  
-LM_SC_BIN = lm_sc.t3g
5  
-
6  
-all: pydict_sc.bin pydict_sc.bin.le pydict_sc.bin.be lm_sc.t3g.le lm_sc.t3g.be
7  
-	@echo done
8  
-
9  
-$(LM_SC_BIN): $(LM_SC_ARPA) $(DICTFILE)
10  
-	./tslmpack $(LM_SC_ARPA) $(DICTFILE) $@
11  
-
12  
-pydict_sc.bin: $(DICTFILE) $(LM_SC_BIN)
13  
-	./genpyt -i $(DICTFILE) -o $@ -l $(PYTRIE_LOG) -s $(LM_SC_BIN)
14  
-
15  
-pydict_sc.bin.le: $(DICTFILE) $(LM_SC_BIN)
16  
-	./genpyt -e le -i $(DICTFILE) -o $@ -l $(PYTRIE_LOG) -s $(LM_SC_BIN)
17  
-
18  
-pydict_sc.bin.be: $(DICTFILE) $(LM_SC_BIN)
19  
-	./genpyt -e be -i $(DICTFILE) -o $@ -l $(PYTRIE_LOG) -s $(LM_SC_BIN)
20  
-
21  
-lm_sc.t3g.le: lm_sc.t3g
22  
-	./tslmendian -e le -i $(LM_SC_BIN) -o $@
23  
-
24  
-lm_sc.t3g.be: lm_sc.t3g
25  
-	./tslmendian -e be -i $(LM_SC_BIN) -o $@
26  
-
27  
-clean:
28  
-	@rm -f pydict_sc.bin pydict_sc.bin.le pydict_sc.bin.be lm_sc.t3g lm_sc.t3g.le lm_sc.t3g.be pydict_sc.log.utf8
29  
-	@echo cleaned
28  raw/Makefile
... ...
@@ -1,28 +0,0 @@
1  
-LM_URL=http://open-gram.googlecode.com/files
2  
-WGET=wget
3  
-TAR=tar
4  
-
5  
-all: lm_sc.t3g.arpa dict.utf8
6  
-	@echo done
7  
-
8  
-lm_sc.t3g.arpa: stamp-lm
9  
-
10  
-stamp-lm: lm_sc.t3g.arpa.tar.bz2
11  
-	$(TAR) -jxf $^
12  
-	touch $@
13  
-
14  
-lm_sc.t3g.arpa.tar.bz2:
15  
-	$(WGET) $(LM_URL)/$@
16  
-
17  
-dict.utf8: stamp-dict
18  
-
19  
-stamp-dict: dict.utf8.tar.bz2
20  
-	$(TAR) -jxf $^
21  
-	touch $@
22  
-
23  
-dict.utf8.tar.bz2:
24  
-	$(WGET) $(LM_URL)/$@
25  
-
26  
-clean:
27  
-	@rm -f stamp-dict stamp-lm lm_sc.t3g.arpa dict.utf8
28  
-	@echo cleaned

0 notes on commit 152a151

Please sign in to comment.
Something went wrong with that request. Please try again.