Brief
( In general, when you add environment variables: In addition to these we * _HOME Custom (based on their own to put things up which folder), others like me is not the problem )
Article Directory
JAVA configuration
According to the following article first complete Java configuration
Mallet Download
- http://mallet.cs.umass.edu/download.php
- The following two can be selected, after extracting, into a position (corresponding to remember the address)
Download ANT
- http://ant.apache.org/bindownload.cgi
- Both versions can, but remember and java version of the relationship
ANT Configuration
-
Add this ANT_HOME variables (mainly in order to facilitate the changes, remember to develop such a good habit)
here the way configuration is successful -
New (or add) classpath, here is actually called the variable you created earlier.
-
The key step: add the following in the Path
C:\Users\lijy2>ant
Buildfile: build.xml does not exist!
Build failed
Mallet Configuration
- ANT is similar to the above, the variable is created out MALLET_HOME
- The% MALLET_HOME% \ bin added to the Path
- However, where the classpath, add the following. ( Note that the first semicolon )
;%MALLET_HOME%/class;%MALLET_HOME%/lib;%MALLET_HOME%/lib/mallet-deps.jar
Then, enter the directory Mallet folder, open cmd, powershell or
input ANT , carriage return, you can see the
PS D:\Software\mallet-2.0.8> ant
Buildfile: D:\Software\mallet-2.0.8\build.xml
init:
[copy] Copying 1 file to D:\Software\mallet-2.0.8\class
compile:
[javac] D:\Software\mallet-2.0.8\build.xml:61: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds
BUILD SUCCESSFUL
Total time: 0 seconds
PS D:\Software\mallet-2.0.8>
but! ! ! !
If you see the following
PS D:\Software\mallet-2.0.8> ant
Buildfile: D:\Software\mallet-2.0.8\build.xml
BUILD FAILED
D:\Software\mallet-2.0.8\build.xml:103: 与元素类型 "check.pytest" 相关联的属性名 "todircheck.pytest" 必须后跟 ' = ' 字符。
Total time: 0 seconds
PS D:\Software\mallet-2.0.8>
Do not worry, this is because build.xml wrong.
From the following github link, directly replace the original copy of the content like a ~
Successful configuration
This is the Document Mallet
Simple test method ( welcome chiefs point out a better way )
The cc file Mallet-2.0.8 / src folders put under your src (java do should know what I mean?)
- as follows:
Then, you can begin to build according to document your code you ~ (I can look after writing java-mallet program, learning)