fn apply_to_bpe_builder()

in bindings/node/src/models.rs [158:182]


  fn apply_to_bpe_builder(self, mut builder: BpeBuilder) -> BpeBuilder {
    if let Some(cache_capacity) = self.cache_capacity {
      builder = builder.cache_capacity(cache_capacity as usize);
    }
    if let Some(dropout) = self.dropout {
      builder = builder.dropout(dropout as f32);
    }
    if let Some(unk_token) = self.unk_token {
      builder = builder.unk_token(unk_token);
    }
    if let Some(continuing_subword_prefix) = self.continuing_subword_prefix {
      builder = builder.continuing_subword_prefix(continuing_subword_prefix);
    }
    if let Some(end_of_word_suffix) = self.end_of_word_suffix {
      builder = builder.end_of_word_suffix(end_of_word_suffix);
    }
    if let Some(fuse_unk) = self.fuse_unk {
      builder = builder.fuse_unk(fuse_unk);
    }
    if let Some(byte_fallback) = self.byte_fallback {
      builder = builder.byte_fallback(byte_fallback);
    }

    builder
  }