<commit_before>module Docs
  class Typescript < UrlScraper
    self.name = 'TypeScript'
    self.type = 'typescript'
    self.release = '2.0'
    self.base_url = 'https://www.typescriptlang.org/docs/'
    self.root_path = 'tutorial.html'
    self.links = {
      home: 'https://www.typescriptlang.org',
      code: 'https://github.com/Microsoft/TypeScript'
    }

    html_filters.push 'typescript/entries', 'typescript/clean_html'

    options[:container] = '#content'
    options[:skip_link] = ->(node) { node.parent.parent['class'] == 'dropdown-menu' }
    options[:fix_urls] = ->(url) {
      url.sub!(/(\w+)\.md/) { "#{$1.downcase}.html" }
      url
    }

    options[:attribution] = <<-HTML
      &copy; Microsoft and other contributors<br>
      Licensed under the Apache License, Version 2.0.
    HTML
  end
end

<commit_msg>Update TypeScript documentation (2.0.3)<commit_after>module Docs
  class Typescript < UrlScraper
    self.name = 'TypeScript'
    self.type = 'typescript'
    self.release = '2.0.3'
    self.base_url = 'https://www.typescriptlang.org/docs/'
    self.root_path = 'tutorial.html'
    self.links = {
      home: 'https://www.typescriptlang.org',
      code: 'https://github.com/Microsoft/TypeScript'
    }

    html_filters.push 'typescript/entries', 'typescript/clean_html'

    options[:container] = '#content'
    options[:skip_link] = ->(node) { node.parent.parent['class'] == 'dropdown-menu' }
    options[:fix_urls] = ->(url) {
      url.sub!(/(\w+)\.md/) { "#{$1.downcase}.html" }
      url
    }

    options[:attribution] = <<-HTML
      &copy; Microsoft and other contributors<br>
      Licensed under the Apache License, Version 2.0.
    HTML
  end
end


{'fraction_non_alphanumeric': 0.1645047169811321, 'fraction_numerical': 0.008254716981132075, 'mean_word_length': 2.9191685912240186, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 9, 'https://': 6, 'lorem ipsum': 0, 'www.': 4, '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': '3079941', 'n_tokens_mistral': 585, 'n_tokens_neox': 574, 'n_words': 105}