Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Remove redundant Makefiles.

  • Loading branch information...
commit 152a1511b37c021dc227ff5023b20d6267905003 1 parent 3f72372
@CasperVector CasperVector authored
Showing with 0 additions and 235 deletions.
  1. +0 −124 build/Makefile
  2. +0 −54 build/SConscript
  3. +0 −29 data/Makefile
  4. +0 −28 raw/Makefile
View
124 build/Makefile
@@ -1,124 +0,0 @@
-DICT_FILE = dict.utf8
-CORPUS_FILE = corpus.utf8
-
-SLM_TARGET = lm_sc
-IDS_FILE = ${SLM_TARGET}.ids
-
-BIGRAM_STAT = ${SLM_TARGET}.id2gram
-SLM2_RAW_FILE = ${SLM_TARGET}.2gram
-SLM2_FILE = ${SLM_TARGET}.2gm
-SLM2_TEXT_FILE = ${SLM_TARGET}.2gm.arpa
-TSLM2_FILE = ${SLM_TARGET}.t2g
-TSLM2_TEXT_FILE = ${SLM_TARGET}.t2g.arpa
-
-TRIGRAM_STAT = ${SLM_TARGET}.id3gram
-SLM3_RAW_FILE = ${SLM_TARGET}.3gram
-SLM3_FILE = ${SLM_TARGET}.3gm
-SLM3_TEXT_FILE = ${SLM_TARGET}.3gm.arpa
-TSLM3_FILE = ${SLM_TARGET}.t3g
-TSLM3_TEXT_FILE = ${SLM_TARGET}.t3g.arpa
-
-PYTRIE2_FILE = pydict2_sc.bin
-PYTRIE2_LOG_FILE = pydict2_sc.log
-PYTRIE3_FILE = pydict3_sc.bin
-PYTRIE3_LOG_FILE = pydict3_sc.log
-
-all: bootstrap3
-
-mmseg_ids: ${DICT_FILE} ${CORPUS_FILE}
- mmseg -f bin -s 10 -a 9 -d ${DICT_FILE} ${CORPUS_FILE} > ${IDS_FILE}
-
-slm2_ids: ${DICT_FILE} ${CORPUS_FILE} ${TSLM2_FILE}
- slmseg -f bin -s 10 \
- -d ${DICT_FILE} -m ${TSLM2_FILE} ${CORPUS_FILE} > ${IDS_FILE}
-
-slm3_ids: ${DICT_FILE} ${CORPUS_FILE} ${TSLM3_FILE}
- slmseg -f bin -s 10 \
- -d ${DICT_FILE} -m ${TSLM3_FILE} ${CORPUS_FILE} > ${IDS_FILE}
-
-bigram_stat: ${BIGRAM_STAT_FILE}
-${BIGRAM_STAT_FILE}: ${IDS_FILE}
- ids2ngram -n 2 -p 20000000 -s $@.tmp -o $@ $<
- rm -f $@.tmp
-
-slm2_raw: ${SLM2_RAW_FILE}
-${SLM2_RAW_FILE}: ${BIGRAM_STAT_FILE}
- slmbuild -n 2 -w 200000 -c 0,2 -d ABS,0.005 -d ABS -b 10 -e 9 -o $@ $<
-
-slm2: ${SLM2_FILE}
-${SLM2_FILE}: ${SLM2_RAW_FILE}
- slmprune $< $@ R 100000 200000
-
-tslm2: ${TSLM2_FILE}
-${TSLM2_FILE}:${SLM2_FILE}
- slmthread $< $@
-
-lexicon2: ${PYTRIE2_FILE}
-${PYTRIE2_FILE}: ${DICT_FILE} ${TSLM_FILE2}
- genpyt -i ${DICT_FILE} -s ${TSLM_FILE2} -l ${PYTRIE2_LOG_FILE} -o $@
-
-slm2_info: ${SLM2_TEXT_FILE}
-${SLM2_TEXT_FILE}: ${DICT_FILE} ${SLM2_FILE}
- slminfo -p -v -l ${DICT_FILE} ${SLM2_FILE} > $@
-
-tslm2_info: ${TSLM2_TEXT_FILE}
-${TSLM2_TEXT_FILE}: ${DICT_FILE} ${TSLM2_FILE}
- tslminfo -v -l ${DICT_FILE} ${TSLM2_FILE} > $@
-
-tslm2_pack: ${DICT_FILE} ${TSLM2_TEXT_FILE}
- tslmpack ${TSLM2_TEXT_FILE} ${DICT_FILE} ${TSLM2_FILE}
-
-trigram_stat: ${TRIGRAM_STAT_FILE}
-${TRIGRAM_STAT_FILE}: ${IDS_FILE}
- ids2ngram -n 3 -p 20000000 -s $@.tmp -o $@ $<
- rm -f $@.tmp
-
-slm3_raw: ${SLM3_RAW_FILE}
-${SLM3_RAW_FILE}: ${TRIGRAM_STAT_FILE}
- slmbuild -n 3 -w 200000 -c 0,2,2 -d ABS,0.0005 -d ABS -d ABS -b 10 -e 9 \
- -o $@ $<
-slm3: ${SLM3_FILE}
-${SLM3_FILE}: ${SLM3_RAW_FILE}
- slmprune $< $@ R 100000 2500000 1000000
-
-tslm3: ${TSLM3_FILE}
-${TSLM3_FILE}: ${SLM3_FILE}
- slmthread $< $@
-
-slm3_info: ${SLM3_TEXT_FILE}
-${SLM3_TEXT_FILE}: ${DICT_FILE} ${SLM3_FILE}
- slminfo -p -v -l ${DICT_FILE} ${SLM3_FILE} > $@
-
-tslm3_info: ${TSLM3_TEXT_FILE}
-${TSLM3_TEXT_FILE}: ${DICT_FILE} ${TSLM3_FILE}
- tslminfo -p -v -l ${DICT_FILE} ${TSLM3_FILE} > $@
-
-tslm3_pack: ${DICT_FILE} ${TSLM3_TEXT_FILE}
- tslmpack ${TSLM3_TEXT_FILE} ${DICT_FILE} ${TSLM3_FILE}
-
-lexicon3: ${PYTRIE3_FILE}
-${PYTRIE3_FILE}: ${DICT_FILE} ${TSLM_FILE3}
- genpyt -i ${DICT_FILE} -s ${TSLM_FILE3} -l ${PYTRIE3_LOG_FILE} -o $@
-
-tmp_clean:
- rm -f *.tmp ${IDS_FILE}
- rm -f ${BIGRAM_STAT} ${SLM2_RAW_FILE}
- rm -f ${TRIGRAM_STAT} ${SLM3_RAW_FILE}
-
-mmseg_bigram: mmseg_ids tslm2_info
-mmseg_trigram: mmseg_ids tslm3_info
-slm_bigram2: slm2_ids tslm2_info
-slm_bigram3: slm3_ids tslm2_info
-slm_trigram2: slm2_ids tslm3_info
-slm_trigram3: slm3_ids tslm3_info
-
-bootstrap2:
- make mmseg_bigram
- make slm_bigram2
- make lexicon2
-
-bootstrap3:
- make mmseg_trigram
- make slm_trigram3
- make lexicon3
-
View
54 build/SConscript
@@ -1,54 +0,0 @@
-import os
-
-Import('env')
-
-def program(name, objlist):
- src = ['../src/' + obj for obj in objlist]
- return env.Program(name, source=src,
- CPPPATH=['..'] + env['CPPPATH'])
-
-program('genpyt', ['portability.o', 'slm/slm.o', 'slm/tslmendian/writer.o',
- 'lexicon/trie_writer.o', 'lexicon/genPYT.o',
- 'lexicon/pytrie.o', 'lexicon/pytrie_gen.o',
- 'pinyin/pinyin_data.o'])
-
-program('slmthread', ['portability.o', 'slm/sim_slm.o',
- 'slm/thread/ValueCompress.o', 'slm/thread/slmthread.o'])
-
-program('testvc', ['slm/thread/ValueCompress.o', 'slm/thread/test_vc.o'])
-
-program('tslminfo', ['portability.o', 'slm/slm.o', 'slm/tslminfo/tslminfo.o'])
-
-program('tslmpack', ['portability.o', 'slm/slm.o',
- 'slm/thread/ValueCompress.o', 'slm/tslmpack/slmpack.o',
- 'slm/tslmpack/arpa_conv.o', 'slm/tslmpack/arpa_slm.o'])
-
-program('tslmendian', ['slm/tslmendian/slm_file.o',
- 'slm/tslmendian/slm_endian.o',
- 'slm/tslmendian/writer.o'])
-
-program('slminfo', ['portability.o', 'slm/slminfo/slminfo.o'])
-
-program('slmprune', ['portability.o', 'slm/sim_slm.o',
- 'slm/slmprune/slmprune.o'])
-
-program('getWordFreq', ['portability.o', 'slm/slm.o',
- 'slm/getWordFreq/getWordFreq.o'])
-
-program('slmbuild', ['portability.o', 'slm/sim_slmbuilder.o',
- 'slm/slmbuild/slmbuild.o'])
-
-program('mmseg', ['portability.o', 'slm/sim_dict.o', 'slm/sim_sen.o',
- 'slm/mmseg/mmseg.o'])
-
-program('slmseg', ['portability.o', 'slm/sim_dict.o', 'slm/sim_sen.o',
- 'slm/slm.o', 'slm/slmseg/slmseg.o'])
-
-program('ids2ngram', ['portability.o', 'slm/ids2ngram/ids2ngram.o'])
-
-program('idngram_merge', ['portability.o', 'slm/ids2ngram/idngram_merge.o'])
-
-Command("../data/tslmpack", "tslmpack", Copy("$TARGET", "$SOURCE"))
-Command("../data/tslmendian", "tslmendian", Copy("$TARGET", "$SOURCE"))
-Command("../data/genpyt", "genpyt", Copy("$TARGET", "$SOURCE"))
-
View
29 data/Makefile
@@ -1,29 +0,0 @@
-LM_SC_ARPA = ../raw/lm_sc.t3g.arpa
-DICTFILE = ../raw/dict.utf8
-PYTRIE_LOG = pydict_sc.log.utf8
-LM_SC_BIN = lm_sc.t3g
-
-all: pydict_sc.bin pydict_sc.bin.le pydict_sc.bin.be lm_sc.t3g.le lm_sc.t3g.be
- @echo done
-
-$(LM_SC_BIN): $(LM_SC_ARPA) $(DICTFILE)
- ./tslmpack $(LM_SC_ARPA) $(DICTFILE) $@
-
-pydict_sc.bin: $(DICTFILE) $(LM_SC_BIN)
- ./genpyt -i $(DICTFILE) -o $@ -l $(PYTRIE_LOG) -s $(LM_SC_BIN)
-
-pydict_sc.bin.le: $(DICTFILE) $(LM_SC_BIN)
- ./genpyt -e le -i $(DICTFILE) -o $@ -l $(PYTRIE_LOG) -s $(LM_SC_BIN)
-
-pydict_sc.bin.be: $(DICTFILE) $(LM_SC_BIN)
- ./genpyt -e be -i $(DICTFILE) -o $@ -l $(PYTRIE_LOG) -s $(LM_SC_BIN)
-
-lm_sc.t3g.le: lm_sc.t3g
- ./tslmendian -e le -i $(LM_SC_BIN) -o $@
-
-lm_sc.t3g.be: lm_sc.t3g
- ./tslmendian -e be -i $(LM_SC_BIN) -o $@
-
-clean:
- @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
- @echo cleaned
View
28 raw/Makefile
@@ -1,28 +0,0 @@
-LM_URL=http://open-gram.googlecode.com/files
-WGET=wget
-TAR=tar
-
-all: lm_sc.t3g.arpa dict.utf8
- @echo done
-
-lm_sc.t3g.arpa: stamp-lm
-
-stamp-lm: lm_sc.t3g.arpa.tar.bz2
- $(TAR) -jxf $^
- touch $@
-
-lm_sc.t3g.arpa.tar.bz2:
- $(WGET) $(LM_URL)/$@
-
-dict.utf8: stamp-dict
-
-stamp-dict: dict.utf8.tar.bz2
- $(TAR) -jxf $^
- touch $@
-
-dict.utf8.tar.bz2:
- $(WGET) $(LM_URL)/$@
-
-clean:
- @rm -f stamp-dict stamp-lm lm_sc.t3g.arpa dict.utf8
- @echo cleaned
Please sign in to comment.
Something went wrong with that request. Please try again.