Hello, I am attempting to use the megam algorithm with the Maxent Classifier. When I try to use the command self.classifier = nltk.MaxentClassifier.train( train_set, algorithm='megam', trace = 0) I get the following error:
>>>
Traceback (most recent call last):
File "/Users/George Orton/text_proc_7.py", line 124, in <module>
chunker = ConsecutiveNPChunker(train_sents)
File "/Users/George Orton/text_proc_7.py", line 112, in __init__
self.tagger = ConsecutiveNPChunkTagger(tagged_sents)
File "/Users/George Orton/text_proc_7.py", line 97, in __init__
train_set, algorithm='megam', trace=0)
File "/Library/Frameworks/Python.framework/Versions/7.3/lib/python2.7/site-packages/nltk/classify/maxent.py", line 315, in train
gaussian_prior_sigma, **cutoffs)
File "/Library/Frameworks/Python.framework/Versions/7.3/lib/python2.7/site-packages/nltk/classify/maxent.py", line 1518, in train_maxent_classifier_with_megam
stdout = call_megam(options)
File "/Library/Frameworks/Python.framework/Versions/7.3/lib/python2.7/site-packages/nltk/classify/megam.py", line 163, in call_megam
config_megam()
File "/Library/Frameworks/Python.framework/Versions/7.3/lib/python2.7/site-packages/nltk/classify/megam.py", line 59, in config_megam
File "/Library/Frameworks/Python.framework/Versions/7.3/lib/python2.7/site-packages/nltk/internals.py", line 528, in find_binary
url, verbose)
File "/Library/Frameworks/Python.framework/Versions/7.3/lib/python2.7/site-packages/nltk/internals.py", line 512, in find_file
raise LookupError('\n\n%s\n%s\n%s' % (div, msg, div))
LookupError:
===========================================================================
NLTK was unable to find the megam file!
Use software specific configuration paramaters or set the MEGAM environment variable.
For more information, on megam, see:
===========================================================================
>>>
george-ortons-macbook-pro:~ George Orton$ port contents ocaml
Warning: port definitions are more than two weeks old, consider using selfupdate
Port ocaml is not installed.
What I'm hoping is that someone can help me with this megam installation. Am I correct in assuming that ocaml is a programming language that I must first install in order to use megam? Any help with this megam installation process would be appreciated. Thanks, George