Skip to content

Commit fc094b3

Browse files
committed
continuation
1 parent c626a6e commit fc094b3

File tree

2 files changed

+9
-10
lines changed

2 files changed

+9
-10
lines changed

README.org

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
1-
* darc
2-
31
CoNLL 2017 Shared Task Team darc
42

53
- paper.pdf
64
- poster.pdf
75

8-
** darc
6+
* darc
97

108
transition-based labelled non-projective/projective parser with neural network classifier.
119

12-
** mstnn
10+
[[https://github.com/ysmiraak/darc][a continuation.]]
11+
12+
* mstnn
1313

1414
graph-based unlabelled non-projective parser with neural network classifier.
1515

16-
** labeler
16+
* labeler
1717

1818
with linear classifier.

darc/src_setup.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -245,8 +245,7 @@ def parse(self, model, sent):
245245
if 2 > len(config.stack):
246246
config.shift()
247247
continue
248-
prob = model.predict(self.feature(config), 1).ravel()
249-
for r in prob.argsort()[::-1]:
248+
for r in (- model.predict(self.feature(config), 1).ravel()).argsort():
250249
act, arg = self.idx2tran[r]
251250
if config.doable(act):
252251
getattr(config, act)(arg)
@@ -257,11 +256,11 @@ def parse(self, model, sent):
257256
return config.finish()
258257

259258
def feature(self, config, named=True):
260-
"""-> [numpy.ndarray] :as form, upos, drel, feat
259+
"""-> [numpy.ndarray] :as form, lemm, upos, drel, feat
261260
262-
assert form.shape == upos.shape == (18, )
261+
assert form.shape == lemm.shape == upos.shape == (18, )
263262
264-
assert drel.shape == (16, )
263+
assert drel.shape == (12, )
265264
266265
assert feat.shape == (18 * len(self.feat2idx), )
267266

0 commit comments

Comments
 (0)