|First, I had issues with NLTK not finding MEGAM...|
|... then I had permission issues. PermissionError: [Errno 13] Permission denied|
The permissions thing got me thinking, though. So I opened up my terminal (Ctrl+Alt+t on my Ubuntu Thinkpad x120e) and made some changes. First, I signed on as root and changed mode of access permissions for all of the files NLTK mentioned:
:~# chmod 777 /usr/lib/python3.4/subprocess.py
:~# chmod 777 /usr/local/lib/python3.4/dist-packages/nltk/classify/megam.py
:~# chmod 777 /usr/local/lib/python3.4/dist-packages/nltk/classify/maxent.py
This didn't make any difference in NLTK. Thinking deeper, I thought about the config pointer command, and decided to locate everything in the same place. I navigated to where I put the megam downloads and moved the megam files to my local binary folder:
:~# cd home/richard/Downloads/megam_0.92
:/home/richard/Downloads/megam_0.92# cp megam /usr/local/bin
:/home/richard/Downloads/megam_0.92# cp megam-64 /usr/local/bin
:/home/richard/Downloads/megam_0.92# cp megam-64.opt /usr/local/bin
I first tried it with just the 32-bit file - megam - but NLTK didn't like it. My system is an AMD 64-bit SOC. Then I moved the 64-bit megam files into the binary folder. After that, all was well with NLTK using megam.
|It took both cores on my AMD E350 SOC about 10 minutes to chunk the training set, but my megam location issues were a thing of the past. Thank goodness.|
I'm using Python3.4 in the IDLE shell. I got Python3.4 from the Ubuntu Software Center.
I loaded OCAML using sudo apt-get install ocaml .
I loaded nltk using sudo pip3 install nltk .
I loaded megam through the download page at http://www.umiacs.umd.edu/~hal/megam/index.html . This megam didn't work.
I got the 64-bit compilations of megam from http://thinknook.com/nltk-megam-maximum-entropy-library-on-64-bit-linux-2012-11-27/ by loading from the following link:
I'm using a Lenovo ThinkPad x120e with Ubuntu 14.04 LTS Trusty Tahr operating an AMD E-350 1.6 GHz System On Chip and 4 GB of 1333 MHz DDR3 PC3-10600 RAM and 120 GB of SSD storage. (A great combination, by the way. All drivers work, I have absolutely no issues with this computer. The x120e was, at the beginning, a tolerable-because-of-the-price slug with Windows 7 Pro and the 5200rpm spinner drive, then it became slower and slower as Windows updated it to death. It operated Windows 7 reasonably well when I replaced the spinner with the solid state drive. It became a powerhouse when I wiped the drive and installed 64-bit Ubuntu using an ext3/ext4 file system. The computer has been completely reliable ever since.)
ubuntu linux 64-bit megam nltk python python3.4
PermissionsError: [Errno 13] Permission denied
NLTK was unable to find the megam file!
megam not working on nltk
nltk book chapter 7
megam chunker algorithm not working
linux "[megam] Error 2"