mirror of
https://github.com/explosion/spaCy.git
synced 2025-01-12 02:06:31 +03:00
Sort spans before processing
This commit is contained in:
parent
ca33e891e2
commit
4f0843e0ec
|
@ -88,7 +88,7 @@ class AttributeRuler(Pipe):
|
|||
# Retokenize with each set of disjoint spans separately
|
||||
for span_set in disjoint_span_sets:
|
||||
with doc.retokenize() as retokenizer:
|
||||
for span in span_set:
|
||||
for span in sorted(span_set):
|
||||
attrs = self.attrs[span.label]
|
||||
index = self.indices[span.label]
|
||||
token = span[index]
|
||||
|
|
Loading…
Reference in New Issue
Block a user