<commit_before>//
//  Font.swift
//  R.swift
//
//  Created by <NAME> on 09-12-15.
//  Copyright © 2015 <NAME>. All rights reserved.
//

import Foundation

struct Font {
  let name: String

  init(url: NSURL) throws {
    guard let pathExtension = url.pathExtension where FontExtensions.contains(pathExtension) else {
      throw ResourceParsingError.UnsupportedExtension(givenExtension: url.pathExtension, supportedExtensions: FontExtensions)
    }

    let dataProvider = CGDataProviderCreateWithURL(url)
    let font = CGFontCreateWithDataProvider(dataProvider)

    guard let postScriptName = CGFontCopyPostScriptName(font) else {
      throw ResourceParsingError.ParsingFailed("No postcriptName associated to font at \(url)")
    }

    name = postScriptName as String
  }
}<commit_msg>Fix typo in error<commit_after>//
//  Font.swift
//  R.swift
//
//  Created by <NAME> on 09-12-15.
//  Copyright © 2015 <NAME>. All rights reserved.
//

import Foundation

struct Font {
  let name: String

  init(url: NSURL) throws {
    guard let pathExtension = url.pathExtension where FontExtensions.contains(pathExtension) else {
      throw ResourceParsingError.UnsupportedExtension(givenExtension: url.pathExtension, supportedExtensions: FontExtensions)
    }

    let dataProvider = CGDataProviderCreateWithURL(url)
    let font = CGFontCreateWithDataProvider(dataProvider)

    guard let postScriptName = CGFontCopyPostScriptName(font) else {
      throw ResourceParsingError.ParsingFailed("No postscriptName associated to font at \(url)")
    }

    name = postScriptName as String
  }
}
{'fraction_non_alphanumeric': 0.08947700063011972, 'fraction_numerical': 0.01260239445494644, 'mean_word_length': 3.871165644171779, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '4205650', 'n_tokens_mistral': 481, 'n_tokens_neox': 449, 'n_words': 123}