<commit_before>//
//  RunSpanishSpeaker.swift
//  RJv1
//
//  Created by <NAME> on 5/2/15.
//  Copyright (c) 2015 <NAME>. All rights reserved.
//

import Foundation

class RunSpanishSpeaker : RunTrackerSpeechLanguageProvider {
  private var _unitSystem = false
  var unitSystem:Bool {
    set(value) {
      _unitSystem = value
      if value {
        units = "kilómetros"
        unit = "kilómetro"
      } else {
        units = "millas"
        unit = "milla"
      }
    }
    get {
      return _unitSystem
    }
  }
  private var unit = ""
  private var units = ""
  private func distanceString(distance:DistanceStructure)->String {
    var string = "\(distance.firstUnit) "
    if distance.secondUnit < 10 {
      if distance.firstUnit == 1 {
        string += unit
      } else {
        string += units
      }
    } else {
      string += "punto \(printFirst(distance.secondUnit)) \(units),"
    }
    string += ",...  "
    return string
  }
  private func printFirst(number:Int)->String {
    let string = Array(arrayLiteral: "\(number)".characters)[0]
    return String(string.first!)
  }
  private func timeString(time:TimeStructure)->String {
    var string = " tiempo: "<commit_msg>spanish should say 'distance:' before distance feedback<commit_after>//
//  RunSpanishSpeaker.swift
//  RJv1
//
//  Created by <NAME> on 5/2/15.
//  Copyright (c) 2015 <NAME>. All rights reserved.
//

import Foundation

class RunSpanishSpeaker : RunTrackerSpeechLanguageProvider {
  private var _unitSystem = false
  var unitSystem:Bool {
    set(value) {
      _unitSystem = value
      if value {
        units = "kilómetros"
        unit = "kilómetro"
      } else {
        units = "millas"
        unit = "milla"
      }
    }
    get {
      return _unitSystem
    }
  }
  private var unit = ""
  private var units = ""
  private func distanceString(distance:DistanceStructure)->String {
    var string = "distancia,.. \(distance.firstUnit) "
    if distance.secondUnit < 10 {
      if distance.firstUnit == 1 {
        string += unit
      } else {
        string += units
      }
    } else {
      string += "punto \(printFirst(distance.secondUnit)) \(units),"
    }
    string += ",...  "
    return string
  }
  private func printFirst(number:Int)->String {
    let string = Array(arrayLiteral: "\(number)".characters)[0]
    return String(string.first!)
  }
  private func timeString(time:TimeStructure)->String {
    var string = " tiempo,.. "
{'fraction_non_alphanumeric': 0.12545824847250509, 'fraction_numerical': 0.010590631364562118, 'mean_word_length': 2.3551912568306013, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 13, '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': '5424346', 'n_tokens_mistral': 772, 'n_tokens_neox': 747, 'n_words': 185}