mirror of
https://github.com/explosion/spaCy.git
synced 2024-11-11 04:08:09 +03:00
Add labels property to parser
This commit is contained in:
parent
4dc0fc9954
commit
e5757d4bf0
|
@ -790,6 +790,11 @@ cdef class Parser:
|
||||||
for doc in docs:
|
for doc in docs:
|
||||||
hook(doc)
|
hook(doc)
|
||||||
|
|
||||||
|
@property
|
||||||
|
def labels(self):
|
||||||
|
class_names = [self.moves.get_class_name(i) for i in range(self.moves.n_moves)]
|
||||||
|
return class_names
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def tok2vec(self):
|
def tok2vec(self):
|
||||||
'''Return the embedding and convolutional layer of the model.'''
|
'''Return the embedding and convolutional layer of the model.'''
|
||||||
|
|
Loading…
Reference in New Issue
Block a user