Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Some questions on Ant

232 views
Skip to first unread message

subhaba...@gmail.com

unread,
May 12, 2013, 3:40:31 PM5/12/13
to
Dear Room,

I was trying to learn Apache Ant.

I got the following information.

i)Ant is a build tool, it helps to create .exe file.
ii) Compiling is a subtask of building.

Now,
I am confused with few questions.

I was exploring the "Ant build" in Eclipse.

I could create one "build.xml" and could run successfully.

The questions are:
i) May I have to write the the "build.xml" or a build file everytime I want to build a project? Can't it be done automatic, means the generation of the .xml file?

ii) After the "build.xml" gives report like,

Hello:
[echo] Hello
BUILD SUCCESSFUL
Total time: 477 milliseconds

Where may I find .exe file? And how should I use it?

If any one of the learned members can kindly suggest?

Regards,
Subhabrata.



Arne Vajhøj

unread,
May 12, 2013, 3:57:17 PM5/12/13
to
On 5/12/2013 3:40 PM, subhaba...@gmail.com wrote:
> I was trying to learn Apache Ant.
>
> I got the following information.
>
> i)Ant is a build tool, it helps to create .exe file.

You usually don't have exe files in Java, so it helps create
jar/war/ear/rar files. And many other things.

> ii) Compiling is a subtask of building.
>
> Now,
> I am confused with few questions.
>
> I was exploring the "Ant build" in Eclipse.
>
> I could create one "build.xml" and could run successfully.
>
> The questions are:
> i) May I have to write the the "build.xml" or a build file everytime I want to build a project? Can't it be done automatic, means the generation of the .xml file?

With the right content then you can reuse the same build.xml for
multiple projects as long as they are similar and simple. For bigger
project you typical need some custom work.

> ii) After the "build.xml" gives report like,
>
> Hello:
> [echo] Hello
> BUILD SUCCESSFUL
> Total time: 477 milliseconds
>
> Where may I find .exe file? And how should I use it?

Java is not build to exe files.

You can use the jar task to build a jar file.

And it will be located where you tell ant to put it.

Arne


Jeff Higgins

unread,
May 13, 2013, 9:28:30 AM5/13/13
to
The Java Tutorials > Deployment > Lesson: Packaging Programs in JAR Files
http://docs.oracle.com/javase/tutorial/deployment/jar/index.html

Workbench User Guide > Getting started > Ant & external tools tutorial
http://help.eclipse.org/juno/topic/org.eclipse.platform.doc.user/gettingStarted/qs-80_ant.htm?cp=0_1_2

LingPipe Home Page > Docs > Tutorials > Eclipse
http://alias-i.com/lingpipe/demos/tutorial/eclipse/read-me.html

Welcome to the Ant Wiki
http://wiki.apache.org/ant/FrontPage

Apache Ant Manual
http://ant.apache.org/manual/index.html

Apache Ant Resources
http://ant.apache.org/resources.html

subhaba...@gmail.com

unread,
May 13, 2013, 10:25:09 AM5/13/13
to
Thanks. I am checking the things. I found Lingpipe already has "build.xml" then why the room is asking me to get along with it, the other question pondering me it is not running like the one I experimented it is giving error as, BUILD FAILED
C:\Users\subhabrata\Documents\lingpipe-4.1.0.tar\lingpipe-4.1.0\build.xml:50: Unable to find a javac compiler;
com.sun.tools.javac.Main is not on the classpath.
Perhaps JAVA_HOME does not point to the JDK.
It is currently set to "C:\Program Files\Java\jre7"

Total time: 896 milliseconds

Regards,
Subhabrata.

Jeff Higgins

unread,
May 13, 2013, 1:47:13 PM5/13/13
to
On 05/13/2013 10:25 AM, subhaba...@gmail.com wrote:
> On Monday, May 13, 2013 6:58:30 PM UTC+5:30, Jeff Higgins wrote:
>> On 05/12/2013 03:40 PM, subhaba...@gmail.com wrote:
>>
>>> Dear Room,
>>> I was trying to learn Apache Ant.

>
> Thanks. I am checking the things. I found Lingpipe already has "build.xml" then why the room is asking me to get along with it,

I think the other respondents have suggested you need more
experience with the Java programming environment. I agree.


the other question pondering me it is not running like the one I
experimented it is giving error as, BUILD FAILED
> C:\Users\subhabrata\Documents\lingpipe-4.1.0.tar\lingpipe-4.1.0\build.xml:50: Unable to find a javac compiler;
> com.sun.tools.javac.Main is not on the classpath.
> Perhaps JAVA_HOME does not point to the JDK.
> It is currently set to "C:\Program Files\Java\jre7"
>
> Total time: 896 milliseconds
>

Setting the class path
<http://docs.oracle.com/javase/7/docs/technotes/tools/windows/classpath.html>

subhaba...@gmail.com

unread,
May 13, 2013, 6:01:06 PM5/13/13
to
Dear Sir,
That is okay. I could place ant properly my machine can recognize ant in command prompt. Other than this as Sujit suggested I could run Lingpipe demo from command prompt. As you are kindly teaching me let me learn it too. I tried it but got the following error, I am trying still let me see where I land tomorrow evening.
entation.htm
11/19/2012 12:05 AM <DIR> nltk_classify_naivebayes - NLTK 2_0 docum
entation_files
07/30/2012 11:49 PM 8,785,560 NortonOnlineBackup.exe
09/03/2012 10:41 PM 154,850 Note on Forward and Backward Probabilitie
s.pdf
08/11/2012 02:49 PM 270,538 NumPy - Wikipedia, the free encyclopedia.
mht
08/12/2012 04:24 PM 386,539 Numpy and Scipy.pdf
08/12/2012 04:24 PM 334,394 Numpy and Scipy1.pdf
08/11/2012 02:50 PM 135,679 Numpy Introduction - MantidProject.mht
07/24/2012 11:16 PM 9,047,263 Numpy Reference.pdf
08/11/2012 01:53 PM 545,419 Numpy Tutorial New.htm
08/11/2012 01:53 PM <DIR> Numpy Tutorial New_files
07/29/2012 10:34 PM 84,282 Numpy Tutorial.htm
08/11/2012 02:47 PM 624,155 Numpy Tutorial2.pdf
07/29/2012 10:34 PM <DIR> Numpy Tutorial_files
08/11/2012 03:15 PM 2,148,630 numpybook.pdf
08/04/2012 03:56 PM 201,940 Object-Oriented Python - Wikiversity.mht
02/23/2013 12:58 AM 20,276 Official Website of Kumbh Mela 2013 Allah
abad Uttar Pradesh India.htm
09/04/2012 07:47 PM 69,333 Online shop order o62747958 confirmation
- Vodafone.htm
09/04/2012 07:47 PM <DIR> Online shop order o62747958 confirmation
- Vodafone_files
09/16/2012 11:48 AM 89,944 Parse Tree of Indian NLP NLTK.docx
01/11/2013 01:10 AM 7,914,378 Partioning Tutorial Networkx.pdf
02/08/2013 04:27 PM <DIR> Passport
03/04/2013 12:07 AM 847,512 Passport Application.pdf
03/04/2013 12:07 AM 7,615 Passport Application_data.xml
11/11/2012 01:29 PM 220,301 PCI_Code.zip
09/21/2012 08:07 PM 75,077 Personal Hygiene - How To Information eH
ow_com.htm
09/21/2012 08:07 PM <DIR> Personal Hygiene - How To Information eH
ow_com_files
09/03/2012 08:39 PM 9,821 Philip Jackson HMM tutorial.htm
09/03/2012 08:39 PM <DIR> Philip Jackson HMM tutorial_files
07/07/2012 11:55 PM 5,214 Phone Number 040-27111123, Telephone Numb
er 040-27111123.htm
07/07/2012 11:55 PM <DIR> Phone Number 040-27111123, Telephone Numb
er 040-27111123_files
12/11/2012 01:51 AM 2,743 Plotting Error2.txt
11/12/2012 07:49 PM 2,068,049 PsychoPyManual.pdf
12/11/2012 01:51 AM 2,146 Pylab Error1.txt
08/11/2012 03:15 PM 316,631 python - How to calculate the statistics
t-test with numpy - Stack Overflow.mht
08/04/2012 03:54 PM 37,484 Python - Object Oriented.htm
08/04/2012 03:54 PM <DIR> Python - Object Oriented_files
08/11/2012 03:16 PM 327,788 python - Statistics with numpy - Stack Ov
erflow.mht
10/08/2012 11:32 PM 17,758 Python Course Text Classification in Pyth
on.htm
10/08/2012 11:32 PM <DIR> Python Course Text Classification in Pyth
on_files
08/03/2012 11:11 PM 13,382 Python Group Answer.docx
08/11/2012 05:02 PM 638,750 Python in Big Data with an overview of Nu
mPy and SciPy - CS101.mht
07/24/2012 11:22 PM 1,356,084 Python Interactive Tutorial.pdf
07/28/2012 02:29 AM 223,138 Python Machine Learning Software List.mht

04/22/2013 11:16 AM 132 Python Revision1.txt
07/28/2012 09:36 AM 84,939 PythonForArtificialIntelligence - PythonI
nfo Wiki.mht
08/11/2012 03:26 PM 781,907 python_matlab Numpy.pdf
03/06/2013 09:36 AM 40 Query.txt
09/15/2012 10:44 PM 32,405 Questions on NLTK Use.rtf
02/12/2013 01:14 AM <DIR> R
11/15/2012 08:04 PM 3,642 R1
11/13/2012 11:02 AM 0 record.lis
08/27/2012 10:46 PM 422,916 Result of 100 documents with any document
revision.txt
11/11/2012 01:23 PM 12,147 Reverend-0.4.tar.gz
07/28/2012 09:59 AM 163 Review of Machine Learning Toolkit in Pyt
hon.txt
01/08/2013 10:44 PM 214 Revised algorithm1.txt
05/08/2013 12:59 AM 60,928 Rough1.doc
05/08/2013 01:01 AM 93,184 Rough2.doc
05/08/2013 01:41 AM 50,726 Rough3.docx
04/05/2013 01:08 AM 173,092 Salmon Run A HMM based Gene Tagger using
NLTK.htm
12/27/2012 10:47 PM <DIR> samsung
07/24/2012 07:51 PM 28 sbicardpwd.txt
05/08/2013 02:52 AM 363 Sbicardpwd1.txt
08/12/2012 04:26 PM 703,070 Scientific Computing with SciPy_php.mht
07/27/2012 09:10 PM 100,288 Scipy high-level scientific computing -
Euroscipy 2010 tutorials.htm
07/27/2012 09:10 PM <DIR> Scipy high-level scientific computing -
Euroscipy 2010 tutorials_files
08/12/2012 04:31 PM 192,012 SciPy - OpenOpt.mht
07/24/2012 11:14 PM 112,870 SciPy Course Outline.htm
07/24/2012 11:21 PM 6,725,634 SciPy Reference.pdf
08/12/2012 04:18 PM 84,322 SciPy Tutorial -.htm
08/12/2012 04:18 PM <DIR> SciPy Tutorial -_files
08/12/2012 04:18 PM 337,195 SciPy Tutorial.htm
08/12/2012 04:25 PM 144,427 Scipy Tutorial.pdf
08/11/2012 02:49 PM 386,539 Scipy Tutorial1.pdf
08/12/2012 04:18 PM <DIR> SciPy Tutorial_files
08/12/2012 04:43 PM 293,163 scipy « Natural Language Processing Musin
gs.mht
08/12/2012 04:43 PM 13,939 scipy - My programming and machine learni
ng blog.htm
08/12/2012 04:43 PM <DIR> scipy - My programming and machine learni
ng blog_files
08/12/2012 04:23 PM 1,447,210 Scipy.pdf
11/13/2012 02:05 AM 1,046,828 SciTools Manual.pdf
12/14/2012 09:46 PM 204,436 Semantic_network.htm
12/14/2012 09:46 PM <DIR> Semantic_network_files
12/14/2012 09:46 PM 255,821 Semantic_Web.htm
12/14/2012 09:46 PM <DIR> Semantic_Web_files
07/27/2012 09:05 PM 923,268 Simple statistics with SciPy Comfort at
1 AU.mht
05/07/2013 10:58 PM 80,470 Skull Shining Breathing Technique _ Kapal
Bhati Pranayama _ The Art Of Living Global.htm
06/19/2012 09:45 PM 348,093 Speech - Wikipedia, the free encyclopedia
.mht
09/02/2012 01:29 AM 12,924,341 Stanford Machine Learning Book.pdf
04/04/2013 06:41 PM 92 start1.cc
04/04/2013 06:40 PM 66 start1.cpp
04/04/2013 06:42 PM 6,557,987 start1.exe
08/12/2012 04:31 PM 655,947 Statistical analysis made easy in Python
Scipy Randal S_ Olson.mht
08/12/2012 04:33 PM 117,230 Statistical Data Structures with Scipy.pd
f
08/12/2012 04:32 PM 152,888 StatisticalDataStructures -.mht
01/28/2013 11:14 PM 146,788 Statistics (scipy.stats) - SciPy v0.11 Re
ference Guide (DRAFT).htm
01/28/2013 11:14 PM <DIR> Statistics (scipy.stats) - SciPy v0.11 Re
ference Guide (DRAFT)_files
08/11/2012 03:18 PM 29,691 Statistics and linear regression - python
v0_1 documentation.htm
08/11/2012 03:18 PM <DIR> Statistics and linear regression - python
v0_1 documentation_files
08/11/2012 03:17 PM 38,606 Statistics with Numpy.htm
08/11/2012 03:17 PM <DIR> Statistics with Numpy_files
08/12/2012 04:28 PM 275,999 Statistics with Scipy1.pdf
08/12/2012 04:29 PM 176,788 Statistics with Scipy2.pdf
02/21/2013 01:24 AM 397 Status Evaluation.txt
12/21/2012 10:45 PM 398 Stock Data1.txt
12/15/2012 01:14 AM 14,154 Study Qs.docx
08/12/2012 04:43 PM 316,021 Support for SciPy in NLTK's Maximum Entro
py methods « Natural Language Processing Musings.mht
02/16/2013 11:18 AM 13,392 SVM.docx
10/04/2012 07:45 PM 148 SVO Algorithm.txt
12/19/2012 02:02 AM 2,176 SVO EXTRACTION2.py
12/19/2012 02:07 AM 2,218 SVO EXTRACTION3.py
12/18/2012 11:51 PM 834 SVOExtraction1.py
12/19/2012 01:36 AM 1,425 SVOExtraction2.py
06/16/2012 10:36 PM <DIR> Symantec
04/05/2013 01:14 AM 56,715 Taggers HMM Huihoo.htm
04/29/2013 01:00 AM 238 TCS Plan.txt
07/24/2012 11:04 PM 449,274 Tentative_NumPy_Tutorial.pdf
07/16/2012 01:01 AM 14,067 testmultidoctest.txt
07/28/2012 12:34 AM 3,147,818 Text Chunking Using NLTK.pdf
08/05/2012 02:12 PM 295,629 The Maharaja Railways of India - Wikipedi
a, the free encyclopedia_29.mht
08/13/2012 09:49 AM 2,072 The Synonym Generation.txt
07/31/2012 01:12 AM 13,739 Titting 17.docx
12/18/2012 07:04 PM <DIR> TKInter Tutorial
09/08/2012 01:02 AM 316,882 Tokenizing large (70MB) TXT file using Py
thon NLTK_ Concatenation & write data to stream errors - Stack Overflow.mht
09/03/2012 10:44 PM 13,909 Understanding CRF.docx
09/03/2012 10:42 PM 14,691 Understanding HMM.docx
12/29/2012 09:59 PM 108,428 Understanding Link Analysis From The Anal
ytic WorkshopUnderstanding Link Analysis.htm
12/29/2012 09:59 PM <DIR> Understanding Link Analysis From The Anal
ytic WorkshopUnderstanding Link Analysis_files
09/02/2012 09:24 PM 15,917 Understanding Naïve Bayes.docx
03/01/2013 03:05 AM 223 UNL CUP500.txt
12/15/2012 01:31 PM 13,793 UNL QUESTIONS.docx
01/06/2013 02:03 PM 277 VA Mesh CleanUp Review.txt
01/07/2013 11:24 PM 38,279 Valerie_text1.htm
01/07/2013 11:24 PM <DIR> Valerie_text1_files
12/29/2012 10:21 PM 82,210 Visual Analytics .org _ Truth is a pathle
ss land. -JK.htm
12/29/2012 10:21 PM <DIR> Visual Analytics .org _ Truth is a pathle
ss land. -JK_files
12/29/2012 09:11 PM 1,944,867 Visual Analytics Cross Check Paper1.pdf
12/29/2012 09:18 PM 1,293,471 Visual Analytics Cross Check Paper2.pdf
12/29/2012 09:23 PM 1,572,290 Visual Analytics Cross Check Paper3.pdf
09/24/2012 08:01 PM 14,462 VIVA TOPICS.docx
08/12/2012 04:19 PM 90,507 Weave -.mht
11/24/2012 04:10 PM 1,035 Welcome to ICDM IEEE International Confer
ence on Data Mining!.htm
11/24/2012 04:10 PM <DIR> Welcome to ICDM IEEE International Confer
ence on Data Mining!_files
12/14/2012 09:42 PM 245,151 WordNet.htm
12/14/2012 09:42 PM <DIR> WordNet_files
09/09/2012 11:04 AM 163,056 Wrong Google Interface.docx
09/21/2012 08:08 PM 42,283 Young Adult Health - Health Topics - Skin
care.htm
09/21/2012 08:08 PM <DIR> Young Adult Health - Health Topics - Skin
care_files
09/04/2012 12:00 AM 103,471,306 Zurafsky_Martin_Speech.xps
08/12/2012 04:32 PM 11,028 [SciPy-user] Stepwise Discriminant Analys
is.htm
08/03/2012 12:09 AM 3,401 [Tutor] sys_argv.htm
266 File(s) 294,060,071 bytes
86 Dir(s) 416,011,706,368 bytes free

C:\Users\subhabrata\Documents>cd lingpipe-4.1.0.tar

C:\Users\subhabrata\Documents\lingpipe-4.1.0.tar>dir
Volume in drive C is Acer
Volume Serial Number is 7A35-B119

Directory of C:\Users\subhabrata\Documents\lingpipe-4.1.0.tar

04/12/2013 11:53 PM <DIR> .
04/12/2013 11:53 PM <DIR> ..
04/13/2013 12:00 AM <DIR> lingpipe-4.1.0
0 File(s) 0 bytes
3 Dir(s) 416,394,264,576 bytes free

C:\Users\subhabrata\Documents\lingpipe-4.1.0.tar>cd lingpipe-4.1.0

C:\Users\subhabrata\Documents\lingpipe-4.1.0.tar\lingpipe-4.1.0>dir
Volume in drive C is Acer
Volume Serial Number is 7A35-B119

Directory of C:\Users\subhabrata\Documents\lingpipe-4.1.0.tar\lingpipe-4.1.0

04/13/2013 12:00 AM <DIR> .
04/13/2013 12:00 AM <DIR> ..
04/13/2013 12:00 AM <DIR> build
06/24/2011 04:54 AM 10,369 build.xml
04/12/2013 11:53 PM <DIR> demos
04/12/2013 11:53 PM <DIR> docs
06/24/2011 04:54 AM 8,063 index.html
04/12/2013 11:53 PM <DIR> lib
04/12/2013 11:53 PM <DIR> licenses
06/24/2011 04:57 AM 1,038,954 lingpipe-4.1.0.jar
06/24/2011 04:54 AM 4,512 read-me.html
05/14/2013 12:37 AM <DIR> src
04/12/2013 11:53 PM <DIR> web
4 File(s) 1,061,898 bytes
9 Dir(s) 416,392,859,648 bytes free

C:\Users\subhabrata\Documents\lingpipe-4.1.0.tar\lingpipe-4.1.0>ant build.xml
Unable to locate tools.jar. Expected to find it in C:\Program Files\Java\jre7\li
b\tools.jar
Buildfile: C:\Users\subhabrata\Documents\lingpipe-4.1.0.tar\lingpipe-4.1.0\build
.xml

BUILD FAILED
Target "build.xml" does not exist in the project "Alias-i LingPipe".

Total time: 1 second

C:\Users\subhabrata\Documents\lingpipe-4.1.0.tar\lingpipe-4.1.0>cd build

C:\Users\subhabrata\Documents\lingpipe-4.1.0.tar\lingpipe-4.1.0\build>dir
Volume in drive C is Acer
Volume Serial Number is 7A35-B119

Directory of C:\Users\subhabrata\Documents\lingpipe-4.1.0.tar\lingpipe-4.1.0\bu
ild

04/13/2013 12:00 AM <DIR> .
04/13/2013 12:00 AM <DIR> ..
05/14/2013 01:23 AM <DIR> classes
0 File(s) 0 bytes
3 Dir(s) 416,385,576,960 bytes free

C:\Users\subhabrata\Documents\lingpipe-4.1.0.tar\lingpipe-4.1.0\build>cd..

C:\Users\subhabrata\Documents\lingpipe-4.1.0.tar\lingpipe-4.1.0>cd demos

C:\Users\subhabrata\Documents\lingpipe-4.1.0.tar\lingpipe-4.1.0\demos>dir
Volume in drive C is Acer
Volume Serial Number is 7A35-B119

Directory of C:\Users\subhabrata\Documents\lingpipe-4.1.0.tar\lingpipe-4.1.0\de
mos

04/12/2013 11:53 PM <DIR> .
04/12/2013 11:53 PM <DIR> ..
04/08/2009 08:29 PM 432 build.xml
04/12/2013 11:53 PM <DIR> data
04/12/2013 11:53 PM <DIR> generic
04/12/2013 11:53 PM <DIR> lib
04/12/2013 11:53 PM <DIR> licenses
04/12/2013 11:53 PM <DIR> models
04/12/2013 11:53 PM <DIR> tutorial
1 File(s) 432 bytes
8 Dir(s) 416,382,824,448 bytes free

C:\Users\subhabrata\Documents\lingpipe-4.1.0.tar\lingpipe-4.1.0\demos>ant build.
xml
Unable to locate tools.jar. Expected to find it in C:\Program Files\Java\jre7\li
b\tools.jar
Buildfile: C:\Users\subhabrata\Documents\lingpipe-4.1.0.tar\lingpipe-4.1.0\demos
\build.xml

BUILD FAILED
Target "build.xml" does not exist in the project "Alias-i LingPipe Demos Build".


Total time: 0 seconds

C:\Users\subhabrata\Documents\lingpipe-4.1.0.tar\lingpipe-4.1.0\demos>

Regards,
Subhabrata.

Lew

unread,
May 13, 2013, 7:05:41 PM5/13/13
to
subhaba...@gmail.com wrote:
>> Dear Room,

"Room" is the wrong term.

"Group", "people", "fellow programmers", ...

>> I was trying to learn Apache Ant.

Have you read the instructions?

>> I got the following information.
>>
>> i)Ant is a build tool, it helps to create .exe file.

Wrong. It is a build tool, but it is not to build an EXE file.

>> ii) Compiling is a subtask of building.
>>
>> Now,
>> I am confused with few questions.
>>
>> I was exploring the "Ant build" in Eclipse.
>
> I could create one "build.xml" and could run successfully.
>>
>> The questions are:
>>
>> i) May I have to write the the "build.xml" or a build file everytime I want to build a project?

No, but every time you create a project or change how it builds you will need to add or modify
the build.xml.

>> Can't it be done automatic, means the generation of the .xml file?

Not really. You start with a standard build.xml and modify it.

>> ... [snip] ...

> That is okay. I could place ant properly my machine can recognize ant in command prompt. Other than this as Sujit suggested I could run Lingpipe demo from command prompt. As you are kindly teaching me let me learn it too. I tried it but got the following error, I am trying still let me see where I land tomorrow evening.
>
> entation.htm

What?

> 11/19/2012 12:05 AM <DIR> nltk_classify_naivebayes - NLTK 2_0 documentation_files
> 07/30/2012 11:49 PM 8,785,560 NortonOnlineBackup.exe
. . .
> 08/03/2012 12:09 AM 3,401 [Tutor] sys_argv.htm
> 266 File(s) 294,060,071 bytes
> 86 Dir(s) 416,011,706,368 bytes free

Why are you showing us all that garbage?

> C:\Users\subhabrata\Documents>cd lingpipe-4.1.0.tar

A directory should not be named "whatever.tar".

> Directory of C:\Users\subhabrata\Documents\lingpipe-4.1.0.tar
> 04/12/2013 11:53 PM <DIR> .
> 04/12/2013 11:53 PM <DIR> ..
> 04/13/2013 12:00 AM <DIR> lingpipe-4.1.0
> 0 File(s) 0 bytes
> 3 Dir(s) 416,394,264,576 bytes free

Why are you showing us this garbage?

> C:\Users\subhabrata\Documents\lingpipe-4.1.0.tar>cd lingpipe-4.1.0
> C:\Users\subhabrata\Documents\lingpipe-4.1.0.tar\lingpipe-4.1.0>dir
> Volume in drive C is Acer
> Volume Serial Number is 7A35-B119
>
> Directory of C:\Users\subhabrata\Documents\lingpipe-4.1.0.tar\lingpipe-4.1.0
> 04/13/2013 12:00 AM <DIR> .
> 04/13/2013 12:00 AM <DIR> ..
> 04/13/2013 12:00 AM <DIR> build
> 06/24/2011 04:54 AM 10,369 build.xml
> 04/12/2013 11:53 PM <DIR> demos
> 04/12/2013 11:53 PM <DIR> docs
> 06/24/2011 04:54 AM 8,063 index.html
...

Why are you showing us this garbage?

> C:\Users\subhabrata\Documents\lingpipe-4.1.0.tar\lingpipe-4.1.0>ant build.xml

That's not how you invoke Ant. Read the instructions.

Or type "ant --help" or "ant -h" or "man ant" at the command line.

> Unable to locate tools.jar. Expected to find it in C:\Program Files\Java\jre7\lib\tools.jar

That's not a JDK. Install the JDK. Ant will not work with only the JRE. You cannot build
Java files with only the JRE. This is explained on the Java site. You should read the instructions.

> Buildfile: C:\Users\subhabrata\Documents\lingpipe-4.1.0.tar\lingpipe-4.1.0\build
> .xml

You need to fix your broken lines in your posts.

> BUILD FAILED
> Target "build.xml" does not exist in the project "Alias-i LingPipe".

Yes. You did not invoke Ant correctly.

> Total time: 1 second
>
> C:\Users\subhabrata\Documents\lingpipe-4.1.0.tar\lingpipe-4.1.0>cd build
>
> C:\Users\subhabrata\Documents\lingpipe-4.1.0.tar\lingpipe-4.1.0\build>dir
> Volume in drive C is Acer
> Volume Serial Number is 7A35-B119
>
> Directory of C:\Users\subhabrata\Documents\lingpipe-4.1.0.tar\lingpipe-4.1.0\bu
> ild
>
> 04/13/2013 12:00 AM <DIR> .
> 04/13/2013 12:00 AM <DIR> ..
> 05/14/2013 01:23 AM <DIR> classes

Why are you showing us this garbage?

> ... [more garbage deleted] ...

--
Lew

Arne Vajhøj

unread,
May 13, 2013, 7:07:45 PM5/13/13
to
Usually you can run ant without setting classpath to Java.

Arne


subhaba...@gmail.com

unread,
May 13, 2013, 7:38:13 PM5/13/13
to
On Monday, May 13, 2013 1:10:31 AM UTC+5:30, subhaba...@gmail.com wrote:
Dear Group(Thanks Lew),

I found the error in another library named "MALLET", so trying the following way:

First I changed JAVA_HOME environmental variable to point to C:\Program Files\Java\jdk1.7.0_05\lib\tools.jar

Then I used the following command,

C:\Program Files\Java\mallet-2.0.7>ant -version
Unable to locate tools.jar. Expected to find it in C:\Program Files\Java\jre7\lib\tools.jar
Apache Ant(TM) version 1.8.2 compiled on December 20 2010

am I going fine?

Regards,
Subhabrata

NB: Sorry to post garbages, I'll try to keep a check. Thanks for the suggestion.

Arne Vajhøj

unread,
May 13, 2013, 8:19:58 PM5/13/13
to
On 5/13/2013 7:38 PM, subhaba...@gmail.com wrote:
> I found the error in another library named "MALLET", so trying the following way:
>
> First I changed JAVA_HOME environmental variable to point to C:\Program Files\Java\jdk1.7.0_05\lib\tools.jar
>
> Then I used the following command,
>
> C:\Program Files\Java\mallet-2.0.7>ant -version
> Unable to locate tools.jar. Expected to find it in C:\Program Files\Java\jre7\lib\tools.jar
> Apache Ant(TM) version 1.8.2 compiled on December 20 2010
>
> am I going fine?

JAVA_HOME should point to C:\Program Files\Java\jdk1.7.0_05 not
C:\Program Files\Java\jdk1.7.0_05\lib\tools.jar !

Arne


Lew

unread,
May 13, 2013, 8:21:17 PM5/13/13
to
On Monday, May 13, 2013 4:38:13 PM UTC-7, subhaba...@gmail.com wrote:
> I found the error in another library named "MALLET", so trying the following way:

Is it spelled exactly that way, in all upper-case letters?

> First I changed JAVA_HOME environmental variable to point to C:\Program Files\Java\jdk1.7.0_05\lib\tools.jar

That is wrong!

JAVA_HOME should indicate the *directory* where you installed the JDK.

It should *not* point to a JAR file.

> Then I used the following command,
>
> C:\Program Files\Java\mallet-2.0.7>ant -version

This does not do a build.

> Unable to locate tools.jar. Expected to find it in C:\Program Files\Java\jre7\lib\tools.jar

That is not where the tools.jar is. It should be in the JDK directory. You have not installed
the JDK. Why did you ignore the advice to install the JDK?

> Apache Ant(TM) version 1.8.2 compiled on December 20 2010
>
> am I going fine?

Absolutely not.

Once again, as everyone keeps telling you, READ THE DIRECTIONS!

Install the JDK. Point JAVA_HOME to where the JDK is installed, although it is not strictly needed.
Keep the JDK command directory, where the "java" and "javac" commands reside, in your PATH.
This command directory will be a subdirectory of the $JAVA_HOME directory, if that environment
variable is set, or what would be that directory if you don't set the variable.

Read the directions. Try following the advice you get here before asking another question.

--
Lew

Lew

unread,
May 13, 2013, 8:24:24 PM5/13/13
to
On Monday, May 13, 2013 5:19:58 PM UTC-7, Arne Vajhøj wrote:
> JAVA_HOME should point to C:\Program Files\Java\jdk1.7.0_05 not
> C:\Program Files\Java\jdk1.7.0_05\lib\tools.jar !

Furthermore, OP, you should use a current version of Java. 7u5 is far too old.

The minor upgrades (7u21 is current) cover security and bug fixes. Do you want an insecure
or buggy version?

--
Lew

lipska the kat

unread,
May 14, 2013, 4:43:50 AM5/14/13
to
On 14/05/13 00:38, subhaba...@gmail.com wrote:
> On Monday, May 13, 2013 1:10:31 AM UTC+5:30, subhaba...@gmail.com wrote:
>> Dear Room,
>>
>>
>>
>> I was trying to learn Apache Ant.

[snip]

>> i) May I have to write the the "build.xml" or a build file everytime I want to build a project? Can't it be done automatic, means the generation of the .xml file?

Each project will have it's own Ant build file (at least one).
It is often possible to simply copy an existing file and modify it for a
different project. Start small, try and get Ant to compile a single
file, this tells you that all the wiring is correct, then compile a few
files and package them into a jar file. Work your way up to more and
more complex builds. Actually I mostly use Ant to package up web
applications into war files then deploy them to a server. One click
build and deploy saves an awful lot of time. I generally leave the
compilation to Eclipse but whatever works for you is fine.

It is possible to configure Ant using properties files
here's a simple tutorial

http://www.tutorialspoint.com/ant/ant_property_files.htm

In this way, you could check a standard build file into source control
which could then be configured for different build environments by
creating a local properties file.

lipska

--
Lipska the Kat�: Troll hunter, sandbox destroyer
and farscape dreamer of Aeryn Sun

subhaba...@gmail.com

unread,
May 14, 2013, 10:19:45 AM5/14/13
to
On Monday, May 13, 2013 1:10:31 AM UTC+5:30, subhaba...@gmail.com wrote:
Dear Group,

I read the URL

"http://docs.oracle.com/javase/7/docs/technotes/tools/windows/classpath.h

tml"

I went to Computer--->Properties-->Advanced System Settings-->Environment

Variables-->ANT_HOME/JAVA_HOME

In JAVA_HOME Variable Value is now:
"C:\Program Files (x86)\Java\jdk1.7.0_21"

Updated to the latest JDK and ported Eclipse also with it.

In ANT_HOME Variable Value is now:
"C:\Program Files\Java\apache-ant-1.9.0"

While installing it tried to follow:
"http://ant.apache.org/manual/install.html"

As I am giving

C:\>Ant
Buildfile: build.xml does not exist!
Build failed

C:\>ant -version
Apache Ant(TM) version 1.9.0 compiled on March 5 2013

C:\>ant -help
....
....

....
these are working.

Means "So Ant works."("http://ant.apache.org/manual/install.html")

But, as I am giving
C:\Program Files\Java\mallet-2.0.7>ant

The build is still failed.

I'm checking the things.

I worked out following things:

C:\Users\subhabrata\Documents\lingpipe-4.1.0.tar\lingpipe-4.1.0>ant
Buildfile: C:\Users\subhabrata\Documents\lingpipe-4.1.0.tar\lingpipe-

4.1.0\build
.xml

compile:

BUILD SUCCESSFUL
Total time: 1 second

C:\Users\subhabrata\Documents\lingpipe-4.1.0.tar\lingpipe-4.1.0>



Regards,
Subhabrata.


Lew

unread,
May 14, 2013, 2:21:02 PM5/14/13
to
subhaba...@...wrote:
Your formatting was little messed up on the Interwebz.

> tml"
>
> I went to Computer--->Properties-->Advanced System Settings-->Environment
>
> Variables-->ANT_HOME/JAVA_HOME
>
> In JAVA_HOME Variable Value is now:
> "C:\Program Files (x86)\Java\jdk1.7.0_21"

Good.

> Updated to the latest JDK and ported Eclipse also with it.
>
> In ANT_HOME Variable Value is now:
> "C:\Program Files\Java\apache-ant-1.9.0"

Good.

> While installing it tried to follow:
> "http://ant.apache.org/manual/install.html"

Good.

> As I am giving
>
> C:\>Ant

That should be spelled "ant". Only the fact that Windows is weird about letter case
saved you there.

> Buildfile: build.xml does not exist!

Read the directions. Where does the "ant" command find its build file?

http://ant.apache.org/manual/running.html#commandline

Read the directions.

> Build failed
>
> C:\>ant -version
> Apache Ant(TM) version 1.9.0 compiled on March 5 2013
>
> C:\>ant -help
> ....
> ....
> ....
>
> these are working.
>
> Means "So Ant works."("http://ant.apache.org/manual/install.html")

Good.

> But, as I am giving
>
> C:\Program Files\Java\mallet-2.0.7>ant

What is that directory? What is in that directory?

> The build is still failed.

What are you trying to build?

> I'm checking the things.
>
> I worked out following things:
>
> C:\Users\subhabrata\Documents\lingpipe-4.1.0.tar\lingpipe-4.1.0>ant
> Buildfile: C:\Users\subhabrata\Documents\lingpipe-4.1.0.tar\lingpipe-4.1.0\build.xml

See how that works now that you've read the directions?

What is that directory? What is in that directory? What are you trying to build?

> compile:
>
> BUILD SUCCESSFUL
> Total time: 1 second

--
Lew

subhaba...@gmail.com

unread,
May 14, 2013, 3:30:30 PM5/14/13
to
Dear Group,

I would make a detailed study also. Thank you for your kind suggestion.
But more or less all the ant commands on Lingpipe are working fine.
The build is getting failed for another Library Mallet. The instructions are given here,("http://mallet.cs.umass.edu/download.php"), the kind of trouble you are taking I can not request you to suggest. I am trying to discuss the preliminary issues with MALLET forum, if I can not get much help I am getting back to you.

Regards,
Subhabrata.

Lew

unread,
May 14, 2013, 4:08:39 PM5/14/13
to
subhaba...@....com wrote:
> On Tuesday, May 14, 2013 11:51:02 PM UTC+5:30, Lew wrote:
>> subhaba...@....com wrote:
>>> C:\Program Files\Java\mallet-2.0.7>ant
>>
>> What is that directory? What is in that directory?

Is there a "build.xml" in that directory? Why did you ignore these questions I asked?

>>> The build is still failed.

And you have not answered my questions. Also, how did it fail? With what messages?

>> What are you trying to build?

Okay, I guess you're trying to build Mallet, but why? It's already built!

>
> ... [snip] ...
>
> I would make a detailed study also. Thank you for your kind suggestion.
> But more or less all the ant commands on Lingpipe are working fine.

Why are you building these projects if they're already built?

> The build is getting failed for another Library Mallet. The instructions are given here,
> ("http://mallet.cs.umass.edu/download.php"), the kind of trouble you are taking I can not request you
> to suggest. I am trying to discuss the preliminary issues with MALLET forum, if I can not get much
> help I am getting back to you.

Those instructions tell you to go ahead and just use Mallet. Couldn't you do that?

--
Lew

subhaba...@gmail.com

unread,
May 15, 2013, 3:15:03 PM5/15/13
to
Dear Group,

Yes, it is fine now. There was a silly error.

"mallet.jar" in the "dist" directory within Mallet is also created.

But I can not do java -jar mallet-jar.

Regards,
Subhabrata.


Lew

unread,
May 15, 2013, 3:38:22 PM5/15/13
to
subhaba...@....com wrote:
> "mallet.jar" in the "dist" directory within Mallet is also created.
>
> But I can not do java -jar mallet-jar.

First of all, even if "mallet.jar" actually is an executable JAR, calling it "mallet-jar" will not
execute it.

http://docs.oracle.com/javase/7/docs/technotes/tools/windows/java.html#synopsis

Second, even if you spell the JAR name correctly, if it isn't an executable JAR then it won't
execute.

http://docs.oracle.com/javase/tutorial/deployment/jar/
http://docs.oracle.com/javase/tutorial/deployment/jar/run.html

--
Lew

subhaba...@gmail.com

unread,
May 15, 2013, 4:27:05 PM5/15/13
to
Dear Group,

I was checking
http://mallet.cs.umass.edu/quick-start.php

and now I am stuck here


Directory of C:\Users\subhabrata\Documents\mallet-2.0.7\bin

05/09/2013 03:00 AM <DIR> .
05/09/2013 03:00 AM <DIR> ..
09/02/2011 12:50 PM 635 classifier2info
09/02/2011 12:50 PM 632 csv2classify
09/02/2011 12:50 PM 631 csv2vectors
09/02/2011 12:50 PM 2,347 mallet
09/02/2011 12:50 PM 2,471 mallet.bat
09/02/2011 12:50 PM 1,771 mallethon
09/02/2011 12:50 PM 63 prepend-license.sh
09/02/2011 12:50 PM 636 svmlight2vectors
09/02/2011 12:50 PM 633 text2classify
09/02/2011 12:50 PM 632 text2vectors
09/02/2011 12:50 PM 636 vectors2classify
09/02/2011 12:50 PM 632 vectors2info
09/02/2011 12:50 PM 631 vectors2topics
09/02/2011 12:50 PM 635 vectors2vectors
14 File(s) 12,985 bytes
2 Dir(s) 414,373,920,768 bytes free

C:\Users\subhabrata\Documents\mallet-2.0.7\bin>mallet
Mallet 2.0 commands:
import-dir load the contents of a directory into mallet instances (one
per file)
import-file load a single file into mallet instances (one per line)
import-svmlight load a single SVMLight format data file into mallet instance
s (one per line)
train-classifier train a classifier from Mallet data files
train-topics train a topic model from Mallet data files
infer-topics use a trained topic model to infer topics for new documents
estimate-topics estimate the probability of new documents given a trained mo
del
hlda train a topic model using Hierarchical LDA
prune remove features based on frequency or information gain
split divide data into testing, training, and validation portions
Include --help with any option for more information

C:\Users\subhabrata\Documents\mallet-2.0.7\bin>

Regards,
Subhabrata.

Joerg Meier

unread,
May 15, 2013, 6:02:07 PM5/15/13
to
On Wed, 15 May 2013 13:27:05 -0700 (PDT), subhaba...@gmail.com wrote:

> I was checking
> http://mallet.cs.umass.edu/quick-start.php

> and now I am stuck here

You are not stuck. You have succeeded. Everything is working as it should.

Liebe Gruesse,
Joerg

--
Ich lese meine Emails nicht, replies to Email bleiben also leider
ungelesen.

subhaba...@gmail.com

unread,
May 16, 2013, 2:12:41 AM5/16/13
to
Dear Group,

Thanks. But I am unable to do these commands like "bin/mallet train-classifier --input data.mallet...".

Regards,
Subhabrata.

Joerg Meier

unread,
May 16, 2013, 4:20:14 AM5/16/13
to
On Wed, 15 May 2013 23:12:41 -0700 (PDT), subhaba...@gmail.com wrote:

> Thanks. But I am unable to do these commands like "bin/mallet train-classifier --input data.mallet...".

Why ? Does your keyboard not work ? If you get errors, you should consider
sharing them. From what you posted, everything looks fine and in working
order.

subhaba...@gmail.com

unread,
May 16, 2013, 4:33:16 AM5/16/13
to
Dear Group,

As you suggested upto that it was fine. Now I wanted to test some data either inbuilt or user defined. So, I started to carry on, but getting stuck, as given here,

Directory of C:\Users\subhabrata\Documents\mallet-2.0.7\bin

05/09/2013 03:00 AM <DIR> .
05/09/2013 03:00 AM <DIR> ..
09/02/2011 12:50 PM 635 classifier2info
09/02/2011 12:50 PM 632 csv2classify
09/02/2011 12:50 PM 631 csv2vectors
09/02/2011 12:50 PM 2,347 mallet
09/02/2011 12:50 PM 2,471 mallet.bat
09/02/2011 12:50 PM 1,771 mallethon
09/02/2011 12:50 PM 63 prepend-license.sh
09/02/2011 12:50 PM 636 svmlight2vectors
09/02/2011 12:50 PM 633 text2classify
09/02/2011 12:50 PM 632 text2vectors
09/02/2011 12:50 PM 636 vectors2classify
09/02/2011 12:50 PM 632 vectors2info
09/02/2011 12:50 PM 631 vectors2topics
09/02/2011 12:50 PM 635 vectors2vectors
14 File(s) 12,985 bytes
2 Dir(s) 413,130,571,776 bytes free

C:\Users\subhabrata\Documents\mallet-2.0.7\bin>mallet
Mallet 2.0 commands:
import-dir load the contents of a directory into mallet instances (one
per file)
import-file load a single file into mallet instances (one per line)
import-svmlight load a single SVMLight format data file into mallet instance
s (one per line)
train-classifier train a classifier from Mallet data files
train-topics train a topic model from Mallet data files
infer-topics use a trained topic model to infer topics for new documents
estimate-topics estimate the probability of new documents given a trained mo
del
hlda train a topic model using Hierarchical LDA
prune remove features based on frequency or information gain
split divide data into testing, training, and validation portions
Include --help with any option for more information

C:\Users\subhabrata\Documents\mallet-2.0.7\bin>mallet train-classifier
java.io.FileNotFoundException: text.vectors (The system cannot find the file spe
cified)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(Unknown Source)
at cc.mallet.types.InstanceList.load(InstanceList.java:787)
at cc.mallet.classify.tui.Vectors2Classify.main(Vectors2Classify.java:25
9)
Exception in thread "main" java.lang.IllegalArgumentException: Couldn't read Ins
tanceList from file text.vectors
at cc.mallet.types.InstanceList.load(InstanceList.java:794)
at cc.mallet.classify.tui.Vectors2Classify.main(Vectors2Classify.java:25
9)

JLP

unread,
May 16, 2013, 5:25:08 AM5/16/13
to
Le 16/05/2013 10:33, subhaba...@gmail.com a �crit :
>
> C:\Users\subhabrata\Documents\mallet-2.0.7\bin>mallet
> train-classifier java.io.FileNotFoundException: text.vectors (The
> system cannot find the file spe cified) at
> java.io.FileInputStream.open(Native Method) at
> java.io.FileInputStream.<init>(Unknown Source) at
> cc.mallet.types.InstanceList.load(InstanceList.java:787) at
> cc.mallet.classify.tui.Vectors2Classify.main(Vectors2Classify.java:25
>
>
9)
> Exception in thread "main" java.lang.IllegalArgumentException:
> Couldn't read Ins tanceList from file text.vectors at
> cc.mallet.types.InstanceList.load(InstanceList.java:794) at
> cc.mallet.classify.tui.Vectors2Classify.main(Vectors2Classify.java:25
>
>
9)
> C:\Users\subhabrata\Documents\mallet-2.0.7\bin>
>
> Regards, Subhabrata.
>

The message is clear the "mallet" sofware needs a file :
text.vectors that misses and so it fails

subhaba...@gmail.com

unread,
May 16, 2013, 6:08:11 AM5/16/13
to
On Thursday, May 16, 2013 2:55:08 PM UTC+5:30, JLP wrote:
Dear Group,

Thank you for pointing out. But if you can kindly suggest the command I have to give. Sorry to ask this silly question.

Regards,
Subhabrata.

Joerg Meier

unread,
May 16, 2013, 6:45:09 AM5/16/13
to
On Thu, 16 May 2013 03:08:11 -0700 (PDT), subhaba...@gmail.com wrote:

> Thank you for pointing out. But if you can kindly suggest the command I have to give. Sorry to ask this silly question.

Why don't you read what you yourself pasted ?

> Include --help with any option for more information

So why didn't you try --help with your train-classifier ?

Your total lack of effort is quickly becoming tiresome and frustrating to
those of us trying to help. Do you really need someone to hold your hand
and explain "Include --help with any option for more information" to you ?

For what it's worth, your next step will require actual data files
compatible with mallet. As the page that you linked to plenty of times now
clearly shows. It even gives example commands. You likely cannot continue
at all without getting or generating those mallet data files.

subhaba...@gmail.com

unread,
May 16, 2013, 7:04:51 AM5/16/13
to
Dear Group,

It is true you are upset. But I tried and not getting. I am trying bit more and including my efforts by night. If things come by it would be nice. Let us see.

Regards,
Subhabrata.

subhaba...@gmail.com

unread,
May 16, 2013, 4:26:20 PM5/16/13
to
Dear Group,

The only progress I could do I could write one file "mydata.txt" and convert it into mallet format as "output.mallet", as can be seen in REPORT NO.2.

The exercises I made are copied and pasted as, REPORT NO.1, AND REPORT NO.2, as I could not attach them. Apology if you feel it looks like "junk". The only other change you may find I have changed path of Mallet as I was trying to follow the tutorial("http://programminghistorian.org/lessons/topic-modeling-and-mallet") surfed out.

REPORT NO.1:
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.

C:\Users\subhabrata>cd\

C:\>cd mallet

C:\mallet>
C:\mallet>ant
Buildfile: C:\mallet\build.xml

init:
[copy] Copying 1 file to C:\mallet\class

compile:
[javac] C:\mallet\build.xml:60: warning: 'includeantruntime' was not set, de
faulting to build.sysclasspath=last; set to false for repeatable builds

BUILD SUCCESSFUL
Total time: 6 seconds

C:\mallet>ant jar
Buildfile: C:\mallet\build.xml

init:
[copy] Copying 1 file to C:\mallet\class

compile:
[javac] C:\mallet\build.xml:60: warning: 'includeantruntime' was not set, de
faulting to build.sysclasspath=last; set to false for repeatable builds

jar:
[jar] Building jar: C:\mallet\dist\mallet.jar

BUILD SUCCESSFUL
Total time: 1 second

C:\mallet>dir
Volume in drive C is Acer
Volume Serial Number is 7A35-B119

Directory of C:\mallet

05/17/2013 01:02 AM <DIR> .
05/17/2013 01:02 AM <DIR> ..
05/17/2013 01:02 AM <DIR> bin
09/02/2011 12:50 PM 2,897 build.xml
05/17/2013 01:02 AM <DIR> class
05/17/2013 01:02 AM <DIR> dist
05/17/2013 01:02 AM <DIR> lib
09/02/2011 12:50 PM 11,918 LICENSE
09/02/2011 12:50 PM 3,566 Makefile
09/02/2011 12:50 PM 2,519 pom.xml
05/17/2013 01:02 AM <DIR> sample-data
05/17/2013 01:02 AM <DIR> src
05/17/2013 01:02 AM <DIR> stoplists
09/02/2011 12:50 PM <DIR> test
4 File(s) 20,900 bytes
10 Dir(s) 415,472,402,432 bytes free

C:\mallet>cd bin

C:\mallet\bin>dir
Volume in drive C is Acer
Volume Serial Number is 7A35-B119

Directory of C:\mallet\bin

05/17/2013 01:02 AM <DIR> .
05/17/2013 01:02 AM <DIR> ..
09/02/2011 12:50 PM 635 classifier2info
09/02/2011 12:50 PM 632 csv2classify
09/02/2011 12:50 PM 631 csv2vectors
09/02/2011 12:50 PM 2,347 mallet
09/02/2011 12:50 PM 2,471 mallet.bat
09/02/2011 12:50 PM 1,771 mallethon
09/02/2011 12:50 PM 63 prepend-license.sh
09/02/2011 12:50 PM 636 svmlight2vectors
09/02/2011 12:50 PM 633 text2classify
09/02/2011 12:50 PM 632 text2vectors
09/02/2011 12:50 PM 636 vectors2classify
09/02/2011 12:50 PM 632 vectors2info
09/02/2011 12:50 PM 631 vectors2topics
09/02/2011 12:50 PM 635 vectors2vectors
14 File(s) 12,985 bytes
2 Dir(s) 415,471,616,000 bytes free

C:\mallet\bin>mallet import-dir --input pathway\to\the\directory\with\the\files
--output tutorial.mallet --keep-sequence --remove-stopwords
Labels =
pathway\to\the\directory\with\the\files
Exception in thread "main" java.lang.IllegalArgumentException: C:\mallet\bin\pat
hway\to\the\directory\with\the\files is not a directory.
at cc.mallet.pipe.iterator.FileIterator.<init>(FileIterator.java:108)
at cc.mallet.pipe.iterator.FileIterator.<init>(FileIterator.java:145)
at cc.mallet.classify.tui.Text2Vectors.main(Text2Vectors.java:312)
C:\mallet\bin>svmlight2vectors
'svmlight2vectors' is not recognized as an internal or external command,
operable program or batch file.

C:\mallet\bin>mallet
Mallet 2.0 commands:
import-dir load the contents of a directory into mallet instances (one
per file)
import-file load a single file into mallet instances (one per line)
import-svmlight load a single SVMLight format data file into mallet instance
s (one per line)
train-classifier train a classifier from Mallet data files
train-topics train a topic model from Mallet data files
infer-topics use a trained topic model to infer topics for new documents
estimate-topics estimate the probability of new documents given a trained mo
del
hlda train a topic model using Hierarchical LDA
prune remove features based on frequency or information gain
split divide data into testing, training, and validation portions
Include --help with any option for more information

C:\mallet\bin>mallet train-classifier --help
A tool for training, saving and printing diagnostics from a classifier on vector
s.
--help TRUE|FALSE
Print this command line option usage information. Give argument of TRUE for l
onger documentation
Default is false
--prefix-code 'JAVA CODE'
Java code you want run before any other interpreted code. Note that the text
is interpreted without modification, so unlike some other Java code options, you
need to include any necessary 'new's when creating objects.
Default is null
--config FILE
Read command option values from a file
Default is null
--report [train|test|validation]:[accuracy|f1:label|confusion|raw]

Default is test:accuracy test:confusion train:accuracy
--trainer ClassifierTrainer constructor
Java code for the constructor used to create a ClassifierTrainer. If no '(' a
ppears, then "new " will be prepended and "Trainer()" will be appended.You may u
se this option mutiple times to compare multiple classifiers.
Default is new NaiveBayesTrainer()
--output-classifier FILENAME
The filename in which to write the classifier after it has been trained.
Default is classifier.mallet
--input FILENAME
The filename from which to read the list of training instances. Use - for std
in.
Default is text.vectors
--training-file FILENAME
Read the training set instance list from this file. If this is specified, the
input file parameter is ignored
Default is text.vectors
--testing-file FILENAME
Read the test set instance list to this file. If this option is specified, the
training-file parameter must be specified and the input-file parameter is igno
red
Default is text.vectors
--validation-file FILENAME
Read the validation set instance list to this file.If this option is specified
, the training-file parameter must be specified and the input-file parameter is
ignored
Default is text.vectors
--training-portion DECIMAL
The fraction of the instances that should be used for training.
Default is 1.0
--validation-portion DECIMAL
The fraction of the instances that should be used for validation.
Default is 0.0
--unlabeled-portion DECIMAL
The fraction of the training instances that should have their labels hidden.
Note that these are taken out of the training-portion, not allocated separately.

Default is 0.0
--random-seed INTEGER
The random seed for randomly selecting a proportion of the instance list for t
raining
Default is 0
--num-trials INTEGER
The number of random train/test splits to perform
Default is 1
--classifier-evaluator CONSTRUCTOR
Java code for constructing a ClassifierEvaluating object
Default is null
--verbosity INTEGER
The level of messages to print: 0 is silent, 8 is most verbose. Levels 0-8 cor
respond to the java.logger predefined levels off, severe, warning, info, config,
fine, finer, finest, all. The default value is taken from the mallet logging.pr
operties file, which currently defaults to INFO level (3)
Default is -1
--noOverwriteProgressMessages true|false
Suppress writing-in-place on terminal for progess messages - repetitive messag
es of which only the latest is generally of interest
Default is false
--cross-validation INT
The number of folds for cross-validation (DEFAULT=0).
Default is 0
C:\mallet\bin>mallet train-classifier --training-file text.vectors
java.io.FileNotFoundException: text.vectors (The system cannot find the file spe
cified)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(Unknown Source)
at cc.mallet.types.InstanceList.load(InstanceList.java:787)
at cc.mallet.classify.tui.Vectors2Classify.main(Vectors2Classify.java:26
2)
Exception in thread "main" java.lang.IllegalArgumentException: Couldn't read Ins
tanceList from file text.vectors
at cc.mallet.types.InstanceList.load(InstanceList.java:794)
at cc.mallet.classify.tui.Vectors2Classify.main(Vectors2Classify.java:26
2)
C:\mallet\bin>

--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
REPORT NO.2:
The number of iterations between printing a brief summary of the topics so far
.
Default is 50
--output-model-interval INTEGER
The number of iterations between writing the model (and its Gibbs sampling sta
te) to a binary file. You must also set the --output-model to use this option,
whose argument will be the prefix of the filenames.
Default is 0
--output-state-interval INTEGER
The number of iterations between writing the sampling state to a text file. Y
ou must also set the --output-state to use this option, whose argument will be t
he prefix of the filenames.
Default is 0
--optimize-interval INTEGER
The number of iterations between reestimating dirichlet hyperparameters.
Default is 0
--optimize-burn-in INTEGER
The number of iterations to run before first estimating dirichlet hyperparamet
ers.
Default is 200
--use-symmetric-alpha true|false
Only optimize the concentration parameter of the prior over document-topic dis
tributions. This may reduce the number of very small, poorly estimated topics, b
ut may disperse common words over several topics.
Default is false
--use-ngrams true|false
Rather than using LDA, use Topical-N-Grams, which models phrases.
Default is false
--use-pam true|false
Rather than using LDA, use Pachinko Allocation Model, which models topical cor
relations.You cannot do this and also --use-ngrams.
Default is false
--alpha DECIMAL
Alpha parameter: smoothing over topic distribution.
Default is 50.0
--beta DECIMAL
Beta parameter: smoothing over unigram distribution.
Default is 0.01
--gamma DECIMAL
Gamma parameter: smoothing over bigram distribution
Default is 0.01
--delta DECIMAL
Delta parameter: smoothing over choice of unigram/bigram
Default is 0.03
--delta1 DECIMAL
Topic N-gram smoothing parameter
Default is 0.2
--delta2 DECIMAL
Topic N-gram smoothing parameter
Default is 1000.0
--pam-num-supertopics INTEGER
When using the Pachinko Allocation Model (PAM) set the number of supertopics.
Typically this is about half the number of subtopics, although more may help.
Default is 10
--pam-num-subtopics INTEGER
When using the Pachinko Allocation Model (PAM) set the number of subtopics.
Default is 20
Exception in thread "main" java.lang.IllegalArgumentException: Unrecognized opti
on 2: --keep-sequence
at cc.mallet.util.CommandOption$List.process(CommandOption.java:344)
at cc.mallet.util.CommandOption.process(CommandOption.java:146)
at cc.mallet.topics.tui.Vectors2Topics.main(Vectors2Topics.java:200)
C:\mallet\bin>dir
Volume in drive C is Acer
Volume Serial Number is 7A35-B119

Directory of C:\mallet\bin

05/17/2013 01:20 AM <DIR> .
05/17/2013 01:20 AM <DIR> ..
09/02/2011 12:50 PM 635 classifier2info
09/02/2011 12:50 PM 632 csv2classify
09/02/2011 12:50 PM 631 csv2vectors
09/02/2011 12:50 PM 2,347 mallet
09/02/2011 12:50 PM 2,471 mallet.bat
09/02/2011 12:50 PM 1,771 mallethon
05/17/2013 01:19 AM 85 mydata.txt
05/17/2013 01:20 AM 7,379 output.mallet
09/02/2011 12:50 PM 63 prepend-license.sh
09/02/2011 12:50 PM 636 svmlight2vectors
09/02/2011 12:50 PM 633 text2classify
09/02/2011 12:50 PM 632 text2vectors
09/02/2011 12:50 PM 636 vectors2classify
09/02/2011 12:50 PM 632 vectors2info
09/02/2011 12:50 PM 631 vectors2topics
09/02/2011 12:50 PM 635 vectors2vectors
16 File(s) 20,449 bytes
2 Dir(s) 415,176,773,632 bytes free

C:\mallet\bin>text2vectors --input output.mallet --output x1.vectors
'text2vectors' is not recognized as an internal or external command,
operable program or batch file.

C:\mallet\bin>text2vectors
'text2vectors' is not recognized as an internal or external command,
operable program or batch file.

C:\mallet\bin>mallet
Mallet 2.0 commands:
import-dir load the contents of a directory into mallet instances (one
per file)
import-file load a single file into mallet instances (one per line)
import-svmlight load a single SVMLight format data file into mallet instance
s (one per line)
train-classifier train a classifier from Mallet data files
train-topics train a topic model from Mallet data files
infer-topics use a trained topic model to infer topics for new documents
estimate-topics estimate the probability of new documents given a trained mo
del
hlda train a topic model using Hierarchical LDA
prune remove features based on frequency or information gain
split divide data into testing, training, and validation portions
Include --help with any option for more information

C:\mallet\bin>mallet train-topics --input output.mallet --output x1.mallet
A tool for estimating, saving and printing diagnostics for topic models, such as
LDA.
--help TRUE|FALSE
Print this command line option usage information. Give argument of TRUE for l
onger documentation
Default is false
--prefix-code 'JAVA CODE'
Java code you want run before any other interpreted code. Note that the text
is interpreted without modification, so unlike some other Java code options, you
need to include any necessary 'new's when creating objects.
Default is null
--config FILE
Read command option values from a file
Default is null
--input FILENAME
The filename from which to read the list of training instances. Use - for std
in. The instances must be FeatureSequence or FeatureSequenceWithBigrams, not Fe
atureVector
Default is null
--language-inputs FILENAME [FILENAME ...]
Filenames for polylingual topic model. Each language should have its own file,
with the same number of instances in each file. If a document is missing in one
language, there should be an empty instance.
Default is (null)
--testing FILENAME
The filename from which to read the list of instances for empirical likelihood
calculation. Use - for stdin. The instances must be FeatureSequence or Featur
eSequenceWithBigrams, not FeatureVector
Default is null
--output-model FILENAME
The filename in which to write the binary topic model at the end of the iterat
ions. By default this is null, indicating that no file will be written.
Default is null
--input-model FILENAME
The filename from which to read the binary topic model to which the --input wi
ll be appended, allowing incremental training. By default this is null, indicat
ing that no file will be read.
Default is null
--inferencer-filename FILENAME
A topic inferencer applies a previously trained topic model to new documents.
By default this is null, indicating that no file will be written.
Default is null
--evaluator-filename FILENAME
A held-out likelihood evaluator for new documents. By default this is null, i
ndicating that no file will be written.
Default is null
--output-state FILENAME
The filename in which to write the Gibbs sampling state after at the end of th
e iterations. By default this is null, indicating that no file will be written.

Default is null
--output-topic-keys FILENAME
The filename in which to write the top words for each topic and any Dirichlet
parameters. By default this is null, indicating that no file will be written.
Default is null
--topic-word-weights-file FILENAME
The filename in which to write unnormalized weights for every topic and word t
ype. By default this is null, indicating that no file will be written.
Default is null
--word-topic-counts-file FILENAME
The filename in which to write a sparse representation of topic-word assignmen
ts. By default this is null, indicating that no file will be written.
Default is null
--xml-topic-report FILENAME
The filename in which to write the top words for each topic and any Dirichlet
parameters in XML format. By default this is null, indicating that no file will
be written.
Default is null
--xml-topic-phrase-report FILENAME
The filename in which to write the top words and phrases for each topic and an
y Dirichlet parameters in XML format. By default this is null, indicating that
no file will be written.
Default is null
--output-doc-topics FILENAME
The filename in which to write the topic proportions per document, at the end
of the iterations. By default this is null, indicating that no file will be wri
tten.
Default is null
--doc-topics-threshold DECIMAL
When writing topic proportions per document with --output-doc-topics, do not p
rint topics with proportions less than this threshold value.
Default is 0.0
--doc-topics-max INTEGER
When writing topic proportions per document with --output-doc-topics, do not p
rint more than INTEGER number of topics. A negative value indicates that all to
pics should be printed.
Default is -1
--num-topics INTEGER
The number of topics to fit.
Default is 10
--num-threads INTEGER
The number of threads for parallel training.
Default is 1
--num-iterations INTEGER
The number of iterations of Gibbs sampling.
Default is 1000
--random-seed INTEGER
The random seed for the Gibbs sampler. Default is 0, which will use the clock
.
Default is 0
--num-top-words INTEGER
The number of most probable words to print for each topic after model estimati
on.
Default is 20
--show-topics-interval INTEGER
The number of iterations between printing a brief summary of the topics so far
.
Default is 50
--output-model-interval INTEGER
The number of iterations between writing the model (and its Gibbs sampling sta
te) to a binary file. You must also set the --output-model to use this option,
whose argument will be the prefix of the filenames.
Default is 0
--output-state-interval INTEGER
The number of iterations between writing the sampling state to a text file. Y
ou must also set the --output-state to use this option, whose argument will be t
he prefix of the filenames.
Default is 0
--optimize-interval INTEGER
The number of iterations between reestimating dirichlet hyperparameters.
Default is 0
--optimize-burn-in INTEGER
The number of iterations to run before first estimating dirichlet hyperparamet
ers.
Default is 200
--use-symmetric-alpha true|false
Only optimize the concentration parameter of the prior over document-topic dis
tributions. This may reduce the number of very small, poorly estimated topics, b
ut may disperse common words over several topics.
Default is false
--use-ngrams true|false
Rather than using LDA, use Topical-N-Grams, which models phrases.
Default is false
--use-pam true|false
Rather than using LDA, use Pachinko Allocation Model, which models topical cor
relations.You cannot do this and also --use-ngrams.
Default is false
--alpha DECIMAL
Alpha parameter: smoothing over topic distribution.
Default is 50.0
--beta DECIMAL
Beta parameter: smoothing over unigram distribution.
Default is 0.01
--gamma DECIMAL
Gamma parameter: smoothing over bigram distribution
Default is 0.01
--delta DECIMAL
Delta parameter: smoothing over choice of unigram/bigram
Default is 0.03
--delta1 DECIMAL
Topic N-gram smoothing parameter
Default is 0.2
--delta2 DECIMAL
Topic N-gram smoothing parameter
Default is 1000.0
--pam-num-supertopics INTEGER
When using the Pachinko Allocation Model (PAM) set the number of supertopics.
Typically this is about half the number of subtopics, although more may help.
Default is 10
--pam-num-subtopics INTEGER
When using the Pachinko Allocation Model (PAM) set the number of subtopics.
Default is 20
Exception in thread "main" java.lang.IllegalArgumentException: Unrecognized opti
on 2: --output
at cc.mallet.util.CommandOption$List.process(CommandOption.java:344)
at cc.mallet.util.CommandOption.process(CommandOption.java:146)
at cc.mallet.topics.tui.Vectors2Topics.main(Vectors2Topics.java:200)
C:\mallet\bin>mallet --input output.mallet --trainer NaiveBayes
Mallet 2.0 commands:
import-dir load the contents of a directory into mallet instances (one
per file)
import-file load a single file into mallet instances (one per line)
import-svmlight load a single SVMLight format data file into mallet instance
s (one per line)
train-classifier train a classifier from Mallet data files
train-topics train a topic model from Mallet data files
infer-topics use a trained topic model to infer topics for new documents
estimate-topics estimate the probability of new documents given a trained mo
del
hlda train a topic model using Hierarchical LDA
prune remove features based on frequency or information gain
split divide data into testing, training, and validation portions
Include --help with any option for more information

C:\mallet\bin>

Regards,
Subhabrata.

subhaba...@gmail.com

unread,
May 17, 2013, 5:51:23 PM5/17/13
to
On Monday, May 13, 2013 1:10:31 AM UTC+5:30, subhaba...@gmail.com wrote:
> Dear Room,
>
>
>
> I was trying to learn Apache Ant.
>
>
>
> I got the following information.
>
>
>
> i)Ant is a build tool, it helps to create .exe file.
>
> ii) Compiling is a subtask of building.
>
>
>
> Now,
>
> I am confused with few questions.
>
>
>
> I was exploring the "Ant build" in Eclipse.
>
>
>
> I could create one "build.xml" and could run successfully.
>
>
>
> The questions are:
>
> i) May I have to write the the "build.xml" or a build file everytime I want to build a project? Can't it be done automatic, means the generation of the .xml file?
>
>
>
> ii) After the "build.xml" gives report like,
>
>
>
> Hello:
>
> [echo] Hello
>
> BUILD SUCCESSFUL
>
> Total time: 477 milliseconds
>
>
>
> Where may I find .exe file? And how should I use it?
>
>
>
> If any one of the learned members can kindly suggest?
>
>
>
> Regards,
>
> Subhabrata.

Dear Group,

After lot of experiments and web surf, I could get the results.

C:\mallet\bin>mallet train-classifier --input output.mallet --output-classifier
my.classifier
Training portion = 1.0
Unlabeled training sub-portion = 0.0
Validation portion = 0.0
Testing portion = 0.0

-------------------- Trial 0 --------------------

Trial 0 Training NaiveBayesTrainer with 1 instances
Trial 0 Training NaiveBayesTrainer finished
Trial 0 Trainer NaiveBayesTrainer training data accuracy= 1.0
Trial 0 Trainer NaiveBayesTrainer Test Data Confusion Matrix
Trial 0 Trainer NaiveBayesTrainer test data accuracy= NaN

NaiveBayesTrainer
Summary. train accuracy mean = 1.0 stddev = 0.0 stderr = 0.0
Summary. test accuracy mean = NaN stddev = NaN stderr = NaN
C:\mallet\bin>
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.

C:\Users\subhabrata>cd\

C:\>cd mallet

C:\mallet>cd bin

C:\mallet\bin>mallet train-classifier --input revised.mallet --output-classifier
mine.classifer
Training portion = 1.0
Unlabeled training sub-portion = 0.0
Validation portion = 0.0
Testing portion = 0.0

-------------------- Trial 0 --------------------

Trial 0 Training NaiveBayesTrainer with 21 instances
Trial 0 Training NaiveBayesTrainer finished
Trial 0 Trainer NaiveBayesTrainer training data accuracy= 0.5238095238095238
Trial 0 Trainer NaiveBayesTrainer Test Data Confusion Matrix
Trial 0 Trainer NaiveBayesTrainer test data accuracy= NaN

NaiveBayesTrainer
Summary. train accuracy mean = 0.5238095238095238 stddev = 0.0 stderr = 0.0
Summary. test accuracy mean = NaN stddev = NaN stderr = NaN
C:\mallet\bin>
Microsoft Windows [Version 6.1.7601]

C:\mallet\bin>mallet train-classifier --input revised.mallet --training-portion
0.9
Training portion = 0.9
Unlabeled training sub-portion = 0.0
Validation portion = 0.0
Testing portion = 0.09999999999999998

-------------------- Trial 0 --------------------

Trial 0 Training NaiveBayesTrainer with 19 instances
Trial 0 Training NaiveBayesTrainer finished
Trial 0 Trainer NaiveBayesTrainer training data accuracy= 0.5789473684210527
Trial 0 Trainer NaiveBayesTrainer Test Data Confusion Matrix
Confusion Matrix, row=true, column=predicted accuracy=0.0
label 0 1 2 3 4 5 6 7 8 9 10 11 |total
0 plot . . . . . . . . . . . . |0
1 Chauhan, . . . . . . . . . . . . |0
2 2 . . . . . . . . . . . |2
3 DELHI: . . . . . . . . . . . . |0
4 It's . . . . . . . . . . . . |0
5 A . . . . . . . . . . . . |0
6 "Pichle . . . . . . . . . . . . |0
7 all . . . . . . . . . . . . |0
8 Another . . . . . . . . . . . . |0
9 However . . . . . . . . . . . . |0
10 While . . . . . . . . . . . . |0
11 On . . . . . . . . . . . . |0

Trial 0 Trainer NaiveBayesTrainer test data accuracy= 0.0

NaiveBayesTrainer
Summary. train accuracy mean = 0.5789473684210527 stddev = 0.0 stderr = 0.0
Summary. test accuracy mean = 0.0 stddev = 0.0 stderr = 0.

C:\mallet\bin>mallet train-classifier --input revised.mallet --output-classifier
newly.classifier --trainer MaxEnt
Training portion = 1.0
Unlabeled training sub-portion = 0.0
Validation portion = 0.0
Testing portion = 0.0

-------------------- Trial 0 --------------------

Trial 0 Training MaxEntTrainer,gaussianPriorVariance=1.0 with 21 instances
Value (labelProb=52.18303964554802 prior=0.0) loglikelihood = -52.18303964554802
Value (labelProb=35.07842643418387 prior=0.5000000000000047) loglikelihood = -35
Value (labelProb=11.041269237873143 prior=7.57975726871467) loglikelihood = -18.
Value (labelProb=8.845302279528045 prior=8.283595234589693) loglikelihood = -17.
Value (labelProb=7.684014543706313 prior=8.67398223273065) loglikelihood = -16.3
Value (labelProb=7.620229834138587 prior=8.637738965621395) loglikelihood = -16.
Value (labelProb=7.6930087796076805 prior=8.55144842287889) loglikelihood = -16.
Value (labelProb=7.721825299388809 prior=8.520013417234695) loglikelihood = -16.
Value (labelProb=7.710910984716437 prior=8.529963512671845) loglikelihood = -16.
240874497388283
Exiting L-BFGS on termination #1:
value difference below tolerance (oldValue: -16.241838716623505 newValue: -16.24
0874497388283
Value (labelProb=8.706998275573689 prior=10.051741121362099) loglikelihood = -18
Value (labelProb=7.624790808427014 prior=8.637141273540822) loglikelihood = -16.
Value (labelProb=7.700549530911232 prior=8.540231288758795) loglikelihood = -16.
Value (labelProb=7.700990051603592 prior=8.539733279705375) loglikelihood = -16.
240723331308967
Exiting L-BFGS on termination #1:
value difference below tolerance (oldValue: -16.24078081967003 newValue: -16.240
723331308967

Trial 0 Training MaxEntTrainer,gaussianPriorVariance=1.0 finished
Trial 0 Trainer MaxEntTrainer,gaussianPriorVariance=1.0 training data accuracy=
0.9523809523809523
Trial 0 Trainer MaxEntTrainer,gaussianPriorVariance=1.0 Test Data Confusion Matr
ix
Trial 0 Trainer MaxEntTrainer,gaussianPriorVariance=1.0 test data accuracy= NaN

MaxEntTrainer,gaussianPriorVariance=1.0
Summary. train accuracy mean = 0.9523809523809523 stddev = 0.0 stderr = 0.0
Summary. test accuracy mean = NaN stddev = NaN stderr = NaN
C:\mallet\bin>

THANKS FOR PULLING ME UP. I ENJOYED.

Regards,
Subhabrata.

0 new messages