Skip to content

Commit

Permalink
Lucene chapter examples - use Ant to unpack 20 Newsgroups tgz
Browse files Browse the repository at this point in the history
  • Loading branch information
mitzimorris committed Dec 9, 2013
1 parent e8336e6 commit 9d92ebf
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions src/applucene/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,6 @@
</java>
</target>


<property name="train.dir"
value="../../data/20news-bydate-train"/>
<property name="test.dir"
Expand All @@ -118,7 +117,7 @@
<property name="analyzer"
value="lc"/>
<target name="classify"
depends="jar">
depends="jar, gunzip-news">
<java classname="com.colloquial.applucene.ClassifyNewsgroups"
classpathref="classpath"
fork="true">
Expand All @@ -129,5 +128,22 @@
</java>
</target>

<property name="20news.tgz"
value="../../data/20news-bydate.tar.gz"/>
<target name="gunzip-news" depends="check-tgz" if="20news-needs-unpacked">
<untar src="${20news.tgz}"
dest="../../data"
compression="gzip" />
</target>

<property name="20news-data"
value="../../data/20news-bydate-train"/>
<target name="check-tgz">
<condition property="20news-needs-unpacked">
<not>
<available file="${20news-data}" type="dir"/>
</not>
</condition>
</target>

</project>

0 comments on commit 9d92ebf

Please sign in to comment.