-
Notifications
You must be signed in to change notification settings - Fork 35
/
text_annotator.xml
89 lines (79 loc) · 3.27 KB
/
text_annotator.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
<project name="TextAnnotator" default="all" basedir=".">
<description>
Annotate texts, including tokenization, part-of-speech tagging, named entity extraction, coreference
</description>
<property name="src.dir" value="src"/>
<property name="build.dir" value="build"/>
<property name="classes.dir" value="${build.dir}/classes"/>
<property name="jar.dir" value="${build.dir}/jar"/>
<property name="lib.dir" value="lib"/>
<!--allocate the memory here -->
<property name="memory.initial.param" value="-Xms512M"/>
<property name="memory.max.param" value="-Xmx1024M"/>
<property name="data.dir" value="data"/>
<property name="annotation.data.dir" value="data/annotation"/>
<property name="main-class" value="com.articulate.sigma.TextAnnotator"/>
<!-- download all the required jars -->
<get dest="${lib.dir}">
<url url="http://repo1.maven.org/maven2/edu/stanford/nlp/stanford-corenlp/1.3.0/stanford-corenlp-1.3.0-models.jar"/>
<url url="http://repo1.maven.org/maven2/edu/stanford/nlp/stanford-corenlp/1.3.0/stanford-corenlp-1.3.0.jar"/>
<url url="http://repo1.maven.org/maven2/net/sf/jung/jung-algorithms/2.0/jung-algorithms-2.0.jar"/>
<url url="http://repo1.maven.org/maven2/net/sf/jung/jung-api/2.0/jung-api-2.0.jar"/>
<url url="http://repo1.maven.org/maven2/net/sf/jung/jung-graph-impl/2.0/jung-graph-impl-2.0.jar"/>
<url url="http://repo1.maven.org/maven2/net/sourceforge/collections/collections-generic/4.01/collections-generic-4.01.jar"/>
<url url="http://repo1.maven.org/maven2/commons-collections/commons-collections/3.1/commons-collections-3.1.jar"/>
<url url="http://repo1.maven.org/maven2/joda-time/joda-time/2.1/joda-time-2.1.jar"/>
<url url="http://repo1.maven.org/maven2/de/jollyday/jollyday/0.4.6/jollyday-0.4.6.jar"/>
<url url="http://repo1.maven.org/maven2/xom/xom/1.1/xom-1.1.jar"/>
</get>
<!-- unzip the zipped text files -->
<unzip dest="${data.dir}">
<fileset dir="${data.dir}">
<include name="**/*.zip"/>
</fileset>
</unzip>
<!-- specify the classpath -->
<path id="classpath">
<fileset dir="${lib.dir}" includes="**/*.jar"/>
</path>
<target name="clean">
<delete dir="${build.dir}"/>
</target>
<!-- compile -->
<target name="compile">
<mkdir dir="${classes.dir}"/>
<mkdir dir="${data.dir}/annotation"/>
<javac srcdir="${src.dir}" destdir="${classes.dir}" classpathref="classpath"/>
</target>
<target name="jar" depends="compile">
<mkdir dir="${jar.dir}"/>
<jar destfile="${jar.dir}/${ant.project.name}.jar" basedir="${classes.dir}">
<manifest>
<attribute name="Main-Class" value="${main-class}"/>
</manifest>
</jar>
</target>
<!-- run the text annotation -->
<target name="run" depends="jar">
<java fork="true" classname="${main-class}">
<classpath>
<path refid="classpath"/>
<path location="${jar.dir}/${ant.project.name}.jar" />
</classpath>
<jvmarg value="${memory.initial.param}"/>
<jvmarg value="${memory.max.param}"/>
<arg value="${data.dir}/raw"/>
<arg value="${data.dir}/annotation"/>
</java>
</target>
<!--
<target name="check">
<pathconvert property="found" setonempty="false">
<fileset dir="${lib.dir}" includes="stanford*models.jar"/>
</pathconvert>
</target>
<target name="process" depends="check" if="found">
<echo> found the target file</echo>
</target>
-->
</project>