summaryrefslogtreecommitdiffstats
path: root/data/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'data/CMakeLists.txt')
-rw-r--r--data/CMakeLists.txt23
1 files changed, 17 insertions, 6 deletions
diff --git a/data/CMakeLists.txt b/data/CMakeLists.txt
index 2c7d09b..d3df1d0 100644
--- a/data/CMakeLists.txt
+++ b/data/CMakeLists.txt
@@ -45,12 +45,13 @@ add_custom_command(
${CMAKE_SOURCE_DIR}/data/gb_char.table
${CMAKE_SOURCE_DIR}/data/gbk_char.table
${CMAKE_SOURCE_DIR}/data/interpolation2.text
+ ${CMAKE_SOURCE_DIR}/data/table.conf
COMMENT
"Downloading textual model data..."
COMMAND
- wget http://downloads.sourceforge.net/libpinyin/models/model17.text.tar.gz
+ wget http://downloads.sourceforge.net/libpinyin/models/model19.text.tar.gz
COMMAND
- tar xvf model17.text.tar.gz -C ${CMAKE_SOURCE_DIR}/data
+ tar xvf model19.text.tar.gz -C ${CMAKE_SOURCE_DIR}/data
)
add_custom_command(
@@ -67,9 +68,9 @@ add_custom_command(
${gen_binary_files_BIN} --table-dir ${CMAKE_SOURCE_DIR}/data
DEPENDS
gen_binary_files
- ${CMAKE_SOURCE_DIR}/data/gb_char.table
- ${CMAKE_SOURCE_DIR}/data/gbk_char.table
- ${CMAKE_SOURCE_DIR}/data/table.conf
+ ${CMAKE_SOURCE_DIR}/data/gb_char.table
+ ${CMAKE_SOURCE_DIR}/data/gbk_char.table
+ ${CMAKE_SOURCE_DIR}/data/table.conf
)
add_custom_command(
@@ -83,7 +84,11 @@ add_custom_command(
${gen_unigram_BIN} --table-dir ${CMAKE_SOURCE_DIR}/data
DEPENDS
import_interpolation
- ${CMAKE_SOURCE_DIR}/data/interpolation2.text
+ ${CMAKE_SOURCE_DIR}/data/interpolation2.text
+ ${CMAKE_BINARY_DIR}/data/gb_char.bin
+ ${CMAKE_BINARY_DIR}/data/gbk_char.bin
+ ${CMAKE_BINARY_DIR}/data/phrase_index.bin
+ ${CMAKE_BINARY_DIR}/data/pinyin_index.bin
)
install(
@@ -98,3 +103,9 @@ set_directory_properties(
ADDITIONAL_MAKE_CLEAN_FILES
${BINARY_MODEL_DATA_FILES}
)
+
+configure_file(
+ table.conf.in
+ table.conf
+ @ONLY
+)