Add :normalized key to the result map if the original search term was normalized
541976
def get_normalizations_for(result_map, normalized)
				result_map.each do |rm|
					normalized.each do |n|
						rm[:normalized] = n["to"] if n["from"] == rm[:search_term]
					end
				end
			result_map
		end
590137
def add(self, name, value):
        ''''''
        normalized_name = normalize_name(name, self._normalize_overrides)
        self._map[normalized_name].append(value)
139576
def _normalize_params(self, *paths, **query_kwargs):
        """"""
        kwargs = {}

        if paths:
            fragment = paths[-1]
            if fragment:
                if fragment.startswith("#"):
                    kwargs["fragment"] = fragment
                    paths.pop(-1)

            kwargs["path"] = "/".join(self.normalize_paths(*paths))

        kwargs["query_kwargs"] = query_kwargs
        return kwargs
515651
function (key) {
            var self = this, _queryMap;
            parseQuery(self);
            _queryMap = self._queryMap;
            if (key) {
                return _queryMap[key];
            } else {
                return _queryMap;
            }
        }
251051
def _normalize_label(self, s, wsmap):
        
        toks = []
        for tok in list(set(self.npattern.sub(' ', s).split(' '))):
            if tok in wsmap:
                tok=wsmap[tok]
            if tok != "":
                toks.append(tok)
        toks.sort()
        return " ".join(toks)
1090592
function(key, queryString) {
      var queryString = (queryString || (main.location ? main.location.search : null) || '').substring(1)
      return inject(queryString.split('&'), null, function(value, pair){
        parts = pair.split('=')
        return parts[0] == key ? parts[1].replace(/%20|\+/gmi, ' ') : value
      })
    }
545147
protected void addHits(@Nullable SearchResults results, boolean isReplacing) {
        if (results == null) {
            if (isReplacing) {
                clear();
                if (infiniteScrollListener != null) {
                    infiniteScrollListener.setCurrentlyLoading(false);
                }
            }
            return;
        }

        JSONArray hits = results.hits;

        if (isReplacing) {
            adapter.clear(false);
        }

        for (int i = 0; i < hits.length(); ++i) {
            JSONObject hit = hits.optJSONObject(i);
            if (hit != null) {
                adapter.add(hit);
            }
        }

        if (isReplacing) {
            adapter.notifyDataSetChanged();
            smoothScrollToPosition(0);
            if (infiniteScrollListener != null) {
                infiniteScrollListener.setCurrentlyLoading(false);
            }
        } else {
            adapter.notifyItemRangeInserted(adapter.getItemCount(), hits.length());
        }
    }
593424
public void normalizeName(Key key, String fullyQualifiedName) {
        Value value = fields.remove(key);
        if (value == null) {
            throw new IllegalStateException("Could not find option for key=" + key);
        }
        Key newKey;
        if (fullyQualifiedName.startsWith(".")) {
            // TODO: we should not use format with leading dot internally
            newKey = Key.extension(fullyQualifiedName.substring(1));
        } else {
            newKey = Key.extension(fullyQualifiedName);
        }
        fields.put(newKey, value);
    }
1000361
def get_redirects_for(result_map, redirects)
			result_map.each do |rm|
				redirects.each do |r|
					rm[:redirected] = r["to"] if r["from"] == rm[:search_term] ||  r["from"] == rm[:normalized]
				end
			end
			result_map
		end
696005
def apply_mapping(raw_row, mapping):
    '''
    
    '''
    row = {target: mapping_func(raw_row[source_key])
           for target, (mapping_func, source_key)
           in mapping.fget().items()}
    return row
515497
private Map.Entry<Variable, ImmutableTerm> applyNullNormalization(
            Map.Entry<Variable, ImmutableTerm> substitutionEntry) {
        ImmutableTerm value = substitutionEntry.getValue();
        if (value instanceof ImmutableFunctionalTerm) {
            ImmutableTerm newValue = normalizeFunctionalTerm((ImmutableFunctionalTerm) value);
            return newValue.equals(value)
                    ? substitutionEntry
                    : new AbstractMap.SimpleEntry<>(substitutionEntry.getKey(), newValue);
        }
        return substitutionEntry;
    }
454620
def expand_mapping_target(namespaces, val):
    """"""

    vals = [v.strip() for v in val.split(',')]
    ret = []
    for v in vals:
        inverse = False
        if v.startswith('^'):
            inverse = True
            v = v[1:]
        ret.append((expand_curielike(namespaces, v), inverse))
    return ret
1318915
function normalize(result) {
  return {
    relevance: result.relevance || 0,
    language: result.language || null,
    value: result.value || []
  }
}
1264985
function normalizeHeaderKey() {
  var key = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';

  return key.replace(/\r?\n|\r/g, ' ') // no newlines in keys
  .trim().toLowerCase().replace(/^MIME\b|^[a-z]|-[a-z]/ig, function (c) {
    return c.toUpperCase();
  }); // use uppercase words, except MIME
}
936173
function normalize(args) {
  let result = {
    queries:  null,
    callback: null
  };

  if (args.length === 1 && Array.isArray(args[0])) {
    result.queries = args[0];
  } else if (args.length === 2 && Array.isArray(args[0])) {
    result.queries = args[0];

    if (typeof args[1] === 'function') {
      result.callback = args[1];
    }
  } else {
    result.queries = args;

    if (typeof result.queries[result.queries.length - 1] === 'function') {
      result.callback = result.queries.pop();
    }
  }

  return result;
}
75048
def normalize_key_and_value(k,v)
		v = v ? v.strip : true # no value defaults to true
		k = k.strip
		
		# check synonyms
		v = true if ['yes','true'].include?(v.to_s.downcase)
		v = false if ['no','false'].include?(v.to_s.downcase)
	
		k = k.downcase.gsub(' ','_')
		return k, v
	end
1060436
def _normalize(self, key, value):
        

        # None value should not be converted by normalizer
        if value is None:
            return None

        normalize_func = getattr(self, 'normalize_{0}'.format(key),
                                 lambda x: x)

        return normalize_func(value)