Skip to content

Commit

Permalink
fix typo in SentenceEmbeddingsTokenizerOuput (#368)
Browse files Browse the repository at this point in the history
  • Loading branch information
SpirosMakris committed May 6, 2023
1 parent 0eda850 commit 66944eb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/pipelines/sentence_embeddings/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ pub use config::{
};
pub use pipeline::{
SentenceEmbeddingsModel, SentenceEmbeddingsModelOutput, SentenceEmbeddingsOption,
SentenceEmbeddingsTokenizerOuput,
SentenceEmbeddingsTokenizerOutput,
};

pub use resources::{
Expand Down
8 changes: 4 additions & 4 deletions src/pipelines/sentence_embeddings/pipeline.rs
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ impl SentenceEmbeddingsModel {
}

/// Tokenizes the inputs
pub fn tokenize<S>(&self, inputs: &[S]) -> SentenceEmbeddingsTokenizerOuput
pub fn tokenize<S>(&self, inputs: &[S]) -> SentenceEmbeddingsTokenizerOutput
where
S: AsRef<str> + Sync,
{
Expand Down Expand Up @@ -327,7 +327,7 @@ impl SentenceEmbeddingsModel {
.map(|input| Tensor::of_slice(&(input)))
.collect::<Vec<_>>();

SentenceEmbeddingsTokenizerOuput {
SentenceEmbeddingsTokenizerOutput {
tokens_ids,
tokens_masks,
}
Expand All @@ -341,7 +341,7 @@ impl SentenceEmbeddingsModel {
where
S: AsRef<str> + Sync,
{
let SentenceEmbeddingsTokenizerOuput {
let SentenceEmbeddingsTokenizerOutput {
tokens_ids,
tokens_masks,
} = self.tokenize(inputs);
Expand Down Expand Up @@ -457,7 +457,7 @@ impl SentenceEmbeddingsModel {
}

/// Container for the SentenceEmbeddings tokenizer output.
pub struct SentenceEmbeddingsTokenizerOuput {
pub struct SentenceEmbeddingsTokenizerOutput {
pub tokens_ids: Vec<Tensor>,
pub tokens_masks: Vec<Tensor>,
}
Expand Down

0 comments on commit 66944eb

Please sign in to comment.