<commit_before>const axios = require('axios')

const flag = async () => {
  if (event.type === 'text' && event.nlu.intent.name === 'none') {
    const data = {
      eventId: event.id,
      botId: event.botId,
      language: [event.nlu.language, event.nlu.detectedLanguage, event.state.user.language].filter(
        l => l && l !== 'n/a'
      )[0],
      preview: event.preview,
      reason: 'auto_hook'
    }

    const axiosConfig = await bp.http.getAxiosConfigForBot(event.botId, { localUrl: true })
    await axios.post('/mod/misunderstood/events', data, axiosConfig)
  }
}

return flag()<commit_msg>fix(misunderstood) Ignore Choice skill keywords (#3860)<commit_after>const axios = require('axios')
const _ = require('lodash')

const flag = async () => {
  const matchesQuickReply = async () => {
    const { currentFlow } = event.state.context
    if (currentFlow && currentFlow.startsWith('skills/choice')) {
      const flow = await bp.ghost.forBot(event.botId).readFileAsObject('flows', currentFlow)
      const preview = event.preview.toLowerCase()
      const kw = _.chain(flow.skillData.keywords)
        .values()
        .flatten()
        .find(kw => kw.toLowerCase() === preview.toLowerCase())
        .value()

      if (kw) {
        return true
      }
    }

    return false
  }

  if (event.type === 'text' && event.nlu.intent.name === 'none' && !(await matchesQuickReply())) {
    const data = {
      eventId: event.id,
      botId: event.botId,
      language: [event.nlu.language, event.nlu.detectedLanguage, event.state.user.language].filter(
        l => l && l !== 'n/a'
      )[0],
      preview: event.preview,
      reason: 'auto_hook'
    }

    const axiosConfig = await bp.http.getAxiosConfigForBot(event.botId, { localUrl: true })
    await axios.post('/mod/misunderstood/events', data, axiosConfig)
  }
}

return flag()
{'fraction_non_alphanumeric': 0.15636754433100483, 'fraction_numerical': 0.0032240730789897904, 'mean_word_length': 2.9035639412997902, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, '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': '2374286', 'n_tokens_mistral': 620, 'n_tokens_neox': 612, 'n_words': 124}