From 21321cd6cfba52e19fc3016b0f9f916bef60e056 Mon Sep 17 00:00:00 2001 From: Matthew Honnibal Date: Thu, 13 Sep 2018 14:08:43 +0200 Subject: [PATCH] Add tok2vec property to parser model --- spacy/syntax/_parser_model.pyx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/spacy/syntax/_parser_model.pyx b/spacy/syntax/_parser_model.pyx index a74878981..0d437eb01 100644 --- a/spacy/syntax/_parser_model.pyx +++ b/spacy/syntax/_parser_model.pyx @@ -192,6 +192,10 @@ class ParserModel(Model): Model.__init__(self) self._layers = [tok2vec, lower_model, upper_model] + @property + def tok2vec(self): + return self._layers[0] + def begin_update(self, docs, drop=0.): step_model = ParserStepModel(docs, self._layers, drop=drop) def finish_parser_update(golds, sgd=None):