Reputation: 254
I'm using ubuntu x64, after two days and searching all the net, still i've not been able to install Megam, i've read all information in this page http://www.cs.utah.edu/~hal/megam/ and installed x64 version of o'calm from http://packages.ubuntu.com/precise/ocaml but when i want to use "megam" as a classifier in python, it says:
"NLTK was unable to find the megam file! Use software specific configuration paramaters or set the MEGAM environment variable.
could anybody tell me how can i install and make use of it in python?
i've downloaded "ocaml-3.12.1.tar.gz
" but the "make" command doesn't work (as it's said in its readme).
i've downloaded "megam_i686.opt
" too, but it's not executable and i cannot run it
any help?
thanks in advance
Upvotes: 6
Views: 3829
Reputation: 2185
I manged to get megam to run on my docker instance running debian 9.7 following the steps below. Based on steps for MacOS install steps suggested by Jack Hong here.
Upvotes: 0
Reputation: 1611
Answer given by Hugh Perkins, helped me resolve the issue (due to low reputation can't add a comment to that answer). After downloading the zip file (from http://thinknook.com/wp-content/uploads/2012/11/MEGAM.zip), I needed to tell python where it was, and that was done by adding it in os.environ as:
os.environ["MEGAM"] = '<<Complete path followed by file name>>/megam-64'
Upvotes: 2
Reputation: 8622
I downloaded from http://thinknook.com/wp-content/uploads/2012/11/MEGAM.zip , which was linked from http://thinknook.com/nltk-megam-maximum-entropy-library-on-64-bit-linux-2012-11-27/ This worked ok for me, on ubuntu 14.04
Upvotes: 0
Reputation: 7801
Use config_megam() to tell NLTK where the Megam executable is located. See: http://nltk.googlecode.com/svn/trunk/doc/api/nltk.classify.megam-module.html for details and documentation.
You also need to build MEGAM with the right 32/64 bit setting for your system. "megam_i686.opt" is for x86 iirc, so you should compile it for 64 bit. It is a while since I did this, but a simple build on an x64 system was all I needed: "Make doesn't work" is not very useful: I'm sure it gave you a few error messages...? Probably paths not set or are read only?
Edit: Looks like the above link is currently broken. The main Megam site can be found at:
http://www.umiacs.umd.edu/~hal/megam/
although it hasn't been updated for a while.
Upvotes: 2
Reputation: 5168
For the future users:
megam is now available on MAC through brew:
$brew tap homebrew/science
$brew install megam
Upvotes: 9