diff -r e0a82c9f1d21 -r ea39bbc8d98d main_templates2/danube.scala --- a/main_templates2/danube.scala Thu Nov 04 12:20:12 2021 +0000 +++ b/main_templates2/danube.scala Fri Nov 05 16:47:55 2021 +0000 @@ -1,8 +1,8 @@ -// Core Part about Movie Recommendations +// Main Part 2 about Movie Recommendations // at Danube.co.uk //=========================================== -object CW7b { +object M2 { import io.Source import scala.util._ @@ -158,29 +158,4 @@ -// (7) Calculate the recommendations for all movies according to -// what the recommendations function in (6) produces (this -// can take a few seconds). Put all recommendations into a list -// (of strings) and count how often the strings occur in -// this list. This produces a list of string-int pairs, -// where the first component is the movie name and the second -// is the number of how many times the movie was recommended. -// Sort all the pairs according to the number -// of times they were recommended (most recommended movie name -// first). - -def most_recommended(recs: Map[String, List[String]], - movs: Map[String, String]) : List[(String, Int)] = ??? - - -// testcase -// -//most_recommended(ratings_map, movies_map).take(3) -// => -// List((Matrix,698), -// (Star Wars: Episode IV - A New Hope (1977),402), -// (Jerry Maguire (1996),382)) - - - }