<commit_before>(function() {

var $ = jQuery; // Handle namespaced jQuery

// Used to extract keywords and facets from the free text search.
var CATEGORY_RE = '(\'.+?\'|".+?"|[^\'"\\s]{2}\\S*):\\s*';
var FREETEXT_RE = '(\'.+?\'|".+?"|[^\'"\\s]\\S*)';
VS.app.SearchParser = {

  // Matches `category: "free text"`, with and without quotes.
  ALL_FIELDS : new RegExp(CATEGORY_RE + FREETEXT_RE, 'g'),

  // Matches a single category without the text. Used to correctly extract facets.
  CATEGORY   : new RegExp(CATEGORY_RE),

  // Called to parse a query into a collection of `SearchFacet` models.<commit_msg>Correctly parse unquoted 1-character categories<commit_after>(function() {

var $ = jQuery; // Handle namespaced jQuery

// Used to extract keywords and facets from the free text search.
var FREETEXT_RE = '(\'.+?\'|".+?"|[^\'"\\s]\\S*)';
var CATEGORY_RE = FREETEXT_RE +                ':\\s*';
VS.app.SearchParser = {

  // Matches `category: "free text"`, with and without quotes.
  ALL_FIELDS : new RegExp(CATEGORY_RE + FREETEXT_RE, 'g'),

  // Matches a single category without the text. Used to correctly extract facets.
  CATEGORY   : new RegExp(CATEGORY_RE),

  // Called to parse a query into a collection of `SearchFacet` models.
{'fraction_non_alphanumeric': 0.166532582461786, 'fraction_numerical': 0.0016090104585679806, 'mean_word_length': 3.5072463768115942, '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': '97616', 'n_tokens_mistral': 444, 'n_tokens_neox': 423, 'n_words': 130}