问题描述
两天后我使用ubuntu x64并搜索了所有网络,但仍然无法安装Megam,我已经阅读了此页面中的所有信息 http://www.cs.utah.edu/〜hal/megam/并从 http://packages.ubuntu.com/precise/ocaml但是当我想在Python中使用"megam"作为分类器时,它会说:
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/ocamlbut when i want to use "megam" as a classifier in python, it says:
有人可以告诉我如何在python中安装和使用它吗?
could anybody tell me how can i install and make use of it in python?
我已经下载了"ocaml-3.12.1.tar.gz
",但是"make"命令不起作用(如自述文件所述).我也下载了"megam_i686.opt
",但它不是可执行文件,我无法运行
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
有什么帮助吗?
预先感谢
推荐答案
使用config_megam()告诉NLTK Megam可执行文件所在的位置.请参阅: http://nltk.googlecode.com /svn/trunk/doc/api/nltk.classify.megam-module.html 了解详细信息和文档.
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.
您还需要使用正确的32/64位设置为系统构建MEGAM. "megam_i686.opt"用于x86 iirc,因此应将其编译为64位.自从我这样做已经有一段时间了,但是我只需要在x64系统上进行简单构建:制作不起作用"不是很有用:我确定它会给您一些错误消息...?可能是未设置路径还是只读的路径?
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?
看起来上面的链接当前已断开.可以在以下位置找到Megam的主要网站:
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.
这篇关于卡在Python中使用Megam(nltk.classify.MaxentClassifier)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!