<commit_before>'use strict'

const createAutodetection = require('../../identify/autodetection')
const identifiers = require('../../identify')
const createLogger = require('../../log')

function createExtractor (log, path) {
  const extractor = identifiers[path]
  return extractor(log)
}

function specificExtractor (opts) {
  const { path, log } = opts
  const loggerKeyword = log.keyword
  const extractorLogger = createLogger(`${loggerKeyword}_unidentify`)

  switch (path) {
    case 'sails':
      return createExtractor(extractorLogger, 'sail')
    case 'boards':
      return createExtractor(extractorLogger, 'board')
    default:
      return createAutodetection(loggerKeyword)
  }
}

module.exports = specificExtractor<commit_msg>Update totalwind extractors<commit_after>'use strict'

const createAutodetection = require('../../identify/autodetection')
const identifiers = require('../../identify')
const createLogger = require('../../log')

function createExtractor (log, path) {
  const extractor = identifiers[path]
  return extractor(log)
}

function specificExtractor (opts) {
  const { path, log } = opts
  const loggerKeyword = log.keyword
  const extractorLogger = createLogger(`${loggerKeyword}_unidentify`)

  switch (path) {
    case 'sails':
      return createExtractor(extractorLogger, 'sail')
    case 'boards':
      return createExtractor(extractorLogger, 'board')
    case 'masts':
      return createExtractor(extractorLogger, 'mast')
    case 'booms':
      return createExtractor(extractorLogger, 'boom')
    default:
      // TODO: Ideally, not necessary use autodetection becase at this point
      // we don't need to process as sails or boards.
      // Create a pipeline for a very closed detection.
      return createAutodetection(loggerKeyword)
  }
}

module.exports = specificExtractor
{'fraction_non_alphanumeric': 0.11561643835616438, 'fraction_numerical': 0.0, 'mean_word_length': 4.086350974930362, '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': '2216795', 'n_tokens_mistral': 514, 'n_tokens_neox': 517, 'n_words': 138}