Heaps' law, statistics of shared components, and temporal patterns from a sample-space-reducing process