Function train_test_split
Source pub fn train_test_split(
texts: &[String],
test_size: f64,
random_seed: Option<u64>,
) -> Result<(Vec<String>, Vec<String>)>
Expand description
Split text into training and testing sets
§Arguments
texts - The texts to split
test_size - The proportion of the dataset to use for testing (0.0 to 1.0)
random_seed - Optional random seed for reproducibility
§Returns
(Vec<String>, Vec<String>) - Training and testing sets