Attached is a small C# class library that demonstrates this principle (Visual Studio 2015, C# 4.6.1). The class library allows you to provide an IEnumerable
The class library is easy to use and two (2) examples are provided along with the source code.
Examples:
1) ConsoleWordCount - Reads all words from the book, War and Peace, and reports on the 80% / 20% principle. This is modeled after a single set of text where each datum (i.e. word) is a single occurrence to be examined.
2) ConsoleStatePopulation - Reads individual records comprised of both a state name and a population, and reports on the 80% / 20% principle. This demonstrates how specific records (i.e. objects comprised of multiple properties) can also be used by the Zipf class library.
Download source and example code now!
Also, there is a nice video by vsauce on Zipf on youtube.
Enjoy!
No comments:
Post a Comment