1 ## Makefile.am -- Process this file with automake to produce Makefile.in
2 ## Copyright (C) 2011 Peng Wu
4 ## This program is free software; you can redistribute it and/or modify
5 ## it under the terms of the GNU General Public License as published by
6 ## the Free Software Foundation; either version 2, or (at your option)
9 ## This program is distributed in the hope that it will be useful,
10 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
11 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 ## GNU General Public License for more details.
14 ## You should have received a copy of the GNU General Public License
15 ## along with this program; if not, write to the Free Software
16 ## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19 tablefiles = gb_char.table gbk_char.table \
21 art.table culture.table economy.table \
22 geology.table history.table life.table \
23 nature.table scitech.table \
24 society.table sport.table
26 binfiles = ${tablefiles:.table=.bin}
29 textual_model_data = interpolation2.text \
33 binary_model_data = phrase_index.bin pinyin_index.bin \
38 MAINTAINERCLEANFILES = Makefile.in
40 EXTRA_DIST = $(textual_model_data) \
43 libpinyin_db_DATA = $(binary_model_data) \
46 libpinyin_dbdir = $(libdir)/libpinyin/data
48 CLEANFILES = $(binary_model_data)
50 utils_storage = ../utils/storage
51 utils_training = ../utils/training
54 wget http://downloads.sourceforge.net/libpinyin/models/model7.text.tar.gz
55 tar xvf model7.text.tar.gz -C $(top_srcdir)/data
58 $(tablefiles): interpolation2.text
60 bigram.db: $(textual_model_data)
61 $(RM) $(binary_model_data)
62 $(utils_storage)/gen_binary_files --table-dir $(top_srcdir)/data
63 $(utils_storage)/import_interpolation --table-dir $(top_srcdir)/data < $(top_srcdir)/data/interpolation2.text
64 $(utils_training)/gen_unigram --table-dir $(top_srcdir)/data
66 phrase_index.bin pinyin_index.bin $(binfiles): bigram.db
70 sed -i -r -e "s'lambda parameter:0\\.[0-9]{3,6}'lambda parameter:$(LAMBDA_PARAMETER)'" table.conf