diff --git a/Cargo.lock b/Cargo.lock index a8ae57e..c1914c7 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -261,13 +261,13 @@ dependencies = [ "ndarray 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)", "ndarray-rand 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", "num_cpus 1.10.1 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_xorshift 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_core 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_xorshift 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.92 (registry+https://github.com/rust-lang/crates.io-index)", "stdinout 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "toml 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "zipf 5.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "zipf 6.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1119,10 +1119,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "zipf" -version = "5.0.1" +version = "6.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [metadata] @@ -1257,4 +1257,4 @@ dependencies = [ "checksum winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)" = "f10e386af2b13e47c89e7236a7a14a086791a2b88ebad6df9bf42040195cf770" "checksum winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" "checksum winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" -"checksum zipf 5.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2057772d87bedea0efd93842ee0e0f52fc0c313c556d5fa8ee787771c051a61f" +"checksum zipf 6.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "9e12b8667a4fff63d236f8363be54392f93dbb13616be64a83e761a9319ab589" diff --git a/Cargo.toml b/Cargo.toml index 9361043..46ebd0b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -22,18 +22,17 @@ memmap = "0.7" ndarray = "0.13" ndarray-rand = "0.11" num_cpus = "1" -rand = "0.6" -rand_core = "0.4" -rand_xorshift = "0.1" +rand = "0.7" +rand_core = "0.5" +rand_xorshift = "0.2" serde = { version = "1", features = ["derive"] } stdinout = "0.4" toml = "0.5" -zipf = "5" +zipf = "6" [build-dependencies] git2 = "0.10" [dev-dependencies] lazy_static = "1" -maplit = "1" -rand_xorshift = "0.1" +maplit = "1" \ No newline at end of file diff --git a/src/subcommands/deps.rs b/src/subcommands/deps.rs index bdcab2a..3405b91 100644 --- a/src/subcommands/deps.rs +++ b/src/subcommands/deps.rs @@ -15,7 +15,7 @@ use finalfrontier::{ SimpleVocabConfig, SubwordVocab, Vocab, VocabBuilder, WriteModelBinary, SGD, }; use finalfusion::prelude::VocabWrap; -use rand::{FromEntropy, Rng}; +use rand::{Rng, SeedableRng}; use rand_xorshift::XorShiftRng; use serde::Serialize; use stdinout::OrExit; diff --git a/src/subcommands/skipgram.rs b/src/subcommands/skipgram.rs index 4cda0eb..6368d61 100644 --- a/src/subcommands/skipgram.rs +++ b/src/subcommands/skipgram.rs @@ -12,7 +12,7 @@ use finalfrontier::{ SubwordVocab, Vocab, VocabBuilder, WriteModelBinary, SGD, }; use finalfusion::prelude::VocabWrap; -use rand::{FromEntropy, Rng}; +use rand::{Rng, SeedableRng}; use rand_xorshift::XorShiftRng; use serde::Serialize; use stdinout::OrExit; diff --git a/src/train_model.rs b/src/train_model.rs index 62dcc94..c78c669 100644 --- a/src/train_model.rs +++ b/src/train_model.rs @@ -276,7 +276,7 @@ pub trait NegativeSamples { mod tests { use finalfusion::subword::FinalfusionHashIndexer; use ndarray::Array2; - use rand::FromEntropy; + use rand::SeedableRng; use rand_xorshift::XorShiftRng; use super::TrainModel; diff --git a/src/util.rs b/src/util.rs index 2eefa89..b832131 100644 --- a/src/util.rs +++ b/src/util.rs @@ -1,4 +1,4 @@ -use rand::{FromEntropy, SeedableRng}; +use rand::SeedableRng; use rand_core::{self, RngCore}; use serde::Serialize; @@ -55,7 +55,7 @@ where impl Clone for ReseedOnCloneRng where - R: RngCore + FromEntropy + SeedableRng, + R: RngCore + SeedableRng, { fn clone(&self) -> Self { ReseedOnCloneRng(R::from_entropy()) @@ -83,7 +83,7 @@ pub use self::test::*; #[cfg(test)] mod test { use ndarray::{ArrayView, Dimension}; - use rand::{FromEntropy, SeedableRng}; + use rand::SeedableRng; use rand_core::{self, impls, le, RngCore}; use super::ReseedOnCloneRng;