<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
Works for me using a MSVC 2010 compiled ngram:<br>
<br>
[status,result] =
system('D:\SLTools\SRI\srilm1.7\bin\x64\Release\ngram.exe -lm
D:\...\eg.mad.arpa -ppl D:\...\en-us.trans.txt -debug 2'<br>
<br>
>> result<br>
reading 100001 1-grams reading 864169 2-grams reading 1739458
3-grams<br>
...<br>
p( am | <unk> ...) = [1gram] 0.0033243 [ -2.4783 ]<br>
p( interested | am ...) = [2gram] 0.000292752 [ -3.5335 ]<br>
p( in | interested ...) = [3gram] 0.454779 [ -0.3422 ]<br>
p( learning | in ...) = [3gram] 0.00223203 [ -2.6513 ]<br>
p( more | learning ...) = [2gram] 0.00943844 [ -2.0251 ]<br>
p( <unk> | more ...) = [OOV] 0 [ -1.#INF ]<br>
p( restaurant | <unk> ...) = [1gram] 0.000581166 [
-3.2357 ]<br>
p( is | restaurant ...) = [2gram] 0.00385035 [ -2.4145 ]<br>
p( on | is ...) = [3gram] 0.0063841 [ -2.1949 ]<br>
p( the | on ...) = [3gram] 0.192486 [ -0.7156 ]<br>
p( fifth | the ...) = [3gram] 0.000952138 [ -3.0213 ]<br>
p( floor | fifth ...) = [2gram] 0.000440758 [ -3.3558 ]<br>
p( </s> | floor ...) = [3gram] 0.304299 [ -0.5167 ]<br>
...<br>
<br>
<div class="moz-cite-prefix">On 6/13/2013 12:21 PM, Md. Akmal Haidar
wrote:<br>
</div>
<blockquote
cite="mid:1371140507.97166.YahooMailNeo@web161003.mail.bf1.yahoo.com"
type="cite">
<div style="color:#000; background-color:#fff; font-family:times
new roman, new york, times, serif;font-size:12pt">Hi Qiru,<br>
<br>
I tried it. It didn't work. The result shows ' '.<br>
<br>
<div><span>Akmal<br>
</span></div>
<div><br>
</div>
<div style="font-family: times new roman, new york, times,
serif; font-size: 12pt;">
<div style="font-family: times new roman, new york, times,
serif; font-size: 12pt;">
<div dir="ltr">
<hr size="1"> <font face="Arial" size="2"> <b><span
style="font-weight:bold;">From:</span></b> Qiru Zhou
<a class="moz-txt-link-rfc2396E" href="mailto:qzhou@ispeech.org"><qzhou@ispeech.org></a><br>
<b><span style="font-weight: bold;">To:</span></b> Md.
Akmal Haidar <a class="moz-txt-link-rfc2396E" href="mailto:akmalcuet00@yahoo.com"><akmalcuet00@yahoo.com></a> <br>
<b><span style="font-weight: bold;">Sent:</span></b>
Thursday, June 13, 2013 10:42:26 AM<br>
<b><span style="font-weight: bold;">Subject:</span></b>
Re: [SRILM User List] SRILM command in Matlab<br>
</font> </div>
<div class="y_msg_container"><br>
<div id="yiv6886733554">
<div> Try:<br>
[status,result] = system('<span>c:\cygwin\srilm\bin\cygwin\ngram
-lm LM -ppl test.txt -debug 2</span>')<br>
<br>
-- Qiru<br>
<br>
<div class="yiv6886733554moz-cite-prefix">On 6/12/2013
7:02 PM, Md. Akmal Haidar wrote:<br>
</div>
<blockquote type="cite">
<div
style="color:#000;background-color:#fff;font-family:times
new roman, new york, times, serif;font-size:12pt;">
<div>Hi,</div>
<div><br>
<span></span></div>
<div style="color:rgb(0, 0, 0);font-size:16px;
font-family:times new roman, new york, times,
serif;
background-color:transparent;font-style:normal;"><span>Does
anyone know how to execute srilm command in
Matlab?</span></div>
<div style="color:rgb(0, 0, 0);font-size:16px;
font-family:times new roman, new york, times,
serif;
background-color:transparent;font-style:normal;"><br>
<span></span></div>
<div style="color:rgb(0, 0, 0);font-size:16px;
font-family:times new roman, new york, times,
serif;
background-color:transparent;font-style:normal;"><span>For
example, I need to compute the perplexity of
an LM. I have to run the following command in
Matlab<br>
</span></div>
<div style="color:rgb(0, 0, 0);font-size:16px;
font-family:times new roman, new york, times,
serif;
background-color:transparent;font-style:normal;"><span>c:\cygwin\srilm\bin\cygwin\ngram
-lm LM -ppl test.txt -debug 2</span></div>
<div style="color:rgb(0, 0, 0);font-size:16px;
font-family:times new roman, new york, times,
serif;
background-color:transparent;font-style:normal;"><br>
<span></span></div>
<div style="color:rgb(0, 0, 0);font-size:16px;
font-family:times new roman, new york, times,
serif;
background-color:transparent;font-style:normal;"><span>is
there any way to run this in Matlab?</span></div>
<div style="color:rgb(0, 0, 0);font-size:16px;
font-family:times new roman, new york, times,
serif;
background-color:transparent;font-style:normal;"><br>
<span></span></div>
<div style="color:rgb(0, 0, 0);font-size:16px;
font-family:times new roman, new york, times,
serif;
background-color:transparent;font-style:normal;"><span>Thanks</span></div>
<div style="color:rgb(0, 0, 0);font-size:16px;
font-family:times new roman, new york, times,
serif;
background-color:transparent;font-style:normal;"><span>Best
Regards</span></div>
<div style="color:rgb(0, 0, 0);font-size:16px;
font-family:times new roman, new york, times,
serif;
background-color:transparent;font-style:normal;"><span>Akmal</span></div>
</div>
<br>
<fieldset class="yiv6886733554mimeAttachmentHeader"></fieldset>
<br>
<pre>_______________________________________________
SRILM-User site list
<a moz-do-not-send="true" rel="nofollow" class="yiv6886733554moz-txt-link-abbreviated" ymailto="mailto:SRILM-User@speech.sri.com" target="_blank" href="mailto:SRILM-User@speech.sri.com">SRILM-User@speech.sri.com</a>
<a moz-do-not-send="true" rel="nofollow" class="yiv6886733554moz-txt-link-freetext" target="_blank" href="http://www.speech.sri.com/mailman/listinfo/srilm-user">http://www.speech.sri.com/mailman/listinfo/srilm-user</a></pre>
</blockquote>
<br>
<pre class="yiv6886733554moz-signature">--
QIRU ZHOU | CHIEF SCIENTIST | iSPEECH, INC. | T 917.338.7723 | <a moz-do-not-send="true" rel="nofollow" class="yiv6886733554moz-txt-link-abbreviated" ymailto="mailto:qzhou@iSpeech.org" target="_blank" href="mailto:qzhou@iSpeech.org">qzhou@iSpeech.org</a> | <a moz-do-not-send="true" rel="nofollow" class="yiv6886733554moz-txt-link-abbreviated" target="_blank" href="http://www.ispeech.org/">www.iSpeech.org</a></pre>
</div>
</div>
<br>
<br>
</div>
</div>
</div>
</div>
</blockquote>
<br>
<pre class="moz-signature" cols="100">--
QIRU ZHOU | CHIEF SCIENTIST | iSPEECH, INC. | T 917.338.7723 | <a class="moz-txt-link-abbreviated" href="mailto:qzhou@iSpeech.org">qzhou@iSpeech.org</a> | <a class="moz-txt-link-abbreviated" href="http://www.iSpeech.org">www.iSpeech.org</a></pre>
</body>
</html>