diff options
author | Peng Wu <alexepico@gmail.com> | 2013-07-22 11:37:11 +0800 |
---|---|---|
committer | Peng Wu <alexepico@gmail.com> | 2013-07-22 11:37:11 +0800 |
commit | b78429d78df745dd327b6dada6b9bd71ea5df84e (patch) | |
tree | 82c4625db8674c66d69fd566fce8efc347e3cb3a /data/Makefile.am | |
download | libzhuyin-b78429d78df745dd327b6dada6b9bd71ea5df84e.tar.gz libzhuyin-b78429d78df745dd327b6dada6b9bd71ea5df84e.tar.xz libzhuyin-b78429d78df745dd327b6dada6b9bd71ea5df84e.zip |
import libpinyin code
Diffstat (limited to 'data/Makefile.am')
-rw-r--r-- | data/Makefile.am | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/data/Makefile.am b/data/Makefile.am new file mode 100644 index 0000000..c75fd95 --- /dev/null +++ b/data/Makefile.am @@ -0,0 +1,67 @@ +## 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 2, 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, write to the Free Software +## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + + +tablefiles = gb_char.table gbk_char.table \ + merged.table \ + art.table culture.table economy.table \ + geology.table history.table life.table \ + nature.table scitech.table \ + society.table sport.table + +binfiles = ${tablefiles:.table=.bin} + + +textual_model_data = interpolation2.text \ + $(tablefiles) + + +binary_model_data = phrase_index.bin pinyin_index.bin \ + bigram.db \ + $(binfiles) + + +MAINTAINERCLEANFILES = Makefile.in + +EXTRA_DIST = $(textual_model_data) \ + table.conf + +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/model6.text.tar.gz + tar xvf model6.text.tar.gz -C $(top_srcdir)/data + + +$(tablefiles): interpolation2.text + +bigram.db: $(textual_model_data) + $(RM) $(binary_model_data) + ../utils/storage/gen_binary_files --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 + +phrase_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 |