equal
deleted
inserted
replaced
3 import scala.util._ |
3 import scala.util._ |
4 |
4 |
5 import CW7b._ |
5 import CW7b._ |
6 |
6 |
7 def urban_get_csv_file(name: String) : List[String] = { |
7 def urban_get_csv_file(name: String) : List[String] = { |
8 val csv = Source.fromFile(name) |
8 val csv = Source.fromFile(name)("ISO-8859-1") |
9 csv.mkString.split("\n").toList.drop(1) |
9 csv.mkString.split("\n").toList.drop(1) |
10 } |
10 } |
11 |
11 |
12 val urban_ratings = urban_get_csv_file("ratings.csv") |
12 val urban_ratings = urban_get_csv_file("ratings.csv") |
13 val urban_movies = urban_get_csv_file("movies.csv") |
13 val urban_movies = urban_get_csv_file("movies.csv") |