diff --git a/spacy/tagger.pxd b/spacy/tagger.pxd index 39ba7ed41..f91bbeb0a 100644 --- a/spacy/tagger.pxd +++ b/spacy/tagger.pxd @@ -9,7 +9,7 @@ from .tokens cimport Tokens cdef class Tagger: - cdef class_t predict(self, atom_t* context, object golds=*) except * + cdef class_t predict(self, const atom_t* context, object golds=*) except * cpdef readonly Pool mem cpdef readonly Extractor extractor diff --git a/spacy/tagger.pyx b/spacy/tagger.pyx index e0cd0bf3b..22ec3896a 100644 --- a/spacy/tagger.pyx +++ b/spacy/tagger.pyx @@ -26,8 +26,8 @@ def setup_model_dir(tag_names, tag_counts, templates, model_dir): cdef class Tagger: - """Assign part-of-speech, named entity or supersense tags, using greedy - decoding. The tagger reads its model and configuration from disk. + """Predict some type of tag, using greedy decoding. The tagger reads its + model and configuration from disk. """ def __init__(self, model_dir): self.mem = Pool() @@ -40,7 +40,7 @@ cdef class Tagger: if path.exists(path.join(model_dir, 'model')): self.model.load(path.join(model_dir, 'model')) - cdef class_t predict(self, atom_t* context, object golds=None) except *: + cdef class_t predict(self, const atom_t* context, object golds=None) except *: """Predict the tag of tokens[i]. The tagger remembers the features and prediction, in case you later call tell_answer.