equal
deleted
inserted
replaced
162 // what the recommendations function in (6) produces (this |
162 // what the recommendations function in (6) produces (this |
163 // can take a few seconds). Put all recommendations into a list |
163 // can take a few seconds). Put all recommendations into a list |
164 // (of strings) and count how often the strings occur in |
164 // (of strings) and count how often the strings occur in |
165 // this list. This produces a list of string-int pairs, |
165 // this list. This produces a list of string-int pairs, |
166 // where the first component is the movie name and the second |
166 // where the first component is the movie name and the second |
167 // is the number of how many times they were recommended. |
167 // is the number of how many times the movie was recommended. |
168 // Sort all the pairs according to the number |
168 // Sort all the pairs according to the number |
169 // of times they were recommended (most recommended movie name |
169 // of times they were recommended (most recommended movie name |
170 // first). |
170 // first). |
171 |
171 |
172 def most_recommended(recs: Map[String, List[String]], |
172 def most_recommended(recs: Map[String, List[String]], |