<commit_before>require "nokogiri"
require "meta_morpha/version"
require "meta_morpha/module_inheritable_attributes"
require "meta_morpha/field"

module MetaMorpha

  def parse(html)
    doc = html.is_a?(Nokogiri::HTML::Document) ? html : Nokogiri::HTML.parse(html)
    fields = self.class.instance_variable_get(:@mapped_fields)
    fields.each_value do |field|
      send("#{field.to}=", field.map(doc))
    end<commit_msg>Include selector in module<commit_after>require "nokogiri"
require "meta_morpha/version"
require "meta_morpha/module_inheritable_attributes"
require "meta_morpha/field"
require "meta_morpha/selector"

module MetaMorpha

  def parse(html)
    doc = html.is_a?(Nokogiri::HTML::Document) ? html : Nokogiri::HTML.parse(html)
    fields = self.class.instance_variable_get(:@mapped_fields)
    fields.each_value do |field|
      send("#{field.to}=", field.map(doc))
    end
{'fraction_non_alphanumeric': 0.12696629213483146, 'fraction_numerical': 0.0, 'mean_word_length': 5.6992481203007515, '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': '3664720', 'n_tokens_mistral': 310, 'n_tokens_neox': 309, 'n_words': 52}