词性过滤

@param key
@param stopNatures
422033
public static void insertStopNatures(String key, String... filterNatures) {
        StopRecognition fr = get(key);
        fr.insertStopNatures(filterNatures);
    }
205831
public void doesNotContainKey(@NullableDecl Object key) {
    check("keySet()").that(actual().keySet()).doesNotContain(key);
  }
1216195
public static void remove(String key)
    {
        if (HanLP.Config.Normalization) key = CharTable.convert(key);
        if (trie == null) return;
        trie.remove(key);
    }
1081950
public static void reload(String key) {

        if (!MyStaticValue.ENV.containsKey(key)) { //如果变量中不存在直接删掉这个key不解释了
            remove(key);
        }

        putIfAbsent(key, MyStaticValue.ENV.get(key));

        KV<String, SmartForest<List<String>>> kv = SYNONYMS.get(key);

        init(key, kv, true);
    }
874850
public void warning(Warning warningKey) {
        report(diags.warning(null, source, null, warningKey));
    }
413353
@Override
    public void delete(Key key) {
	// TODO check whether this needs to be checked!!
	if (!contains(key)) {
	    return;
	}

	// if both children of root are black, set root to red
	if (!isRed(root.getLeft()) && !isRed(root.getRight())) {
	    root.setColor(RED);
	}

	root = delete(root, key);
	if (!isEmpty()) {
	    root.setParent(null);
	    root.setColor(BLACK);
	}
	// assert check();
    }
985869
public static void set(PropertyKey key, Object value, Source source) {
    sConf.set(key, value, source);
  }
380726
public static KV<String, SmartForest<List<String>>> remove(String key) {
        KV<String, SmartForest<List<String>>> kv = SYNONYMS.get(key);
        if (kv != null && kv.getV() != null) { //先清空后删除
            kv.getV().clear();
        }
        MyStaticValue.ENV.remove(key);
        return SYNONYMS.remove(key);
    }
81932
public StatusDetail withoutDetail(final String key) {
        final LinkedHashMap<String, String> newDetails = new LinkedHashMap<>(details);
        newDetails.remove(key);
        return statusDetail(name,status,message, newDetails);
    }
174603
function(key) {
    var filepath = this._makeFilepath(key);

    if (!fs.existsSync(filepath)) {
      return;
    }

    fs.unlinkSync(filepath);
  }
592343
public static void put(String key, String path, StopRecognition stopRecognition) {
        STOP.put(key, KV.with(path, stopRecognition));
        MyStaticValue.ENV.put(key, path);
    }
980142
private synchronized static StopRecognition init(String key, KV<String, StopRecognition> kv, boolean reload) {
		StopRecognition stopRecognition = kv.getV();

		if (stopRecognition != null) {
			if (reload) {
				stopRecognition.clear();
			} else {
				return stopRecognition;
			}
		} else {
			stopRecognition = new StopRecognition();
		}

		try {
			LOG.debug("begin init FILTER !");
			long start = System.currentTimeMillis();
			String temp = null;
			String[] strs = null;
			try (BufferedReader br = IOUtil.getReader(PathToStream.stream(kv.getK()), "UTF-8")) {
				while ((temp = br.readLine()) != null) {
					if (StringUtil.isNotBlank(temp)) {
						strs = temp.split("\t");

						if (strs.length == 1) {
							stopRecognition.insertStopWords(strs[0]);
						} else {
							switch (strs[1]) {
							case "nature":
								stopRecognition.insertStopNatures(strs[0]);
								break;
							case "regex":
								stopRecognition.insertStopRegexes(strs[0]);
								break;
							default:
								stopRecognition.insertStopWords(strs[0]);
								break;
							}
						}

					}
				}
			}
			LOG.info("load stop use time:" + (System.currentTimeMillis() - start) + " path is : " + kv.getK());
			kv.setV(stopRecognition);
			return stopRecognition;
		} catch (Exception e) {
			LOG.error("Init Stop library error :" + e.getMessage() + ", path: " + kv.getK());
			STOP.remove(key);
			return null;
		}
	}
863536
public void setKey(String key) {
        if (!isValidParamKey(key)) {
            throw ExceptionUtils.buildRuntime("param.key", key, "key can not start with "
                + RpcConstants.HIDE_KEY_PREFIX + " and " + RpcConstants.INTERNAL_KEY_PREFIX);
        }
        this.key = key;
    }
774563
function(key) {
  var error;

  if (typeof key !== "string") {
    error = "key must be a string";
  }
  else if (key.length === 0) {
    error = "key cannot be the empty string";
  }
  else if (1 + g_GEOHASH_PRECISION + key.length > 755) {
    // Wilddog can only stored child paths up to 768 characters
    // The child path for this key is at the least: "i/<geohash>key"
    error = "key is too long to be stored in Wilddog";
  }
  else if (/[\[\].#$\/\u0000-\u001F\u007F]/.test(key)) {
    // Wilddog 不允许key包含如下字符
    error = "key cannot contain any of the following characters: . # $ ] [ /";
  }

  if (typeof error !== "undefined") {
    throw new Error("Invalid WildGeo key '" + key + "': " + error);
  }
}
1156063
public void remove(String key) {
        PER_THREAD_CONTEXTS.getUnchecked(Thread.currentThread()).remove(key);
        mdcBridge.remove(key);
    }
752430
public void remove(PropertyKey key) {
    // remove is a nop if the key doesn't already exist
    if (mUserProps.containsKey(key)) {
      mUserProps.remove(key);
      mSources.remove(key);
    }
  }
975825
public static void insertStopWords(String key, String... stopWords) {
        StopRecognition fr = get(key);
        fr.insertStopWords(stopWords);
    }