<commit_before>module Parsers
  module Cv
    class Enrollee
      include Namespaces

      def initialize(doc)
        @xml = doc
      end

      def m_id
        @m_id ||= Maybe.new(@xml.at_xpath("cv:member/cv:id/cv:id",namespaces)).content.split("#").last.value
      end

      def subscriber?
        @is_subscriber = "true" == Maybe.new(@xml.at_xpath("cv:is_subscriber",namespaces)).content.strip.downcase.value
      end

      def rel_code
        return "self" if subscriber?
        @rel_code ||= Maybe.new(@xml.at_xpath("cv:member/cv:person_relationships/cv:person_relationships/cv:relationship/cv:relationship_uri",namespaces)).content.split("#").last.value
      end

      def pre_amt
        @pre_amt ||= Maybe.new(@xml.at_xpath("cv:benefit/cv:premium_amount",namespaces)).content.strip.value
      end

      def coverage_start
        @coverage_start ||= Maybe.new(@xml.at_xpath("cv:benefit/cv:begin_date",namespaces)).content.strip.value
      end

      def to_hash
        { 
          :m_id => m_id,
          :rel_code => rel_code,
          :ben_stat => "active",
          :emp_stat => "active",
          :pre_amt => pre_amt,
          :coverage_start => coverage_start
        }
      end<commit_msg>Fixing a copypaste error.<commit_after>module Parsers
  module Cv
    class Enrollee
      include Namespaces

      def initialize(doc)
        @xml = doc
      end

      def m_id
        @m_id ||= Maybe.new(@xml.at_xpath("cv:member/cv:id/cv:id",namespaces)).content.split("#").last.value
      end

      def subscriber?
        @is_subscriber = "true" == Maybe.new(@xml.at_xpath("cv:is_subscriber",namespaces)).content.strip.downcase.value
      end

      def rel_code
        return "self" if subscriber?
        @rel_code ||= Maybe.new(@xml.at_xpath("cv:member/cv:person_relationships/cv:relationship/cv:relationship_uri",namespaces)).content.split("#").last.value
      end

      def pre_amt
        @pre_amt ||= Maybe.new(@xml.at_xpath("cv:benefit/cv:premium_amount",namespaces)).content.strip.value
      end

      def coverage_start
        @coverage_start ||= Maybe.new(@xml.at_xpath("cv:benefit/cv:begin_date",namespaces)).content.strip.value
      end

      def to_hash
        { 
          :m_id => m_id,
          :rel_code => rel_code,
          :ben_stat => "active",
          :emp_stat => "active",
          :pre_amt => pre_amt,
          :coverage_start => coverage_start
        }
      end
{'fraction_non_alphanumeric': 0.13134206219312602, 'fraction_numerical': 0.0, 'mean_word_length': 2.5332369942196533, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 12}, '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': '3607682', 'n_tokens_mistral': 821, 'n_tokens_neox': 794, 'n_words': 118}