MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / tokenize_with_config

Method tokenize_with_config

atomic-core/src/diff/token/tokenizer.rs:138–140  ·  view source on GitHub ↗

Tokenize with custom configuration. Convenience method for one-off tokenization with custom config. # Arguments `content` - The bytes to tokenize `config` - The tokenization configuration # Returns A vector of all tokens in the content. # Example ```rust use atomic_core::diff::token::{Tokenizer, TokenizerConfig}; let config = TokenizerConfig::prose(); let tokens = Tokenizer::tokenize_with_

(content: &'a [u8], config: TokenizerConfig)

Source from the content-addressed store, hash-verified

136 /// let tokens = Tokenizer::tokenize_with_config(b"Hello, world!", config);
137 /// ```
138 pub fn tokenize_with_config(content: &'a [u8], config: TokenizerConfig) -> Vec<Token<'a>> {
139 Self::with_config(content, config).collect()
140 }
141
142 /// Get the remaining content that hasn't been tokenized yet.
143 ///

Callers

nothing calls this directly

Calls 1

collectMethod · 0.45

Tested by

no test coverage detected