public void remove(String item) {
        if(item == null || item.isEmpty()){
            return;
        }
        if(LOGGER.isDebugEnabled()) {
            LOGGER.debug("移除词性：" + item);
        }
        //从根节点开始查找
        //获取根节点
        TrieNode<V> node = getRootNode(item.charAt(0));
        if(node == null){
            //不存在根节点，结束查找
            if(LOGGER.isDebugEnabled()) {
                LOGGER.debug("词性不存在：" + item);
            }
            return;
        }
        int length = item.length();
        //存在根节点，继续查找
        for(int i=1;i<length;i++){
            char character = item.charAt(i);
            TrieNode<V> child = node.getChild(character);
            if(child == null){
                //未找到匹配节点
                if(LOGGER.isDebugEnabled()) {
                    LOGGER.debug("词性不存在：" + item);
                }
                return;
            }else{
                //找到节点，继续往下找
                node = child;
            }
        }
        if(node.isTerminal()){
            //设置为非叶子节点，效果相当于移除词性
            node.setTerminal(false);
            node.setValue(null);
            if(LOGGER.isDebugEnabled()) {
                LOGGER.debug("成功移除词性：" + item);
            }
        }else{
            if(LOGGER.isDebugEnabled()) {
                LOGGER.debug("词性不存在：" + item);
            }
        }
    }
public void remove ( String item ) { if ( item == null || item . isEmpty ( ) ) { return ; } if ( LOGGER . isDebugEnabled ( ) ) { LOGGER . debug ( "移除词性：" + item ) ; } TrieNode < V > node = getRootNode ( item . charAt ( 0 ) ) ; if ( node == null ) { if ( LOGGER . isDebugEnabled ( ) ) { LOGGER . debug ( "词性不存在：" + item ) ; } return ; } int length = item . length ( ) ; for ( int i = 1 ; i < length ; i ++ ) { char character = item . charAt ( i ) ; TrieNode < V > child = node . getChild ( character ) ; if ( child == null ) { if ( LOGGER . isDebugEnabled ( ) ) { LOGGER . debug ( "词性不存在：" + item ) ; } return ; } else { node = child ; } } if ( node . isTerminal ( ) ) { node . setTerminal ( false ) ; node . setValue ( null ) ; if ( LOGGER . isDebugEnabled ( ) ) { LOGGER . debug ( "成功移除词性：" + item ) ; } } else { if ( LOGGER . isDebugEnabled ( ) ) { LOGGER . debug ( "词性不存在：" + item ) ; } } }
移除词性
@param item