9 releases

Uses old Rust 2015

0.1.5 Oct 5, 2016
0.1.4 Feb 3, 2016
0.1.3 Jun 24, 2015
0.1.2 Apr 20, 2015
0.0.4 Jan 13, 2015

#600 in Science

Download history 35/week @ 2023-12-04 36/week @ 2023-12-11 47/week @ 2023-12-18 20/week @ 2023-12-25 23/week @ 2024-01-01 50/week @ 2024-01-08 71/week @ 2024-01-15 78/week @ 2024-01-22 50/week @ 2024-01-29 20/week @ 2024-02-05 30/week @ 2024-02-12 106/week @ 2024-02-19 130/week @ 2024-02-26 94/week @ 2024-03-04 74/week @ 2024-03-11 74/week @ 2024-03-18

375 downloads per month
Used in 4 crates (via punkt)

MIT/Apache

13KB
233 lines

Frequency Distribution

Build Status

Implementation of a Frequency Distribution in Rust. Keeps track of how many times an object appears in a larger context (for example, how many times a word appears in a piece of text). The underlying data structure of the Frequency Distribution is a HashMap, so the object that is being counted must be hashable.

Example

use freqdist::FrequencyDistribution;

let mut fdist = FrequencyDistribution::new();

fdist.insert("hello");
fdist.insert("hello");
fdist.insert("goodbye");

assert_eq!(fdist.get(&"hello"), 2);

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

No runtime deps