forked from ceteri/textrank
-
Notifications
You must be signed in to change notification settings - Fork 5
/
build.xml
182 lines (162 loc) · 2.98 KB
/
build.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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
<?xml version="1.0" encoding="UTF-8"?>
<project
name="textrank"
default="run"
basedir="."
>
<description>
Ant build script for
Open source Java implementation of the TextRank algorithm by Mihalcea, et al.
http://lit.csci.unt.edu/index.php/Graph-based_NLP
Paco NATHAN paco@sharethis.com
http://github.com/sharethis/textrank/
</description>
<!-- property settings -->
<property
name="src.dir"
location="${basedir}"
/>
<property
name="lib.dir"
location="${basedir}/lib"
/>
<property
name="build.dir"
location="${basedir}/classes"
/>
<property
name="res.dir"
location="${basedir}/res"
/>
<property
name="docs.dir"
location="${basedir}/docs/api"
/>
<property
name="text.data"
location="${basedir}/data.txt"
/>
<property
name="app.jar"
location="${basedir}/textrank.jar"
/>
<!-- classpath definitions -->
<path
id="base.path"
>
</path>
<path
id="compile.classpath"
>
<path
refid="base.path"
/>
<pathelement
path="${src.dir}"
/>
<fileset dir="${lib.dir}">
<include name="*.jar"/>
</fileset>
<pathelement
path="${basedir}"
/>
</path>
<path
id="build.classpath"
>
<pathelement
location="${build.dir}"
/>
<fileset dir="${lib.dir}">
<include name="*.jar"/>
</fileset>
</path>
<!--
######################################################################
target definitions:
lifecycle tasks - clean, compile, commit, etc.
######################################################################
-->
<target
name="clean"
description="remove temporary files"
>
<defaultexcludes remove="**/*~"/>
<delete>
<fileset dir=".">
<include name="**/*~"/>
</fileset>
</delete>
<delete dir="${build.dir}"/>
<delete file="${app.jar}"/>
<delete dir="${docs.dir}"/>
<delete file="${basedir}/graph.tsv"/>
</target>
<target
name="compile"
description="compile all Java classes"
depends="clean"
>
<mkdir dir="${build.dir}"/>
<javac
classpathref="build.classpath"
destdir="${build.dir}"
debug="on"
deprecation="on"
>
<compilerarg value="-Xlint:unchecked"/>
<src path="${src.dir}"/>
</javac>
</target>
<target
name="jar"
description="build a JAR"
depends="compile"
>
<jar
destfile="${app.jar}"
basedir="${build.dir}"
>
<manifest>
<attribute name="Main-Class" value="com.sharethis.textrank.TextRank"/>
</manifest>
</jar>
</target>
<target
name="run"
description="run the algorithm on a text document"
depends="compile"
>
<property
name="data.file"
location="${basedir}/test/good.txt"
/>
<property
name="lang.code"
value="en"
/>
<property
name="graph.file"
location="${basedir}/graph.tsv"
/>
<java
classname="com.sharethis.textrank.TextRank"
fork="true"
>
<classpath>
<pathelement location="${build.dir}"/>
<!-- Project classes and tests -->
<path refid="compile.classpath"/>
<!-- All jars -->
</classpath>
<!--
<sysproperty key="nlp.resources" value="${res.dir}"/>
-->
<arg value="${res.dir}/log4j.properties"/>
<arg value="${res.dir}"/>
<arg value="${lang.code}"/>
<arg value="${data.file}"/>
<arg value="${graph.file}"/>
</java>
</target>
</project>