<commit_before><%#
  # @file
  # The inner HTML for switching your metacode set
  #%>

<% metacodes = current_user.settings.metacodes %>
<% selectedSet = metacodes[0].include?("metacodeset") ? metacodes[0].sub("metacodeset-","")  : "custom" %>
<% allMetacodeSets = MetacodeSet.order("name").all %>
<% if selectedSet == "custom" 
     index = allMetacodeSets.length
   else
     set = MetacodeSet.find(selectedSet.to_i)
     index = allMetacodeSets.index(set)   
   end %>
<h3>Switch Metacode Set</h3>

<p>Use metacode sets to enter different modes of mapping.</p>
        
<div id="metacodeSwitchTabs">
  <ul>
    <% allMetacodeSets.each do |m| %>
    <li><a href="#metacodeSwitchTabs<%= m.id %>" data-set-id="<%= m.id %>"><%= m.name %></a></li>
    <% end %>
    <li><a href="#metacodeSwitchTabsCustom" data-set-id="custom" id="metacodeSetCustom">CUSTOM SELECTION</a></li>
  </ul>
  <% allMetacodeSets.each_with_index do |m, localindex| %>
  <div id="metacodeSwitchTabs<%= m.id %>" 
       data-metacodes="<%= m.metacodes.map(&:id).join(',') %>">
    <% @list = '' %>
    <% m.metacodes.sort{|x,y| x.name <=> y.name }.each_with_index do |m, index| %>
      <% @list += '<li><img src="' + asset_path(m.icon) + '" alt="' + m.name + '" /><p>' + m.name.downcase + '</p><div class="clearfloat"></div></li>' %> 
    <% end %>
    <div class="metacodeSwitchTab"><commit_msg>switching metacode sets was being caught by Metamaps.Router.intercept<commit_after><%#
  # @file
  # The inner HTML for switching your metacode set
  #%>

<% metacodes = current_user.settings.metacodes %>
<% selectedSet = metacodes[0].include?("metacodeset") ? metacodes[0].sub("metacodeset-","")  : "custom" %>
<% allMetacodeSets = MetacodeSet.order("name").all %>
<% if selectedSet == "custom" 
     index = allMetacodeSets.length
   else
     set = MetacodeSet.find(selectedSet.to_i)
     index = allMetacodeSets.index(set)   
   end %>
<h3>Switch Metacode Set</h3>

<p>Use metacode sets to enter different modes of mapping.</p>
        
<div id="metacodeSwitchTabs">
  <ul>
    <% allMetacodeSets.each do |m| %>
    <li><a href="#metacodeSwitchTabs<%= m.id %>" data-set-id="<%= m.id %>" data-bypass="true"><%= m.name %></a></li>
    <% end %>
    <li><a href="#metacodeSwitchTabsCustom" data-set-id="custom" data-bypass="true" id="metacodeSetCustom">CUSTOM SELECTION</a></li>
  </ul>
  <% allMetacodeSets.each_with_index do |m, localindex| %>
  <div id="metacodeSwitchTabs<%= m.id %>" 
       data-metacodes="<%= m.metacodes.map(&:id).join(',') %>">
    <% @list = '' %>
    <% m.metacodes.sort{|x,y| x.name <=> y.name }.each_with_index do |m, index| %>
      <% @list += '<li><img src="' + asset_path(m.icon) + '" alt="' + m.name + '" /><p>' + m.name.downcase + '</p><div class="clearfloat"></div></li>' %> 
    <% end %>
    <div class="metacodeSwitchTab">
{'fraction_non_alphanumeric': 0.21484098939929328, 'fraction_numerical': 0.0028268551236749115, 'mean_word_length': 3.8642611683848798, 'pattern_counts': {'":': 0, '<': 87, '<?xml version=': 0, '>': 87, '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': '3820991', 'n_tokens_mistral': 1142, 'n_tokens_neox': 1070, 'n_words': 190}