<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	
	>
<channel>
	<title>Comments on: NLTK Megam (Maximum Entropy) Library on 64-bit Linux</title>
	<atom:link href="http://thinknook.com/nltk-megam-maximum-entropy-library-on-64-bit-linux-2012-11-27/feed/" rel="self" type="application/rss+xml" />
	<link>http://thinknook.com/nltk-megam-maximum-entropy-library-on-64-bit-linux-2012-11-27/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=nltk-megam-maximum-entropy-library-on-64-bit-linux</link>
	<description>Because the world needs another Business Intelligence blog!</description>
	<lastBuildDate>Fri, 14 Sep 2018 19:30:18 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=4.1.41</generator>
	<item>
		<title>By: Links Naji</title>
		<link>http://thinknook.com/nltk-megam-maximum-entropy-library-on-64-bit-linux-2012-11-27/#comment-3489</link>
		<dc:creator><![CDATA[Links Naji]]></dc:creator>
		<pubDate>Mon, 09 Oct 2017 01:53:25 +0000</pubDate>
		<guid isPermaLink="false">http://thinknook.com/?p=837#comment-3489</guid>
		<description><![CDATA[Honestly, I am not sure. I haven&#039;t used NLTK for a while now, and so not even sure what the latest is with this library.
I would however recommend using TensorFlow, which allow u to vectorize words and train an NLP model. (example: https://www.tensorflow.org/tutorials/word2vec). IMO, it is a much more powerful library.]]></description>
		<content:encoded><![CDATA[<p>Honestly, I am not sure. I haven&#8217;t used NLTK for a while now, and so not even sure what the latest is with this library.<br />
I would however recommend using TensorFlow, which allow u to vectorize words and train an NLP model. (example: <a href="https://www.tensorflow.org/tutorials/word2vec" rel="nofollow">https://www.tensorflow.org/tutorials/word2vec</a>). IMO, it is a much more powerful library.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: zhuguowei</title>
		<link>http://thinknook.com/nltk-megam-maximum-entropy-library-on-64-bit-linux-2012-11-27/#comment-3488</link>
		<dc:creator><![CDATA[zhuguowei]]></dc:creator>
		<pubDate>Fri, 06 Oct 2017 10:52:26 +0000</pubDate>
		<guid isPermaLink="false">http://thinknook.com/?p=837#comment-3488</guid>
		<description><![CDATA[I find there are  continuously output of `optimizing with lambda = 0` , is it normal?]]></description>
		<content:encoded><![CDATA[<p>I find there are  continuously output of `optimizing with lambda = 0` , is it normal?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sushma NBharadwaj</title>
		<link>http://thinknook.com/nltk-megam-maximum-entropy-library-on-64-bit-linux-2012-11-27/#comment-3442</link>
		<dc:creator><![CDATA[Sushma NBharadwaj]]></dc:creator>
		<pubDate>Fri, 18 Nov 2016 01:54:44 +0000</pubDate>
		<guid isPermaLink="false">http://thinknook.com/?p=837#comment-3442</guid>
		<description><![CDATA[Hi,

Thank you for such a wonderful tutorial. Could you please let me know how I can install it on a Windows system?

Thank you]]></description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>Thank you for such a wonderful tutorial. Could you please let me know how I can install it on a Windows system?</p>
<p>Thank you</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Links Naji</title>
		<link>http://thinknook.com/nltk-megam-maximum-entropy-library-on-64-bit-linux-2012-11-27/#comment-3346</link>
		<dc:creator><![CDATA[Links Naji]]></dc:creator>
		<pubDate>Sat, 16 May 2015 13:42:17 +0000</pubDate>
		<guid isPermaLink="false">http://thinknook.com/?p=837#comment-3346</guid>
		<description><![CDATA[Thanks Sebastian, glad you found it useful.]]></description>
		<content:encoded><![CDATA[<p>Thanks Sebastian, glad you found it useful.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sebastian</title>
		<link>http://thinknook.com/nltk-megam-maximum-entropy-library-on-64-bit-linux-2012-11-27/#comment-3345</link>
		<dc:creator><![CDATA[Sebastian]]></dc:creator>
		<pubDate>Mon, 11 May 2015 03:41:01 +0000</pubDate>
		<guid isPermaLink="false">http://thinknook.com/?p=837#comment-3345</guid>
		<description><![CDATA[Great Post. Thanks for sharing this post of Megam.]]></description>
		<content:encoded><![CDATA[<p>Great Post. Thanks for sharing this post of Megam.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Links Naji</title>
		<link>http://thinknook.com/nltk-megam-maximum-entropy-library-on-64-bit-linux-2012-11-27/#comment-3179</link>
		<dc:creator><![CDATA[Links Naji]]></dc:creator>
		<pubDate>Sat, 04 Jan 2014 21:47:10 +0000</pubDate>
		<guid isPermaLink="false">http://thinknook.com/?p=837#comment-3179</guid>
		<description><![CDATA[Well, the steps of what actually happens, when the MEGAM algorithm is selected in NLTK, is the following:

&gt; NLTK will create temporary files that contains the training set (in a format acceptable for MEGAM)
&gt; NLTK will spawn a subproces that will call, via command line, the MEGAM (.opt) executable, providing the location of the temporary file as parameters (along with some other parameters).
&gt; The MEGAM executable will run over the temporary file, and when done, creates an output dump of the results and exits.
&gt; NLTK will resume by consuming the MEGAM output dump and creating the trained classification object.

In the past I have actually identified the exact command line statements that NLTK tries to run (on the MEGAM executable), and ran it directly myself (without NLTK, on a temporary file I created).

So it seems to me that, for some reason, the user associated with the execution context of the command line statement is unable to spawn a subprocess, which will be used to execute the MEGAM executable.

Maybe try changing the rights on the MEGAM executable (.opt file), or the location where NLTK creates temporary files, maybe one of them is a read-only?... something along that execution flow described above doesn&#039;t seem to be configured correctly, although I am struggling to tell exactly which bit.

You could always try to execute MEGAM directly, without NLTK, and see what happens!

Hope this helps!]]></description>
		<content:encoded><![CDATA[<p>Well, the steps of what actually happens, when the MEGAM algorithm is selected in NLTK, is the following:</p>
<p>> NLTK will create temporary files that contains the training set (in a format acceptable for MEGAM)<br />
> NLTK will spawn a subproces that will call, via command line, the MEGAM (.opt) executable, providing the location of the temporary file as parameters (along with some other parameters).<br />
> The MEGAM executable will run over the temporary file, and when done, creates an output dump of the results and exits.<br />
> NLTK will resume by consuming the MEGAM output dump and creating the trained classification object.</p>
<p>In the past I have actually identified the exact command line statements that NLTK tries to run (on the MEGAM executable), and ran it directly myself (without NLTK, on a temporary file I created).</p>
<p>So it seems to me that, for some reason, the user associated with the execution context of the command line statement is unable to spawn a subprocess, which will be used to execute the MEGAM executable.</p>
<p>Maybe try changing the rights on the MEGAM executable (.opt file), or the location where NLTK creates temporary files, maybe one of them is a read-only?&#8230; something along that execution flow described above doesn&#8217;t seem to be configured correctly, although I am struggling to tell exactly which bit.</p>
<p>You could always try to execute MEGAM directly, without NLTK, and see what happens!</p>
<p>Hope this helps!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Marco Ippolito</title>
		<link>http://thinknook.com/nltk-megam-maximum-entropy-library-on-64-bit-linux-2012-11-27/#comment-3178</link>
		<dc:creator><![CDATA[Marco Ippolito]]></dc:creator>
		<pubDate>Sat, 04 Jan 2014 15:31:05 +0000</pubDate>
		<guid isPermaLink="false">http://thinknook.com/?p=837#comment-3178</guid>
		<description><![CDATA[Yes both sudo classifying.py and sudo-s classifying.py with the result above]]></description>
		<content:encoded><![CDATA[<p>Yes both sudo classifying.py and sudo-s classifying.py with the result above</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Links Naji</title>
		<link>http://thinknook.com/nltk-megam-maximum-entropy-library-on-64-bit-linux-2012-11-27/#comment-3177</link>
		<dc:creator><![CDATA[Links Naji]]></dc:creator>
		<pubDate>Sat, 04 Jan 2014 15:29:24 +0000</pubDate>
		<guid isPermaLink="false">http://thinknook.com/?p=837#comment-3177</guid>
		<description><![CDATA[Hmm... a long shot, but did you try running the process with admin rights? (sudo command perhaps?).]]></description>
		<content:encoded><![CDATA[<p>Hmm&#8230; a long shot, but did you try running the process with admin rights? (sudo command perhaps?).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Marco Ippolito</title>
		<link>http://thinknook.com/nltk-megam-maximum-entropy-library-on-64-bit-linux-2012-11-27/#comment-3176</link>
		<dc:creator><![CDATA[Marco Ippolito]]></dc:creator>
		<pubDate>Sat, 04 Jan 2014 13:50:38 +0000</pubDate>
		<guid isPermaLink="false">http://thinknook.com/?p=837#comment-3176</guid>
		<description><![CDATA[Hi,
thanks for your suggestions.
I&#039;ve solved it along with the memory shortage (adding swap memory space).
Now I have this hurdle to overcome:

Traceback (most recent call last):
  File &quot;classifying.py&quot;, line 492, in 
    me_classifier = MaxentClassifier.train(train_feats, algorithm=&#039;megam&#039;)
  File &quot;/usr/local/lib/python2.7/dist-packages/nltk/classify/maxent.py&quot;, line 319, in train
    gaussian_prior_sigma, **cutoffs)
  File &quot;/usr/local/lib/python2.7/dist-packages/nltk/classify/maxent.py&quot;, line 1522, in train_maxent_classifier_with_megam
    stdout = call_megam(options)
  File &quot;/usr/local/lib/python2.7/dist-packages/nltk/classify/megam.py&quot;, line 167, in call_megam
    p = subprocess.Popen(cmd, stdout=subprocess.PIPE)
  File &quot;/usr/lib/python2.7/subprocess.py&quot;, line 679, in __init__
    errread, errwrite)
  File &quot;/usr/lib/python2.7/subprocess.py&quot;, line 1249, in _execute_child
    raise child_exception
OSError: [Errno 13] Permission denied

Any hints to solve it?

Thanks in advance.
Marco]]></description>
		<content:encoded><![CDATA[<p>Hi,<br />
thanks for your suggestions.<br />
I&#8217;ve solved it along with the memory shortage (adding swap memory space).<br />
Now I have this hurdle to overcome:</p>
<p>Traceback (most recent call last):<br />
  File &#8220;classifying.py&#8221;, line 492, in<br />
    me_classifier = MaxentClassifier.train(train_feats, algorithm=&#8217;megam&#8217;)<br />
  File &#8220;/usr/local/lib/python2.7/dist-packages/nltk/classify/maxent.py&#8221;, line 319, in train<br />
    gaussian_prior_sigma, **cutoffs)<br />
  File &#8220;/usr/local/lib/python2.7/dist-packages/nltk/classify/maxent.py&#8221;, line 1522, in train_maxent_classifier_with_megam<br />
    stdout = call_megam(options)<br />
  File &#8220;/usr/local/lib/python2.7/dist-packages/nltk/classify/megam.py&#8221;, line 167, in call_megam<br />
    p = subprocess.Popen(cmd, stdout=subprocess.PIPE)<br />
  File &#8220;/usr/lib/python2.7/subprocess.py&#8221;, line 679, in __init__<br />
    errread, errwrite)<br />
  File &#8220;/usr/lib/python2.7/subprocess.py&#8221;, line 1249, in _execute_child<br />
    raise child_exception<br />
OSError: [Errno 13] Permission denied</p>
<p>Any hints to solve it?</p>
<p>Thanks in advance.<br />
Marco</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Links Naji</title>
		<link>http://thinknook.com/nltk-megam-maximum-entropy-library-on-64-bit-linux-2012-11-27/#comment-3174</link>
		<dc:creator><![CDATA[Links Naji]]></dc:creator>
		<pubDate>Sat, 04 Jan 2014 12:21:34 +0000</pubDate>
		<guid isPermaLink="false">http://thinknook.com/?p=837#comment-3174</guid>
		<description><![CDATA[Hi Marco,

Apologies for the delayed response, I was away for Christmas and New Year.

The error you are getting seems to be in relation to finding the megam file, two reasons that might be happening (that I could think of for now anyway):

&gt; The file path is incorrect: how about you try using the full path to the megam.opt file, rather than a relative path, when calling the nltk.config_megam() function, just to see if that fixes things. Could be as simple as that.

&gt; There is a mismatch between the architecture the file is compiled to, and the Python/Ubuntu versions running: The file is compiled to 64-Bit, are you sure the rest of the dependant are too?

Cheers!]]></description>
		<content:encoded><![CDATA[<p>Hi Marco,</p>
<p>Apologies for the delayed response, I was away for Christmas and New Year.</p>
<p>The error you are getting seems to be in relation to finding the megam file, two reasons that might be happening (that I could think of for now anyway):</p>
<p>> The file path is incorrect: how about you try using the full path to the megam.opt file, rather than a relative path, when calling the nltk.config_megam() function, just to see if that fixes things. Could be as simple as that.</p>
<p>> There is a mismatch between the architecture the file is compiled to, and the Python/Ubuntu versions running: The file is compiled to 64-Bit, are you sure the rest of the dependant are too?</p>
<p>Cheers!</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!--
Performance optimized by W3 Total Cache. Learn more: https://www.w3-edge.com/products/


Served from: thinknook.com @ 2026-04-28 03:57:16 by W3 Total Cache
-->