(NLP)Install Megam for NLTK on Windows

  1. Install OCaml
    Download Graphical Installer depends on your version of Operating System.

The advantage of Graphical Installer is that it includes OCaml, Opam and Cygwin with all libraries.

  1. Download & compile MEGAM’s source
    Download source code and put the folder into the path of your Cygwin.

Then you need to modify two things in your makefile

The first one, you should use the “ocamlc -where” to find the right ocmal library: /usr/local/lib/ocaml , and then edit the Makefile

And the Second One

Then you can run make to compile a stable version, and make opt to get a faster version.

  1. congifigure in Python
    move megam.exe and megam.opt to a easy path, and create a python file to test.

  1. Still something wrong for me

For me, I met a strange error while excuting ‘make opt’ as following:

I am trying to solve it, beacuse there are few information online. I will update this article after finding correct method.

Leave a Reply

Your email address will not be published. Required fields are marked *