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
|
## Makefile.am -- Process this file with automake to produce Makefile.in
## Copyright (C) 2011 Peng Wu
##
## This program is free software: you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## the Free Software Foundation, either version 3 of the License, or
## (at your option) any later version.
##
## This program is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
## GNU General Public License for more details.
##
## You should have received a copy of the GNU General Public License
## along with this program. If not, see <http://www.gnu.org/licenses/>.
tablefiles = gb_char.table gbk_char.table \
opengram.table merged.table \
art.table culture.table economy.table \
geology.table history.table life.table \
nature.table people.table science.table \
society.table sport.table technology.table \
punct.table
binfiles = ${tablefiles:.table=.bin}
textual_model_data = interpolation2.text \
$(tablefiles)
binary_model_data = phrase_index.bin pinyin_index.bin \
addon_phrase_index.bin addon_pinyin_index.bin \
bigram.db \
$(binfiles)
MAINTAINERCLEANFILES = Makefile.in
EXTRA_DIST = $(textual_model_data) \
table.conf.in
libpinyin_db_DATA = $(binary_model_data) \
table.conf
libpinyin_dbdir = $(libdir)/libpinyin/data
CLEANFILES = $(binary_model_data)
interpolation2.text:
wget http://downloads.sourceforge.net/libpinyin/models/model20.text.tar.gz
tar xvf model20.text.tar.gz -C $(top_srcdir)/data
$(tablefiles) table.conf: interpolation2.text
bigram.db: $(textual_model_data)
$(RM) $(binary_model_data)
../utils/storage/gen_binary_files --gen-punct-table --table-dir $(top_srcdir)/data
../utils/storage/import_interpolation --table-dir $(top_srcdir)/data < $(top_srcdir)/data/interpolation2.text
../utils/training/gen_unigram --table-dir $(top_srcdir)/data
addon_phrase_index.bin phrase_index.bin addon_pinyin_index.bin pinyin_index.bin $(binfiles): bigram.db
modify:
git reset --hard
sed -i -r -e "s'lambda parameter:0\\.[0-9]{3,6}'lambda parameter:$(LAMBDA_PARAMETER)'" table.conf
|