Skip to content

Commit

Permalink
Rename 'sentences' argument to 'text_or_batch' for clarity
Browse files Browse the repository at this point in the history
  • Loading branch information
Paulooh007 committed Nov 2, 2023
1 parent 3bc920a commit cac6796
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions laser_encoders/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,10 @@ def __init__(
self.encoder.eval()
self.sort_kind = sort_kind

def __call__(self, sentences):
def __call__(self, text_or_batch):
if self.spm_model:
sentences = self.tokenizer(sentences)
return self.encode_sentences(sentences)
text_or_batch = self.tokenizer(text_or_batch)
return self.encode_sentences(text_or_batch)
else:
raise ValueError(
"Either initialize the encoder with an spm_model or pre-tokenize and use the encode_sentences method."
Expand Down

0 comments on commit cac6796

Please sign in to comment.