Skip to content

Commit fa446e9

Browse files
late interaction models now also return offsets
1 parent 2eac061 commit fa446e9

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

turftopic/late.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,7 @@ def transform(
351351
chunks = get_document_chunks(raw_documents, offsets)
352352
out_array = self.model.transform(chunks, embeddings=flat_embeddings)
353353
if self.pooling is None:
354-
return unflatten_repr(out_array, lengths)
354+
return unflatten_repr(out_array, lengths), offsets
355355
else:
356356
return pool_flat(out_array, lengths)
357357

@@ -370,7 +370,7 @@ def fit_transform(
370370
chunks, embeddings=flat_embeddings
371371
)
372372
if self.pooling is None:
373-
return unflatten_repr(out_array, lengths)
373+
return unflatten_repr(out_array, lengths), offsets
374374
else:
375375
return pool_flat(out_array, lengths)
376376

0 commit comments

Comments
 (0)