Skip to content

Commit bb15d5b

Browse files
committed
Fix copying SpanGroups
1 parent 8f07e6c commit bb15d5b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

spacy/tokens/doc.pyx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1180,12 +1180,12 @@ cdef class Doc:
11801180
other.tensor = copy.deepcopy(self.tensor)
11811181
other.cats = copy.deepcopy(self.cats)
11821182
other.user_data = copy.deepcopy(self.user_data)
1183+
other.spans = self.spans.copy()
11831184
other.sentiment = self.sentiment
11841185
other.has_unknown_spaces = self.has_unknown_spaces
11851186
other.user_hooks = dict(self.user_hooks)
11861187
other.user_token_hooks = dict(self.user_token_hooks)
11871188
other.user_span_hooks = dict(self.user_span_hooks)
1188-
other.spans = self.spans.copy()
11891189
other.length = self.length
11901190
other.max_length = self.max_length
11911191
buff_size = other.max_length + (PADDING*2)

0 commit comments

Comments
 (0)