<commit_before>(function() {
  var emoji = <%= Dir.glob(File.expand_path("../../../public/images/*.png", __FILE__)).map{|f| File.basename(f).split(".")[0]}.inspect %>;

  function imageFor(code) {
    if (emoji.indexOf(code) !== -1) {
      var url = Discourse.getURL('/plugins/emoji/images/' + code + '.png');
      return ['img', {href: url, title: ':' + code + ':', 'class': 'emoji', alt: code}];
    }
  }

  // Also support default emotions
  var translations = {
    ':)'   : 'smile',
    ':-)'   : 'smile',
    ':('   : 'frowning',
    ':-('   : 'frowning',<commit_msg>Simple API for registering custom emoji<commit_after>(function() {
  var emoji = <%= Dir.glob(File.expand_path("../../../public/images/*.png", __FILE__)).map{|f| File.basename(f).split(".")[0]}.inspect %>;

  var _extendedEmoji = {};
  Discourse.Dialect.registerEmoji = function(code, url) {
    _extendedEmoji[code] = url;
  };

  function imageFor(code) {
    if (emoji.indexOf(code) !== -1) {
      var url = Discourse.getURL('/plugins/emoji/images/' + code + '.png');
      return ['img', {href: url, title: ':' + code + ':', 'class': 'emoji', alt: code}];
    } else {
      var url = _extendedEmoji[code];
      if (url) {
        return ['img', {href: url, title: ':' + code + ':', 'class': 'emoji', alt: code}];
      }
    }
  }

  // Also support default emotions
  var translations = {
    ':)'   : 'smile',
    ':-)'   : 'smile',
    ':('   : 'frowning',
    ':-('   : 'frowning',
{'fraction_non_alphanumeric': 0.23978201634877383, 'fraction_numerical': 0.0027247956403269754, 'mean_word_length': 2.8155844155844156, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '361488', 'n_tokens_mistral': 544, 'n_tokens_neox': 526, 'n_words': 99}