This repository has been archived by the owner on Jul 3, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.xml
executable file
·160 lines (143 loc) · 5.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
<project name="reconcile-hbase-annotations" default="compile" basedir="." >
<description>Code to interact with hbase</description>
<property name="antMavenBuildDir" value="../ant-maven-build"/>
<import file="${antMavenBuildDir}/build.xml"/>
<!-- =================================================================== -->
<!-- run targets -->
<!-- =================================================================== -->
<!-- =================================================================== -->
<!-- m/r query tasks -->
<!-- =================================================================== -->
<target name="checkAnnotations" depends="jars" description="check annotation strings. params: src">
<exec executable="${hadoop}" spawn="false">
<arg value="jar" />
<arg value="${depJarFile}" />
<arg value="reconcile.hbase.mapreduce.annotation.AnnotationChecker" />
<arg value="-table=${table}" />
<arg value="-source=${src}" />
</exec>
</target>
<target name="stripBadAnnotations" depends="jars" description="strip bad annotation strings. params: src">
<exec executable="${hadoop}" spawn="false">
<arg value="jar" />
<arg value="${depJarFile}" />
<arg value="reconcile.hbase.mapreduce.annotation.BadAnnotationStripper" />
<arg value="-source=${src}" />
</exec>
</target>
<!-- ======================================================= -->
<!-- annotation tasks -->
<!-- ======================================================= -->
<target name="baseAnnot" depends="hadoopJar" description="execute base NLP annotations over entire doc table">
<echo>Filter Source : ${src}</echo>
<echo>Filter HDFS Key List File : ${keyList}</echo>
<exec executable="${hadoop}" spawn="false">
<arg value="jar" />
<arg value="${hadoopJarFile}" />
<arg value="reconcile.hbase.mapreduce.annotation.BaseReconcileAnnotation" />
<arg value="-source=${src}"/>
<arg value="-keyList=${keyList}" />
</exec>
<sleep seconds="10" />
<exec executable="${hadoop}">
<arg value="job" />
<arg value="-list" />
</exec>
</target>
<target name="parAnnot" depends="hadoopJar" description="paragraph annotations over entire doc table">
<exec executable="${hadoop}" spawn="false">
<arg value="jar" />
<arg value="${hadoopJarFile}" />
<arg value="trinidad.hbase.mapreduce.annotation.ParagraphAnnotation" />
</exec>
</target>
<target name="sentAnnot" depends="hadoopJar" description="sentence annotations over entire doc table">
<exec executable="${hadoop}" spawn="false">
<arg value="jar" />
<arg value="${hadoopJarFile}" />
<arg value="trinidad.hbase.mapreduce.annotation.SentenceAnnotation" />
</exec>
</target>
<target name="tokenAnnot" depends="hadoopJar" description="token annotations over entire doc table">
<exec executable="${hadoop}" spawn="false">
<arg value="jar" />
<arg value="${hadoopJarFile}" />
<arg value="trinidad.hbase.mapreduce.annotation.TokenAnnotation" />
</exec>
</target>
<target name="posAnnot" depends="hadoopJar" description="POS annotations over entire doc table">
<exec executable="${hadoop}" spawn="false">
<arg value="jar" />
<arg value="${hadoopJarFile}" />
<arg value="trinidad.hbase.mapreduce.annotation.POSAnnotation" />
</exec>
</target>
<target name="neAnnot" depends="hadoopJar" description="execute named entity annotations over doc table">
<echo>Filter Source : ${src}</echo>
<echo>Filter HDFS Key List File : ${keyList}</echo>
<exec executable="${hadoop}" spawn="false">
<arg value="jar" />
<arg value="${hadoopJarFile}" />
<arg value="reconcile.hbase.mapreduce.annotation.NEAnnotation" />
<arg value="-source=${src}"/>
<arg value="-keyList=${keyList}" />
</exec>
</target>
<target name="parserAnnot" depends="hadoopJar" description="execute parser annotations over doc table ">
<exec executable="${hadoop}" spawn="false">
<arg value="jar" />
<arg value="${hadoopJarFile}" />
<arg value="reconcile.hbase.mapreduce.annotation.ParserAnnotation" />
<arg value="-source=${src}" />
<arg value="-keyList=${keyList}" />
</exec>
</target>
<target name="bnpAnnot" depends="hadoopJar" description="execute base NP annotations over doc table ">
<exec executable="${hadoop}" spawn="false">
<arg value="jar" />
<arg value="${hadoopJarFile}" />
<arg value="reconcile.hbase.mapreduce.annotation.BaseNPAnnotation" />
<arg value="-source=${src}" />
<arg value="-keyList=${keyList}" />
</exec>
</target>
<target name="corefAnnot" depends="hadoopJar" description="execute coref annotations over doc table ">
<exec executable="${hadoop}" spawn="false">
<arg value="jar" />
<arg value="${hadoopJarFile}" />
<arg value="reconcile.hbase.mapreduce.annotation.CorefResolver" />
<arg value="-source=${src}" />
<arg value="-keyList=${keyList}" />
</exec>
</target>
<target name="corefPairs" depends="hadoopJar" description="execute coref pair annotations over doc table ">
<exec executable="${hadoop}" spawn="false">
<arg value="jar" />
<arg value="${hadoopJarFile}" />
<arg value="reconcile.hbase.mapreduce.annotation.CorefPairs" />
<arg value="-source=${src}" />
<arg value="-keyList=${keyList}" />
</exec>
</target>
<target name="annotate" depends="hadoopJar" description="Run all neccessary annotators">
<echo>Source name: ${src}</echo>
<echo>Key List File: ${keyList}</echo>
<antcall target="baseAnnot"/>
<antcall target="neAnnot"/>
<antcall target="parserAnnot"/>
<antcall target="bnpAnnot"/>
<antcall target="corefPairs"/>
</target>
<target name="printNPs" depends="hadoopJar" description="print the different types of treebank tag counts">
<exec executable="${hadoop}" spawn="false">
<arg value="jar" />
<arg value="${hadoopJarFile}" />
<arg value="reconcile.hbase.mapreduce.GenericMapper" />
<arg value="-source=${src}" />
<arg value="-keyList=${keyList}" />
<arg value="-family=annotations" />
<arg value="-family=text" />
<arg value="-mapper=reconcile.hbase.mapper.PrintNPs" />
</exec>
</target>
</project>