<commit_before>module Onebox
  module Engine
    module StandardEmbed

      def self.oembed_providers
        @@oembed_providers ||= {}
      end

      def self.opengraph_providers
        @@opengraph_providers ||= Array.new
      end

      def self.add_oembed_provider(regexp, endpoint)
        oembed_providers[regexp] = endpoint
      end

      def self.add_opengraph_provider(regexp)
        opengraph_providers.push(regexp)
      end

      # Some oembed providers (like meetup.com) don't provide links to themselves
      add_oembed_provider /www\.flickr\.com\//, 'http://www.flickr.com/services/oembed.json'
      add_oembed_provider /(.*\.)?gfycat\.com\//, 'http://gfycat.com/cajax/oembed'
      add_oembed_provider /www\.kickstarter\.com\//, 'https://www.kickstarter.com/services/oembed'
      add_oembed_provider /www\.meetup\.com\//, 'http://api.meetup.com/oembed'
      add_oembed_provider /www\.ted\.com\//, 'http://www.ted.com/services/v1/oembed.json'
      add_oembed_provider /(.*\.)?vimeo\.com\//, 'http://vimeo.com/api/oembed.json'

      # Sites that work better with OpenGraph
      # add_opengraph_provider /gfycat\.com\//
<commit_msg>use OpenGraph onebox for nytimes.com<commit_after>module Onebox
  module Engine
    module StandardEmbed

      def self.oembed_providers
        @@oembed_providers ||= {}
      end

      def self.opengraph_providers
        @@opengraph_providers ||= Array.new
      end

      def self.add_oembed_provider(regexp, endpoint)
        oembed_providers[regexp] = endpoint
      end

      def self.add_opengraph_provider(regexp)
        opengraph_providers.push(regexp)
      end

      # Some oembed providers (like meetup.com) don't provide links to themselves
      add_oembed_provider /www\.flickr\.com\//, 'http://www.flickr.com/services/oembed.json'
      add_oembed_provider /(.*\.)?gfycat\.com\//, 'http://gfycat.com/cajax/oembed'
      add_oembed_provider /www\.kickstarter\.com\//, 'https://www.kickstarter.com/services/oembed'
      add_oembed_provider /www\.meetup\.com\//, 'http://api.meetup.com/oembed'
      add_oembed_provider /www\.ted\.com\//, 'http://www.ted.com/services/v1/oembed.json'
      add_oembed_provider /(.*\.)?vimeo\.com\//, 'http://vimeo.com/api/oembed.json'

      # Sites that work better with OpenGraph
      add_opengraph_provider /nytimes\.com\//

{'fraction_non_alphanumeric': 0.13919726729291204, 'fraction_numerical': 0.0008539709649871904, 'mean_word_length': 2.7014218009478674, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 14, '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': '2997208', 'n_tokens_mistral': 853, 'n_tokens_neox': 803, 'n_words': 126}