+ $this->increment($this->three[$cmb], $token);
+ }
+
+ private function addFour($one, $two, $three, $four, $token) {
+ $cmb = $this->generalize([$one, $two, $three, $four]);
+ if (!isset($this->four[$cmb])) {
+ $this->four[$cmb] = [];
+ }
+ $this->increment($this->four[$cmb], $token);
+ }
+
+ private function addFive($one, $two, $three, $four, $five, $token) {
+ $cmb = $this->generalize([$one, $two, $three, $four, $five]);
+ if (!isset($this->five[$cmb])) {
+ $this->five[$cmb] = [];
+ }
+ $this->increment($this->five[$cmb], $token);
+ }
+
+ private function increment(&$which, $token) {
+ $generalized = $this->generalize([$token]);
+ if (!isset($which[$generalized])) {
+ $which[$generalized] = [
+ 'count' => 1,
+ 'examples' => [],
+ ];
+ $which[$generalized]['examples'][$token] = 1;