<commit_before>/*
Function which evaluates a single route and returns a list of cartypes
*/

define(["underscore", "model/cartype_model"], function(_, CartypeModel) {
  return function (route) {

    var public = {};
    var private = {};

    private.carTypes = [];

    private.areaCarClasses = {
      city: ["SmallCar", "EstateCar"],
      highway: ["Limousine", "OffRoad", "Cabrio", "Sportscar"],
      rural: ["OffRoad", "SmallCar", "Cabrio", "Van"]
    };

    public.validateRoute = function (route) {
      var carClasses = private.areaCarClasses[route.surrounding];

      _.each(carClasses, function(carType){
        var newCarType = new CartypeModel();

        newCarType.carclass = carType;
        newCarType.seats = route.groupsize;

        private.carTypes.push(newCarType);
      });

      return private.carTypes;
    };

    return public;
  };
});<commit_msg>fixed route to cartclass mapping<commit_after>/*
Function which evaluates a single route and returns a list of cartypes
*/

define(["underscore", "model/cartype_model"], function(_, CartypeModel) {
  return function (route) {

    var public = {};
    var private = {};

    private.areaCarClasses = {
      city: ["SmallCar", "EstateCar"],
      highway: ["Limousine", "OffRoad", "Cabrio", "SportsCar"],
      rural: ["OffRoad", "SmallCar", "Cabrio", "Van"]
    };

    public.validateRoute = function (route) {
      var carClasses = private.areaCarClasses[route.surrounding];

      return _.map(carClasses, function(carType){
        return new CartypeModel({
          carclass: carType,
          seats: route.groupsize
        });
      });
    };

    return public;
  };
});
{'fraction_non_alphanumeric': 0.14285714285714285, 'fraction_numerical': 0.0, 'mean_word_length': 3.036319612590799, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2971276', 'n_tokens_mistral': 517, 'n_tokens_neox': 497, 'n_words': 120}