Open bunny-therapist opened 4 weeks ago
Have a branch for that, will PR a bit later.
@bunny-therapist could you please test with my fork? Cargo.toml:
[patch.crates-io]
yake-rust = { git = "https://github.com/xamgore/yake-rust.git" }
I am going to try it, but first thing I notice is that I need to override everything in Config or nothing. It would be more useful to just be able to override some of it, and use defaults for other things.
I mean, I can get around it by creating the default config and carrying over some values. I did that now, and it appears to work.
I think it would be useful to have something like that in the Config class though. Like, a constructor that takes Option<...> of every field and then uses unwrap_or(default) for the fields.
Yake
implements Default
trait which means you can do just Yake::default()
or let yake: Yake = Default::default()
. Config also implements Default
.
let yake = Yake::new(Config {
dedupe_lim: 0.99,
..Default::default()
});
That should be written in the documentary comments, of course.
Right now, there appears to be no way to change, e.g., the stop words.