From 465a6f64521d9568f1456ddf5337f9ea39d7aad3 Mon Sep 17 00:00:00 2001 From: Matthew Honnibal Date: Sun, 14 Jan 2018 15:06:30 +0100 Subject: [PATCH] Add missing Span.vocab property. Closes #1633 --- spacy/tokens/span.pyx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/spacy/tokens/span.pyx b/spacy/tokens/span.pyx index f09dfd134..10b8a7820 100644 --- a/spacy/tokens/span.pyx +++ b/spacy/tokens/span.pyx @@ -261,6 +261,11 @@ cdef class Span: self.start = start self.end = end + 1 + property vocab: + """RETURNS (Vocab): The Span's Doc's vocab.""" + def __get__(self): + return self.doc.vocab + property sent: """RETURNS (Span): The sentence span that the span is a part of.""" def __get__(self):