diff --git a/tools/extras/install_rnnlm_hs.sh b/tools/extras/install_rnnlm_hs.sh index 7fac7fa07..40173a362 100755 --- a/tools/extras/install_rnnlm_hs.sh +++ b/tools/extras/install_rnnlm_hs.sh @@ -11,4 +11,7 @@ fi echo "Installing RNNLM-HS 0.1b" cd rnnlm-hs-0.1b +if grep -q '#define MAX_STRING 100' rnnlm.c ; then + patch <../extras/rnnlm.patch +fi make diff --git a/tools/extras/rnnlm.patch b/tools/extras/rnnlm.patch new file mode 100644 index 000000000..97b02571f --- /dev/null +++ b/tools/extras/rnnlm.patch @@ -0,0 +1,13 @@ +Index: rnnlm.c +=================================================================== +--- rnnlm.c (revision 4774) ++++ rnnlm.c (working copy) +@@ -20,7 +20,7 @@ + #include + #include + +-#define MAX_STRING 100 ++#define MAX_STRING 256 + #define MAX_SENTENCE_LENGTH 10000 + #define MAX_CODE_LENGTH 40 +