<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">On 12/3/2013 12:50 PM, Laatar Rim
wrote:<br>
</div>
<blockquote
cite="mid:1386103837.59641.YahooMailNeo@web173205.mail.ir2.yahoo.com"
type="cite">
<div style="color:#000; background-color:#fff; font-family:times
new roman, new york, times, serif;font-size:12pt">in the class
format: <br>
<pre><i>class</i> [<i>p</i>] <i>word1</i> <i>word2</i> ...</pre>
how can i calculate p ?<br>
</div>
</blockquote>
<br>
Use replace-words-with-classes with the outfile= option. This is
explained <a
href="http://www.speech.sri.com/pipermail/srilm-user/2007q2/000445.html">in
a previous post</a>. <br>
<br>
Andreas<br>
<br>
<blockquote
cite="mid:1386103837.59641.YahooMailNeo@web173205.mail.ir2.yahoo.com"
type="cite">
<div style="color:#000; background-color:#fff; font-family:times
new roman, new york, times, serif;font-size:12pt"><br>
<div style="display: block;" class="yahoo_quoted">
<div style="font-family: times new roman, new york, times,
serif; font-size: 12pt;">
<div style="font-family: HelveticaNeue, Helvetica Neue,
Helvetica, Arial, Lucida Grande, sans-serif; font-size:
12pt;">
<div dir="ltr"> <font face="Arial" size="2"> Le Mardi 3
décembre 2013 18h18, Andreas Stolcke
<a class="moz-txt-link-rfc2396E" href="mailto:stolcke@icsi.berkeley.edu"><stolcke@icsi.berkeley.edu></a> a écrit :<br>
</font> </div>
<div class="y_msg_container">
<div id="yiv2709919316">
<div>
<div class="yiv2709919316moz-cite-prefix">On
12/3/2013 1:35 AM, Laatar Rim wrote:<br
clear="none">
</div>
<blockquote type="cite">
<div
style="color:#000;background-color:#fff;font-family:times
new roman, new york, times,
serif;font-size:12pt;">
<div><span>hello, </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><br
clear="none">
</span></div>
<div style="background-color:transparent;"><span>on
the internet I found this: <br clear="none">
</span></div>
<div style="font-family:'Times New
Roman';font-size:medium;"> to build and use a
simple class language model:</div>
<div style="font-family:'Times New
Roman';font-size:medium;">Induce classes:<br
clear="none">
</div>
<div style="background-color:transparent;"><span></span></div>
<pre>ngram-class -vocab vocab_file \
-text input_file \
-numclasses num \
-class-counts output.class-counts \
-classes output.classes </pre>
<pre>in this exemple we need only number of class, how can i use corpus of class ??? </pre>
</div>
</blockquote>
The steps for building a class-based LM are:<br
clear="none">
<br clear="none">
1. prepare class definition file in the format
described in the <br clear="none">
classes-format(5) manual page. this can be done
by hand or from other<br clear="none">
knowledge sources, or automatically using word
clustering algorithms<br clear="none">
(see ngram-class(1)).<br clear="none">
<br clear="none">
2. condition the training data or counts to replace
words with class labels,<br clear="none">
using the "replace-words-with-classes" filter
(see training-scripts(1) <br clear="none">
man page).<br clear="none">
<br clear="none">
3. run ngram-count on the result of step 2.
<div class="yiv2709919316yqt9039324517"
id="yiv2709919316yqtfd85124"><br clear="none">
<br clear="none">
Andreas<br clear="none">
<br clear="none">
<br clear="none">
</div>
</div>
</div>
<br>
<br>
</div>
</div>
</div>
</div>
</div>
</blockquote>
<br>
</body>
</html>