Make DocBin output stable data (set iteration)

This commit is contained in:
Matthew Honnibal 2020-09-25 22:20:44 +02:00
parent 26afd3bd90
commit 092ce4648e
1 changed files with 1 additions and 1 deletions

View File

@ -171,7 +171,7 @@ class DocBin:
"tokens": tokens.tobytes("C"),
"spaces": spaces.tobytes("C"),
"lengths": numpy.asarray(lengths, dtype="int32").tobytes("C"),
"strings": list(self.strings),
"strings": list(sorted(self.strings)),
"cats": self.cats,
"flags": self.flags,
}