equal
deleted
inserted
replaced
1 // Part 2 and 3 about Movie Recommendations |
1 // Core Part about Movie Recommendations |
2 // at Danube.co.uk |
2 // at Danube.co.uk |
3 //=========================================== |
3 //=========================================== |
4 |
4 |
5 import io.Source |
5 import io.Source |
6 import scala.util._ |
6 import scala.util._ |
7 |
7 |
8 //object CW7b { // for purposes of generating a jar |
8 object CW7b { // for purposes of generating a jar |
9 |
9 |
10 // (1) Implement the function get_csv_url which takes an url-string |
10 // (1) Implement the function get_csv_url which takes an url-string |
11 // as argument and requests the corresponding file. The two urls |
11 // as argument and requests the corresponding file. The two urls |
12 // of interest are ratings_url and movies_url, which correspond |
12 // of interest are ratings_url and movies_url, which correspond |
13 // to CSV-files. |
13 // to CSV-files. |
186 //val all = for (name <- movie_names.map(_._1)) yield { |
186 //val all = for (name <- movie_names.map(_._1)) yield { |
187 // recommendations(ratings_map, movies_map, name) |
187 // recommendations(ratings_map, movies_map, name) |
188 //} |
188 //} |
189 |
189 |
190 // helper functions |
190 // helper functions |
191 //List().take(2 |
191 //List().take(2) |
192 //List(1).take(2) |
192 //List(1).take(2) |
193 //List(1,2).take(2) |
193 //List(1,2).take(2) |
194 //List(1,2,3).take(2) |
194 //List(1,2,3).take(2) |
195 |
195 |
196 //} |
196 } |