diff options
-rw-r--r-- | CMakeLists.txt | 18 | ||||
-rwxr-xr-x[-rw-r--r--] | scripts/json2text.pl | 3 | ||||
-rwxr-xr-x[-rw-r--r--] | scripts/vocab2txt.py | 1 |
3 files changed, 11 insertions, 11 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 9bbd33b6..6009bcc4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -18,18 +18,16 @@ else(Boost_FOUND) message(SEND_ERROR "Cannot find Boost libraries. Terminating." ) endif(Boost_FOUND) -### KenLM stuff - BEGIN ### -set(EXT_LIBS ${EXT_LIBS} /home/marcinj/Badania/kenlm/build/lib/libkenlm.a) -set(EXT_LIBS ${EXT_LIBS} /home/marcinj/Badania/kenlm/build/lib/libkenlm_util.a) -include_directories(/home/marcinj/Badania/kenlm) +set(KENLM CACHE STRING "Path to compiled kenlm directory") +if (NOT EXISTS "${KENLM}/build/lib/libkenlm.a") + message(FATAL_ERROR "Could not find ${KENLM}/build/lib/libkenlm.a") +endif() + +set(EXT_LIBS ${EXT_LIBS} ${KENLM}/build/lib/libkenlm.a) +set(EXT_LIBS ${EXT_LIBS} ${KENLM}/build/lib/libkenlm_util.a) +include_directories(${KENLM}) add_definitions(-DKENLM_MAX_ORDER=6) -#find_package (OpenMP) -#if (OPENMP_FOUND) -# LIST(APPEND CUDA_NVCC_FLAGS -Xcompiler -fopenmp) -# SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fopenmp") -#endif (OPENMP_FOUND) - find_package (BZip2) if (BZIP2_FOUND) include_directories(${BZIP2_INCLUDE_DIRS}) diff --git a/scripts/json2text.pl b/scripts/json2text.pl index 8ddce12c..7bd6117b 100644..100755 --- a/scripts/json2text.pl +++ b/scripts/json2text.pl @@ -1,3 +1,4 @@ +#!/usr/bin/env perl use strict; use JSON; use Data::Dumper; @@ -12,4 +13,4 @@ my @v; foreach my $k (keys %$d) { $v[$d->{$k}] = $k; } -print "$_\n" foreach(@v);
\ No newline at end of file +print "$_\n" foreach(@v); diff --git a/scripts/vocab2txt.py b/scripts/vocab2txt.py index fb054fa2..cfe26f06 100644..100755 --- a/scripts/vocab2txt.py +++ b/scripts/vocab2txt.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python import sys import cPickle import operator |