Hello.

Since there is no RandLM mailing list (at least I haven't found one) I'm 
posting here. When creating language model with "cat" compressor, buildlm 
fails (on my system) with error:

cat: invalid option -- 'd'

Attached patch should fix that.

-- 
Ing. Radek Bartoň

Faculty of Information Technology
Department of Computer Graphics and Multimedia
Brno University of Technology

E-mail: [EMAIL PROTECTED]
Web: http://blackhex.no-ip.org
Jabber: [EMAIL PROTECTED]
Index: src/RandLMPreproc.cpp
===================================================================
RCS file: /cvsroot/randlm/main/randlm/src/RandLMPreproc.cpp,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 RandLMPreproc.cpp
--- src/RandLMPreproc.cpp	26 Oct 2008 17:34:24 -0000	1.1.1.1
+++ src/RandLMPreproc.cpp	28 Nov 2008 14:50:48 -0000
@@ -164,7 +164,8 @@
       endpos = startpos + order_;
     }
     // set up sort flags (use numeric sort if sort by value or ngram was integerised).
-    std::string flags = "--compress-program="+compress_cmd_+" -T " + tmp_dir_ + " -S " + RandLMUtils::FloatToString(working_mem_) + "M "
+    std::string flags = (compress_cmd_ == "cat" ? "" : "--compress-program=" + compress_cmd_) +
+      " -T " + tmp_dir_ + " -S " + RandLMUtils::FloatToString(working_mem_) + "M "
       + ( (unsortedFormat & kIntegerisedFormat) | (sortedFormat & kSortedByValueFormat) ? "-n " : "") 
       + ( (sortedFormat & kSortedByValueFormat) ? "-r " : "" );
     for (int i = startpos; i <= endpos; ++i)
_______________________________________________
Moses-support mailing list
Moses-support@mit.edu
http://mailman.mit.edu/mailman/listinfo/moses-support

Reply via email to