1

请,我想知道如何将这个项目(mallet-2.0-7)导入到 Eclipse:

 http://mallet.cs.umass.edu/download.php

我尝试了几次但没有结果。包树中总是有错误,有时,当我尝试运行时:

 TrainHMM.java in package cc.mallet.examples; 

我有消息:选择不包含主要类型。

预先感谢您的帮助。

4

2 回答 2

1

导入槌项目:New->Project->Java Project From Existing Ant Buildfile

于 2013-11-08T18:11:03.743 回答
0

它没有任何 eclipse 元文件,因此我们可以直接在 eclipse 中导入它 在该文件夹中使用以下条目创建两个文件。

  1. .project

    <?xml version="1.0" encoding="UTF-8"?> <projectDescription> <name>mallet-2.0.7</name> <comment></comment> <projects> </projects> <buildSpec> <buildCommand> <name>org.eclipse.jdt.core.javabuilder</name> <arguments> </arguments> </buildCommand> </buildSpec> <natures> <nature>org.eclipse.jdt.core.javanature</nature> </natures> </projectDescription>

  2. .classpath

    <?xml version="1.0" encoding="UTF-8"?> <classpath> <classpathentry kind="src" path="src"/> <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/> <classpathentry kind="lib" path="lib/bsh.jar"/> <classpathentry kind="lib" path="lib/grmm-deps.jar"/> <classpathentry kind="lib" path="lib/jdom-1.0.jar"/> <classpathentry kind="lib" path="lib/jgrapht-0.6.0.jar"/> <classpathentry kind="lib" path="lib/junit-4.5.jar"/> <classpathentry kind="lib" path="lib/jwnl-1.3.jar"/> <classpathentry kind="lib" path="lib/mallet-deps.jar"/> <classpathentry kind="lib" path="lib/mtj-0.9.9.jar"/> <classpathentry kind="lib" path="lib/openjgraph.jar"/> <classpathentry kind="lib" path="lib/trove-2.0.2.jar"/> <classpathentry kind="output" path="bin"/> </classpath>

  3. 在日食中使用File > import > Existing project into workspace.

  4. 完毕
于 2014-07-25T09:15:39.757 回答