mirror of
https://github.com/explosion/spaCy.git
synced 2025-04-28 21:03:41 +03:00
Expose parser's tok2vec model component
This commit is contained in:
parent
17c63906f9
commit
13c8881d2f
|
@ -753,6 +753,14 @@ cdef class Parser:
|
||||||
for doc in docs:
|
for doc in docs:
|
||||||
hook(doc)
|
hook(doc)
|
||||||
|
|
||||||
|
@property
|
||||||
|
def tok2vec(self):
|
||||||
|
'''Return the embedding and convolutional layer of the model.'''
|
||||||
|
if self.model in (None, True, False):
|
||||||
|
return None
|
||||||
|
else:
|
||||||
|
return self.model[0]
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def postprocesses(self):
|
def postprocesses(self):
|
||||||
# Available for subclasses, e.g. to deprojectivize
|
# Available for subclasses, e.g. to deprojectivize
|
||||||
|
|
Loading…
Reference in New Issue
Block a user