增加停用词

@param key
@param regexes
975825
public static void insertStopWords(String key, String... stopWords) {
        StopRecognition fr = get(key);
        fr.insertStopWords(stopWords);
    }
1016618
@SuppressWarnings("unchecked")
  public void reduceToKeys(Set<String> keys) {
    if (size > 0) {
      int sizeCopy = size;
      String[] keyListCopy = keyList.clone();
      int[] errorNumberCopy = errorNumber.clone();
      HashMap<String, Integer>[] errorListCopy = errorList.clone();
      int[] sourceNumberListCopy = sourceNumberList.clone();
      T1[] advancedValueSumListCopy = advancedValueSumList.clone();
      T1[] advancedValueMaxListCopy = advancedValueMaxList.clone();
      T1[] advancedValueMinListCopy = advancedValueMinList.clone();
      T1[] advancedValueSumOfSquaresListCopy = advancedValueSumOfSquaresList
          .clone();
      T2[] advancedValueSumOfLogsListCopy = advancedValueSumOfLogsList.clone();
      long[] advancedValueNListCopy = advancedValueNList.clone();
      keyList = new String[keys.size()];
      errorNumber = new int[keys.size()];
      errorList = new HashMap[keys.size()];
      sourceNumberList = new int[keys.size()];
      advancedValueSumList = operations.createVector1(keys.size());
      advancedValueMaxList = operations.createVector1(keys.size());
      advancedValueMinList = operations.createVector1(keys.size());
      advancedValueSumOfSquaresList = operations.createVector1(keys.size());
      advancedValueSumOfLogsList = operations.createVector2(keys.size());
      advancedValueNList = new long[keys.size()];
      size = 0;
      for (int i = 0; i < sizeCopy; i++) {
        if (keys.contains(keyListCopy[i])) {
          keyList[size] = keyListCopy[i];
          errorNumber[size] = errorNumberCopy[i];
          errorList[size] = errorListCopy[i];
          sourceNumberList[size] = sourceNumberListCopy[i];
          advancedValueSumList[size] = advancedValueSumListCopy[i];
          advancedValueMaxList[size] = advancedValueMaxListCopy[i];
          advancedValueMinList[size] = advancedValueMinListCopy[i];
          advancedValueSumOfSquaresList[size] = advancedValueSumOfSquaresListCopy[i];
          advancedValueSumOfLogsList[size] = advancedValueSumOfLogsListCopy[i];
          advancedValueNList[size] = advancedValueNListCopy[i];
          size++;
        }
      }
    }
  }
366373
function stringToRegexp (path, keys, options) {
	  var tokens = parse(path)
	  var re = tokensToRegExp(tokens, options)
	
	  // Attach keys back to the regexp.
	  for (var i = 0; i < tokens.length; i++) {
	    if (typeof tokens[i] !== 'string') {
	      keys.push(tokens[i])
	    }
	  }
	
	  return attachKeys(re, keys)
	}
747490
@SuppressWarnings("unchecked")
  public void reduceToKeys(Set<String> keys) {
    if (size > 0) {
      int sizeCopy = size;
      String[] keyListCopy = keyList.clone();
      int[] errorNumberCopy = errorNumber.clone();
      HashMap<String, Integer>[] errorListCopy = errorList.clone();
      int[] sourceNumberListCopy = sourceNumberList.clone();
      T1[][] fullValueListCopy = fullValueList.clone();
      for (int i = 0; i < fullValueListCopy.length; i++) {
        if (fullValueListCopy[i] != null) {
          fullValueListCopy[i] = fullValueListCopy[i].clone();
        }
      }
      keyList = new String[keys.size()];
      errorNumber = new int[keys.size()];
      errorList = new HashMap[keys.size()];
      sourceNumberList = new int[keys.size()];
      fullValueList = operations.createMatrix1(keys.size());
      size = 0;
      for (int i = 0; i < sizeCopy; i++) {
        if (keys.contains(keyListCopy[i])) {
          keyList[size] = keyListCopy[i];
          errorNumber[size] = errorNumberCopy[i];
          errorList[size] = errorListCopy[i];
          sourceNumberList[size] = sourceNumberListCopy[i];
          fullValueList[size] = fullValueListCopy[i];
          size++;
        }
      }
    }
  }
217351
function arrayToRegexp(arr, keys, options) {
  let parts = [];
  arr.forEach(ele => parts.push(toRegexpSource(ele, keys, options)));
  return new RegExp(`(?:${parts.join('|')})`, flags(options));
}
545894
@Deprecated
    public PactDslJsonArray stringMatcher(String regex) {
      generators.addGenerator(Category.BODY, rootPath + appendArrayIndex(1), new RandomStringGenerator(10));
      stringMatcher(regex, new Generex(regex).random());
      return this;
    }
924772
function(regex) {
  var self = this; var re = new RegExp(regex);
  var keys = {};
  self.init = function() { keys = {}; };
  self.accumulate = function(line) {
    var m = re.exec(line);
    if (m == null) return;
    var k = m[1]; // use 1st group as key
    var v = keys[k];
    if (v) keys[k] = v+1; else keys[k] = 1; // count by key
  };
  self.compensate = function(line) {
    var m = re.exec(line);
    if (m == null) return;
    var k = m[1]; // use 1st group as key
    var v = keys[k];
    if (v) keys[k] = v-1; else keys[k] = 1;
  };
  self.emit = function() {
    return keys;
  };
  self.make = function() { return new WideFinderFunction(regex); };
}
153175
private void getOperators(List<ExampleQuery> exQueries, String regex)
  {

    Pattern opsRegex = Pattern.compile(regex);
    for (ExampleQuery eQ : exQueries)
    {
      List<String> ops = new ArrayList<>();
      Matcher m = opsRegex.matcher(eQ.getExampleQuery().replaceAll("\\s", ""));

      while (m.find())
      {
        ops.add(m.group());
      }

      eQ.setUsedOperators("{" + StringUtils.join(ops, ",") + "}");
    }
  }
972473
public void setRegexPatternSets(java.util.Collection<RegexPatternSetSummary> regexPatternSets) {
        if (regexPatternSets == null) {
            this.regexPatternSets = null;
            return;
        }

        this.regexPatternSets = new java.util.ArrayList<RegexPatternSetSummary>(regexPatternSets);
    }
1171310
public void addForeigerKey(String key) {
    String[] foreigers = new String[foreigerKeys.length + 1];
    int i = 0;
    for (; i < foreigerKeys.length; i++) {
      foreigers[i] = foreigerKeys[i];
    }
    foreigers[i] = key;
    foreigerKeys = foreigers;
  }
483374
@Override
    public String tagKey(String key) {
        String conventionKey = delegate.tagKey(key);

        conventionKey = START_UNDERSCORE_PATTERN.matcher(conventionKey).replaceAll(""); // 2
        conventionKey = SF_PATTERN.matcher(conventionKey).replaceAll(""); // 2

        if (!START_LETTERS_PATTERN.matcher(conventionKey).matches()) { // 3
            conventionKey = "a" + conventionKey;
        }
        return StringUtils.truncate(conventionKey, KEY_MAX_LENGTH); // 1
    }
484669
function regexpToRegexp(regex, keys, options) {
  if (!Array.isArray(keys)) return regex.source;

  let groups = regex.source.match(/\((?!\?)/g);
  if (!groups) return regex.source;

  let i = 0;
  let group = () => ({
    name: i++,
    prefix: null,
    delimiter: null,
    optional: false,
    repeat: false,
    partial: false,
    pattern: null
  });

  groups.forEach(() => keys.push(group()));
  return regex.source;
}
279763
public void keyPress(String key, List<ModifierPressed> modifiers) {
    systemInputManager.keyPress(key, modifiers);
  }
160523
public final void seek(String key) {
        if (key == null || key.length() < 1) return;
        final String[] keys = key.split("\\.");
        nextGoodChar(); //读掉 { [
        for (String key1 : keys) {
            while (this.hasNext()) {
                String field = this.readSmallString();
                readBlank();
                if (key1.equals(field)) break;
                skipValue();
            }
        }

    }
179327
function(props, regex) {
            if(!(regex instanceof RegExp)) {
                return props;
            }
            var key,
                filtered = {};

            for(key in props) {
                if(props.hasOwnProperty(key) && regex.test(key)) {
                    filtered[key] = props[key];
                }
            }
            return filtered;
        }
1144496
public boolean match(String str, String regex) {
		if (str == null || regex == null)
			return false;
		if (regex.trim().isEmpty())
			return true;
		return Pattern.compile(regex.trim()).matcher(str).find();
	}
1352671
public List<String> getKeysFromRegex(String regex) {
        List<String> keys = Lists.newArrayList();
        
        try {
            // List all objects in the domain
            ObjectName name = new ObjectName(regex);
            Set<ObjectName> objs = mBeanServer.queryNames(name, null);
            
            // Convert object naems to a tree
            for (ObjectName objName : objs) {
                MBeanInfo info = mBeanServer.getMBeanInfo(objName);
                keys.add(objName.getCanonicalName());
            }
        } catch (Exception e) {
            LOG.error("Exception in getKeysFromRegex ", e);
        }
        
        return keys;
    }