-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
executable file
·238 lines (195 loc) · 6.7 KB
/
Makefile
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
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
#****************************************************************
#
# Makefile
#
# Yue Zhang
# Computing lab, Oxford. 2006.10 - 2008.2
#
#****************************************************************
# Makable targe systems include:
#
# === Chinese ===
# segmentor - Chinese word segmentor
# chinese.postagger - Chinese POS tagger (joint / single)
# chinese.depparser - Chinese dependency parser
#
# === English ===
# english.postagger - English POS tagger
# english.depparser - English dependency parser
#================================================================
#
# Configurations
#
#================================================================
# choose between agenda, agendachart etc ## NO SPACE AFTER NAME ###
#
# agenda: the single agenda method - reproduce paper
# agendaplus: try to improve upon the decoding algorithm of agenda
# viterbi: dynamic programming
SEGMENTOR_IMPL = agenda
# Chinese postagger implementations
#
# joint taggers include the following implementations
# agendachart: combining agenda and chart, this is the best system - reproduce paper
#
# taggers on segmented sentences include the following implementations
# segmented: the unidirectional trigram tagger
CHINESE_TAGGER_IMPL = agenda
# Chinese dependency parser
#
# currently support eisner, covington, nivre, combined and joint implementations
CHINESE_DEPPARSER_IMPL = arceager
CHINESE_DEPPARSER_LABELED = true
CHINESE_DEPLABELER_IMPL = naive
# currently support sr implementations
CHINESE_CONPARSER_IMPL = jcad
# currently support only agenda
ENGLISH_TAGGER_IMPL = collins
# currently support eisner, covington, nivre, combined implementations
ENGLISH_DEPPARSER_IMPL =arceager
ENGLISH_DEPPARSER_LABELED = true
ENGLISH_DEPLABELER_IMPL = naive
# currently support sr implementations
ENGLISH_CONPARSER_IMPL = muhua
#================================================================
#
# Debug mode or the run mode (empty)
#
#================================================================
#DEBUG = -DDEBUG -g -O0
DEBUG = -DNDEBUG -O3
#================================================================
#
# directory configurations
#
#================================================================
BASE_DIR = .
include Makefile.common
#================================================================
#
# compiler commands
#
#================================================================
INCLUDES = -I$(SRC_INCLUDES)
CXX = g++
CXXFLAGS = -std=c++11 -Wall -Wextra -Werror -pedantic -ffast-math -mmmx -msse -msse3 -mssse3 -msse4.2 -mavx -Wno-sign-compare -Wno-strict-aliasing -Wno-unused-function -Wno-unused-parameter $(INCLUDES) $(DEBUG)
LD = $(CXX)
LDFLAGS = -pthread -ltcmalloc -lprofiler -llzma -lschwa -ffast-math -mmmx -msse -msse3 -mssse3 -msse4.2 -mavx
#================================================================
#
# Shared objects
#
#================================================================
# the objects
LINGUISTICS_OBJECTS = $(OBJECT_DIR)/linguistics/lemma.o $(OBJECT_DIR)/linguistics/conll.o
OBJECTS = $(OBJECT_DIR)/reader.o $(OBJECT_DIR)/writer.o $(OBJECT_DIR)/options.o $(LINGUISTICS_OBJECTS)
$(OBJECT_DIR)/%.o: $(SRC_LIBS)/%.cpp $(SRC_INCLUDES)/%.h
mkdir -p $(OBJECT_DIR)
mkdir -p $(OBJECT_DIR)/linguistics
$(CXX) $(CXXFLAGS) -c $< -o $@
all: english.depparser
# the directories
$(OBJECT_DIR):
mkdir -p $(OBJECT_DIR)
$(DIST_DIR):
mkdir -p $(DIST_DIR)
# tagger
SRC_TAGGER = $(SRC_CHINESE)/tagger
DIST_TAGGER = $(DIST_DIR)/chinese.postagger
OBJECT_TAGGER = $(OBJECT_DIR)/chinese.postagger
$(DIST_TAGGER):
mkdir $(DIST_TAGGER)
$(OBJECT_TAGGER):
mkdir $(OBJECT_TAGGER)
SRC_ENGLISH_TAGGER = $(SRC_COMMON)/tagger
DIST_ENGLISH_TAGGER = $(DIST_DIR)/english.postagger
OBJECT_ENGLISH_TAGGER = $(OBJECT_DIR)/english.postagger
$(DIST_ENGLISH_TAGGER):
mkdir $(DIST_ENGLISH_TAGGER)
$(OBJECT_ENGLISH_TAGGER):
mkdir $(OBJECT_ENGLISH_TAGGER)
# depparser
SRC_COMMON_DEPPARSER = $(SRC_COMMON)/depparser
#ifeq ($(CHINESE_DEPPARSER_IMPL), joint)
# SRC_CHINESE_DEPPARSER = $(SRC_CHINESE)/depparser
#else
# SRC_CHINESE_DEPPARSER = $(SRC_COMMON_DEPPARSER)
#endif
SRC_CHINESE_DEPPARSER = $(SRC_COMMON_DEPPARSER)
DIST_DEPPARSER = $(DIST_DIR)/chinese.depparser
OBJECT_DEPPARSER = $(OBJECT_DIR)/chinese.depparser
DIST_ENGLISH_DEPPARSER = $(DIST_DIR)/english.depparser
OBJECT_ENGLISH_DEPPARSER = $(OBJECT_DIR)/english.depparser
# deplabeler
SRC_COMMON_DEPLABELER = $(SRC_COMMON)/deplabeler
SRC_CHINESE_DEPLABELER = $(SRC_COMMON_DEPLABELER)
DIST_DEPLABELER = $(DIST_DIR)/chinese.deplabeler
OBJECT_DEPLABELER = $(OBJECT_DIR)/chinese.deplabeler
SRC_ENGLISH_DEPLABELER = $(SRC_COMMON_DEPLABELER)
DIST_ENGLISH_DEPLABELER = $(DIST_DIR)/english.deplabeler
OBJECT_ENGLISH_DEPLABELER = $(OBJECT_DIR)/english.deplabeler
# conparser
SRC_COMMON_CONPARSER = $(SRC_COMMON)/conparser
SRC_CHINESE_CONPARSER = $(SRC_COMMON_CONPARSER)
ifeq ($(CHINESE_CONPARSER_IMPL), jcad)
SRC_CHINESE_CONPARSER = $(SRC_CHINESE)/conparser
else
SRC_CHINESE_CONPARSER = $(SRC_COMMON_CONPARSER)
endif
SRC_ENGLISH_CONPARSER = $(SRC_COMMON_CONPARSER)
DIST_CONPARSER = $(DIST_DIR)/chinese.conparser
OBJECT_CONPARSER = $(OBJECT_DIR)/chinese.conparser
DIST_ENGLISH_CONPARSER = $(DIST_DIR)/english.conparser
OBJECT_ENGLISH_CONPARSER = $(OBJECT_DIR)/english.conparser
#----------------------------------------------------------------
#
# zpar general
#
#----------------------------------------------------------------
include Makefile.zpar
include Makefile.zpar.en
include Makefile.zpar.ge
#----------------------------------------------------------------
#
# The sentence boundary detector
#
#----------------------------------------------------------------
include Makefile.doc2snt
#----------------------------------------------------------------
#
# The segmentor
#
#----------------------------------------------------------------
include Makefile.segmentor
#----------------------------------------------------------------
#
# The pos taggers (Chinese and English)
#
#----------------------------------------------------------------
include Makefile.postagger
#----------------------------------------------------------------
#
# The depparsers (Chinese and English)
#
#----------------------------------------------------------------
include Makefile.depparser
include Makefile.deplabeler
#----------------------------------------------------------------
#
# The conparser
#
#----------------------------------------------------------------
include Makefile.conparser
#----------------------------------------------------------------
#
# The ccgparser
#
#----------------------------------------------------------------
include Makefile.ccg
#----------------------------------------------------------------
#
# Miscelaneous
#
#----------------------------------------------------------------
include Makefile.misc
#include Makefile.rr