Fix tok2vec if no boundary tokens
@@ -164,6 +164,7 @@ class PyTT_TokenVectorEncoder(Pipe):
doc.tensor[i] += wp_tensor[j] / align_sizes[j]
# To make this weighting work, we "align" the boundary tokens against
# every token in their sentence.
+ if doc.tensor.sum() != wp_tensor.sum():
for sent in doc.sents:
cls_vector = wp_tensor[sent._.pytt_start]
sep_vector = wp_tensor[sent._.pytt_end]
