Remove a word from dictionary

@param string  $word  The word to remove
773726
public function remove_word($word)
    {
        $this->load_dict();

        if (($key = array_search($word, $this->dict)) !== false) {
            unset($this->dict[$key]);
            $this->update_dict();
        }
    }
172787
public static function pluralize($word) {
        foreach(self::$_exceptions as $exception) {
			if($exception['singular'] == $word){
				return $exception['plural'];
			}
        }

        return parent::pluralize($word);
	}
1187318
public static String removeWord(final String host, final String word) {
    return removeWord(host, word, DELIMITER);

  }
228311
public function delete($word) {
    	try{
			if (empty($word))
				throw new Exception('Paramer "word" is required');


    		$params = array (
    		'word' => $word
    		);

    		$ret = $this->SendRequest->curl('/wordfilter/delete.json',$params,'urlencoded','im','POST');
    		if(empty($ret))
    			throw new Exception('bad request');
    		return $ret;

    	}catch (Exception $e) {
    		print_r($e->getMessage());
    	}
   }
747603
function _subWord($word)
    {
        static $sbox;
        if (empty($sbox)) {
            list(, , , , $sbox) = $this->_getTables();
        }

        return  $sbox[$word       & 0x000000FF]        |
               ($sbox[$word >>  8 & 0x000000FF] <<  8) |
               ($sbox[$word >> 16 & 0x000000FF] << 16) |
               ($sbox[$word >> 24 & 0x000000FF] << 24);
    }
603772
def remove_words(self, words):
        
        for word in words:
            self._dictionary.pop(word.lower())
        self._update_dictionary()
904103
public function remove($key)
    {
        $keys = explode('.', $key);
        $section = &$this->items;

        while (count($keys) > 1) {
            $key = array_shift($keys);

            if (! isset($section[$key])) {
                return;
            }

            $section = &$section[$key];
        }

        unset($section[array_shift($keys)]);

        $this->notify();
    }
854584
public function getWordCount($word)
    {
        if (is_null($this->_localWords)) {
            $this->_localWords = $this->getRawWordCounts();
        }
        return isset($this->_localWords[$word]) ? $this->_localWords[$word] : 0;
    }
11646
public function addWord($word, $value = 1)
    {
        if (isset($this->wordsArray[$word])) {
            $this->wordsArray[$word] += $value;
        } else {
            $this->wordsArray[$word] = $value;
        }
    }
489772
private function isReservedWord($word)
    {
        if ($word[0] === '`') {
            $word = str_replace('`', '', $word);
        }

        $keywordLists = [];
        foreach ($this->keywordLists as $keywordList) {
            if (! $keywordList->isKeyword($word)) {
                continue;
            }

            $keywordLists[] = $keywordList->getName();
        }

        return $keywordLists;
    }
203888
public function wordfilterAdd($word) {
        try{
            if(empty($word))
                throw new Exception('敏感词不能为空');
            $params['word'] = $word;
            $ret = $this->curl('/wordfilter/add',$params);
            if(empty($ret))
                throw new Exception('请求失败');
            return $ret;
        }catch (Exception $e) {
            print_r($e->getMessage());
        }
    }
362446
def delete_one_word(self, word=RIGHT):
        """"""

        assert word in (self.RIGHT, self.LEFT)

        if word == self.RIGHT:
            papy = self.text.find(' ', self.cursor) + 1
            if not papy:
                papy = len(self.text)
            self.text = self.text[:self.cursor] + self.text[papy:]

        else:
            papy = self.text.rfind(' ', 0, self.cursor)
            if papy == -1:
                papy = 0
            self.text = self.text[:papy] + self.text[self.cursor:]
            self.cursor = papy
972777
protected function decamelize($word)
    {
        return preg_replace_callback(
            '/(^|[a-z])([A-Z])/',
            function ($matches) {
                return strtolower(strlen($matches[1]) ? $matches[1] . "_" . $matches[2] : $matches[2]);
            },
            $word
        );
    }
664836
public static function oneByWord($word)
	{
		$word = trim($word);
		$word = strtolower($word);

		return self::blank()
			->whereEquals('word', $word)
			->row();
	}
770137
def _remove_word(completer):
    
    def inner(word: str):
        try:
            completer.words.remove(word)
        except Exception:
            pass
    return inner
117266
private static function step4($word)
    {
        switch (substr($word, -2, 1)) {
            case 'a':
                self::replace($word, 'al', '', 1);
                break;

            case 'c':
                self::replace($word, 'ance', '', 1)
                || self::replace($word, 'ence', '', 1);
                break;

            case 'e':
                self::replace($word, 'er', '', 1);
                break;

            case 'i':
                self::replace($word, 'ic', '', 1);
                break;

            case 'l':
                self::replace($word, 'able', '', 1)
                || self::replace($word, 'ible', '', 1);
                break;

            case 'n':
                self::replace($word, 'ant', '', 1)
                || self::replace($word, 'ement', '', 1)
                || self::replace($word, 'ment', '', 1)
                || self::replace($word, 'ent', '', 1);
                break;

            case 'o':
                if (substr($word, -4) == 'tion' || substr($word, -4) == 'sion') {
                    self::replace($word, 'ion', '', 1);
                } else {
                    self::replace($word, 'ou', '', 1);
                }
                break;

            case 's':
                self::replace($word, 'ism', '', 1);
                break;

            case 't':
                self::replace($word, 'ate', '', 1)
                || self::replace($word, 'iti', '', 1);
                break;

            case 'u':
                self::replace($word, 'ous', '', 1);
                break;

            case 'v':
                self::replace($word, 'ive', '', 1);
                break;

            case 'z':
                self::replace($word, 'ize', '', 1);
                break;
        }

        return $word;
    }
909955
private static function step0b($word)
    {
        $word = str_replace(array('ä', 'ö', 'ü', 'U', 'Y'), array('a', 'o', 'u', 'u', 'y'), $word);

        return $word;
    }