<commit_before>package uk.ac.wellcome.transformer.transformers.sierra

import uk.ac.wellcome.models.{AbstractAgent, Organisation, Person}
import uk.ac.wellcome.transformer.source.{MarcSubfield, SierraBibData}

trait SierraCreators extends MarcUtils {

  def getCreators(bibData: SierraBibData): List[AbstractAgent] = {

    val persons = getMatchingSubfields(bibData, "100", List("a", "b", "c")).map { subfields =>
      val name = subfields.collectFirst { case MarcSubfield("a", content) => content }
      val numeration = subfields.collectFirst { case MarcSubfield("b", content) => content }
      val prefixes = subfields.collect { case MarcSubfield("c", content) => content }
      Person(label = name.get, prefixes = prefixes, numeration = numeration)
    }

    val organisations = getMatchingSubfields(bibData, "110", "a").map {
      subfields =>
        Organisation(subfields.head.content)
    }

    persons ++ organisations
  }
}<commit_msg>Apply auto-formatting rules<commit_after>package uk.ac.wellcome.transformer.transformers.sierra

import uk.ac.wellcome.models.{AbstractAgent, Organisation, Person}
import uk.ac.wellcome.transformer.source.{MarcSubfield, SierraBibData}

trait SierraCreators extends MarcUtils {

  def getCreators(bibData: SierraBibData): List[AbstractAgent] = {

    val persons =
      getMatchingSubfields(bibData, "100", List("a", "b", "c")).map {
        subfields =>
          val name = subfields.collectFirst {
            case MarcSubfield("a", content) => content
          }
          val numeration = subfields.collectFirst {
            case MarcSubfield("b", content) => content
          }
          val prefixes = subfields.collect {
            case MarcSubfield("c", content) => content
          }
          Person(
            label = name.get,
            prefixes = prefixes,
            numeration = numeration)
      }

    val organisations = getMatchingSubfields(bibData, "110", "a").map {
      subfields =>
        Organisation(subfields.head.content)
    }

    persons ++ organisations
  }
}
{'fraction_non_alphanumeric': 0.11521633446767136, 'fraction_numerical': 0.00583373845405931, 'mean_word_length': 3.140845070422535, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 13, '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': '2150236', 'n_tokens_mistral': 614, 'n_tokens_neox': 586, 'n_words': 125}