Skip to content

Commit

Permalink
Minimal cleanup in extractor
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelKohler committed Oct 27, 2020
1 parent 4318e71 commit d095892
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/extractor.rs
Expand Up @@ -4,8 +4,7 @@ use crate::checker;
use crate::loader::load_file_names;
use crate::rules::{load_rules, Rules};
use punkt::params::Standard;
use punkt::SentenceTokenizer;
use punkt::TrainingData;
use punkt::{SentenceTokenizer, TrainingData};
use rand::Rng;
use rand::rngs::ThreadRng;
use std::collections::HashSet;
Expand All @@ -28,7 +27,7 @@ pub fn extract(config: Config, mut loader: impl FnMut(&PathBuf) -> Result<Vec<S
&text,
&existing_sentences,
&training_data,
iteration_config,
&iteration_config,
checker::check,
replacer::replace_strings,
);
Expand All @@ -51,7 +50,7 @@ fn choose(
text: &str,
existing_sentences: &HashSet<String>,
training_data: &TrainingData,
config: Config,
config: &Config,
predicate: impl FnMut(&Rules, &str) -> bool,
mut replacer: impl FnMut(&Rules, &str) -> String,
) -> Vec<String> {
Expand Down

0 comments on commit d095892

Please sign in to comment.