<commit_before>require 'semantics3'

API_KEY = ENV['SEMANTICS3_API_KEY']
API_SECRET = ENV['SEMANTICS3_API_SECRET']

class Semantics3Controller < ApplicationController

  def search
    sem3 = Semantics3::Products.new(API_KEY, API_SECRET)

    sem3.products_field('name', params[:q])
    productsHash = sem3.get_products

    render json: {:semantics3 => productsHash['results']}.to_json
  end

end<commit_msg>The root key is implicitly serialized by AMS<commit_after>require 'semantics3'

API_KEY = ENV['SEMANTICS3_API_KEY']
API_SECRET = ENV['SEMANTICS3_API_SECRET']

class Semantics3Controller < ApplicationController

  def search
    sem3 = Semantics3::Products.new(API_KEY, API_SECRET)

    sem3.products_field('name', params[:q])
    productsHash = sem3.get_products

    render json: productsHash['results']
  end

end
{'fraction_non_alphanumeric': 0.10194174757281553, 'fraction_numerical': 0.02063106796116505, 'mean_word_length': 5.7073170731707314, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 4, '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': '809765', 'n_tokens_mistral': 303, 'n_tokens_neox': 281, 'n_words': 53}