<commit_before>module Authority
  class Person < ActiveFedora::Base
    include ::Authority::Concern::Thing


    property :additional_name, predicate: ::RDF::Vocab::SCHEMA.additionalName, multiple: false do |index|
      index.as :stored_searchable
    end
    property :address, predicate: ::RDF::Vocab::SCHEMA.address, multiple: false
    property :affiliation, predicate: ::RDF::Vocab::SCHEMA.affiliation, multiple: false
    property :alumni_of, predicate: ::RDF::Vocab::SCHEMA.alumniOf, multiple: false
    property :award, predicate: ::RDF::Vocab::SCHEMA.award, multiple: false
    property :birth_date, predicate: ::RDF::Vocab::SCHEMA.birthDate, multiple: false
    property :birth_place, predicate: ::RDF::Vocab::SCHEMA.birthPlace, multiple: false
    property :children, predicate: ::RDF::Vocab::SCHEMA.children, multiple: false
    property :death_date, predicate: ::RDF::Vocab::SCHEMA.deathDate, multiple: false
    property :death_place, predicate: ::RDF::Vocab::SCHEMA.deathPlace, multiple: false
    property :email, predicate: ::RDF::Vocab::SCHEMA.email, multiple: false do |index|
      index.as :stored_searchable
    end
    property :family_name, predicate: ::RDF::Vocab::SCHEMA.familyName, multiple: false do |index|
      index.as :stored_searchable
    end
    property :gender, predicate: ::RDF::Vocab::SCHEMA.gender, multiple: false
    property :given_name, predicate: ::RDF::Vocab::SCHEMA.givenName, multiple: false do |index|
      index.as :stored_searchable
    end
    property :honorific_prefix, predicate: ::RDF::Vocab::SCHEMA.honorificPrefix, multiple: false
    property :honorific_suffix, predicate: ::RDF::Vocab::SCHEMA.honorificSuffix, multiple: false
    property :job_title, predicate: ::RDF::Vocab::SCHEMA.jobTitle, multiple: false
    property :member_of, predicate: ::RDF::Vocab::SCHEMA.memberOf, multiple: false
    property :nationality, predicate: ::RDF::Vocab::SCHEMA.nationality, multiple: false
    property :parent, predicate: ::RDF::Vocab::SCHEMA.parent, multiple: false
    property :performer_in, predicate: ::RDF::Vocab::SCHEMA.performerIn, multiple: false
    property :related_to, predicate: ::RDF::Vocab::SCHEMA.relatedTo, multiple: false
    property :sibling, predicate: ::RDF::Vocab::SCHEMA.sibling, multiple: false
    property :spouse, predicate: ::RDF::Vocab::SCHEMA.spouse, multiple: false
    property :works_for, predicate: ::RDF::Vocab::SCHEMA.worksFor, multiple: false

    before_save :set_thing_name

    # (before save) Set the construct the _name from family, additional and given name
    def set_thing_name
      self.set_name = full_name
    end

    def display_value
      value = (full_name.present?) ? full_name : ''
      value += ', ' if birth_date.present? || death_date.present?
      value += self.display_date if self.display_date.present?
      value
    end
<commit_msg>Change parent to _parent as parent is a reserved keyword<commit_after>module Authority
  class Person < ActiveFedora::Base
    include ::Authority::Concern::Thing


    property :additional_name, predicate: ::RDF::Vocab::SCHEMA.additionalName, multiple: false do |index|
      index.as :stored_searchable
    end
    property :address, predicate: ::RDF::Vocab::SCHEMA.address, multiple: false
    property :affiliation, predicate: ::RDF::Vocab::SCHEMA.affiliation, multiple: false
    property :alumni_of, predicate: ::RDF::Vocab::SCHEMA.alumniOf, multiple: false
    property :award, predicate: ::RDF::Vocab::SCHEMA.award, multiple: false
    property :birth_date, predicate: ::RDF::Vocab::SCHEMA.birthDate, multiple: false
    property :birth_place, predicate: ::RDF::Vocab::SCHEMA.birthPlace, multiple: false
    property :children, predicate: ::RDF::Vocab::SCHEMA.children, multiple: false
    property :death_date, predicate: ::RDF::Vocab::SCHEMA.deathDate, multiple: false
    property :death_place, predicate: ::RDF::Vocab::SCHEMA.deathPlace, multiple: false
    property :email, predicate: ::RDF::Vocab::SCHEMA.email, multiple: true do |index|
      index.as :stored_searchable
    end
    property :family_name, predicate: ::RDF::Vocab::SCHEMA.familyName, multiple: false do |index|
      index.as :stored_searchable
    end
    property :gender, predicate: ::RDF::Vocab::SCHEMA.gender, multiple: false
    property :given_name, predicate: ::RDF::Vocab::SCHEMA.givenName, multiple: false do |index|
      index.as :stored_searchable
    end
    property :honorific_prefix, predicate: ::RDF::Vocab::SCHEMA.honorificPrefix, multiple: false
    property :honorific_suffix, predicate: ::RDF::Vocab::SCHEMA.honorificSuffix, multiple: false
    property :job_title, predicate: ::RDF::Vocab::SCHEMA.jobTitle, multiple: false
    property :member_of, predicate: ::RDF::Vocab::SCHEMA.memberOf, multiple: false
    property :nationality, predicate: ::RDF::Vocab::SCHEMA.nationality, multiple: false
    property :_parent, predicate: ::RDF::Vocab::SCHEMA.parent, multiple: false
    property :performer_in, predicate: ::RDF::Vocab::SCHEMA.performerIn, multiple: false
    property :related_to, predicate: ::RDF::Vocab::SCHEMA.relatedTo, multiple: false
    property :sibling, predicate: ::RDF::Vocab::SCHEMA.sibling, multiple: false
    property :spouse, predicate: ::RDF::Vocab::SCHEMA.spouse, multiple: false
    property :works_for, predicate: ::RDF::Vocab::SCHEMA.worksFor, multiple: false

    before_save :set_thing_name

    # (before save) Set the construct the _name from family, additional and given name
    def set_thing_name
      self.set_name = full_name
    end

    def display_value
      value = (full_name.present?) ? full_name : ''
      value += ', ' if birth_date.present? || death_date.present?
      value += self.display_date if self.display_date.present?
      value
    end

{'fraction_non_alphanumeric': 0.1254125412541254, 'fraction_numerical': 0.0, 'mean_word_length': 5.125531914893617, 'pattern_counts': {'":': 0, '<': 5, '<?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': '4097075', 'n_tokens_mistral': 1946, 'n_tokens_neox': 1851, 'n_words': 433}