Check if a name is in the blacklist

@param   string  $word
@return  bool
498934
public static function nameInBlacklist($word, $givenName, $middleName, $surname)
	{
		$word       = self::normalize($word);
		$givenName  = self::normalize($givenName);
		$middleName = self::normalize($middleName);
		$surname    = self::normalize($surname);

		$words   = array();
		$words[] = $givenName;
		$words[] = strrev($givenName);
		$words[] = $middleName;
		$words[] = strrev($middleName);
		$words[] = $surname;
		$words[] = strrev($surname);
		$words[] = $givenName . $middleName . $surname;
		$words[] = strrev($givenName . $middleName . $surname);
		$words[] = $givenName . $surname;
		$words[] = strrev($givenName . $surname);
		$words[] = $middleName . $surname;
		$words[] = strrev($middleName . $surname);
		$words[] = $surname . $givenName;
		$words[] = strrev($surname . $givenName);
		$words[] = $surname . $middleName . $givenName;
		$words[] = strrev($surname . $middleName . $givenName);

		foreach ($words as $w)
		{
			if ($w == $word)
			{
				return true;
			}
		}

		return false;
	}
773726
public function remove_word($word)
    {
        $this->load_dict();

        if (($key = array_search($word, $this->dict)) !== false) {
            unset($this->dict[$key]);
            $this->update_dict();
        }
    }
766982
private function hasValidSEnding($word)
    {
        $lastLetter = Utf8::substr($word, -1, 1);
        if (in_array($lastLetter, array('b', 'c', 'd', 'f', 'g', 'h', 'j', 'l', 'm', 'n', 'o', 'p', 'r', 't', 'v', 'y', 'z'))) {
            return true;
        }
        if ($lastLetter == 'k') {
            $beforeLetter = Utf8::substr($word, -2, 1);
            if (!in_array($beforeLetter, self::$vowels)) {
                return true;
            }
        }
        return false;
    }
714815
protected function stripTagAttributes($word)
    {
        $space = $this->stringUtil->strpos($word, ' ', 1);

        if ($space) {
            return '<' . $this->stringUtil->substr($word, 1, $space) . '>';
        }

        return trim($word, '<>');
    }
1182644
private boolean isNoiseWord(String term)
   {
      int len = term.length();
      if (minWordLen > 0 && len < minWordLen)
      {
         return true;
      }
      if (maxWordLen > 0 && len > maxWordLen)
      {
         return true;
      }
      if (stopWords != null && stopWords.contains(term))
      {
         return true;
      }
      return false;
   }
435520
public static function isBasedOnUsername($word, $username)
	{
		$word     = self::normalize($word);
		$username = self::normalize($username);

		$words   = array();
		$words[] = $username;
		$words[] = strrev($username);

		foreach ($words as $w)
		{
			if (empty($w))
			{
				continue;
			}

			if (empty($word))
			{
				continue;
			}

			if (strpos($w, $word) !== false)
			{
				return true;
			}
		}

		return false;
	}
256349
protected function isBlacklisted($column)
    {
        $colDef = $this->getColumnsDefinition();

        if (in_array($column, $colDef['blacklist'])) {
            return true;
        }

        if ($colDef['whitelist'] === '*' || in_array($column, $colDef['whitelist'])) {
            return false;
        }

        return true;
    }
1315922
public function searchFile(string $word) {
		$index   = $this->addFilter(new Search($word));
		$content = $this->listFiles(true);
		$this->removeFilter($index);

		return $content;
	}
272052
protected function _filterText($text)
    {
        // return true means `yes, it's banned`
        if (is_callable($this->config('bannedWords'))) {
            $isBanned = function ($word) {
                $callable = $this->config('bannedWords');

                return $callable($word);
            };
        } else {
            $isBanned = function ($word) {
                return in_array($word, (array)$this->config('bannedWords')) || empty($word);
            };
        }

        $words = explode(' ', $text);
        foreach ($words as $i => $w) {
            if ($isBanned($w)) {
                unset($words[$i]);
            }
        }

        return implode(' ', $words);
    }
244291
public function has(string $name): bool
    {
        return isset($this->stack[$this->normalizeName($name)]);
    }
229559
public function containsBlockedWord($text){
        if(!is_array($this->blockedWords)){$this->getBlockedWords();}
        foreach($this->blockedWords as $words){
            if(strpos(strtolower($text), strtolower($words['word'])) !== false){return true;}
        }
        return false;
    }
260156
def has_word ():
    """"""
    if not has_win32com:
        return False
    try:
        import _winreg as winreg
    except ImportError:
        import winreg
    try:
        key = winreg.OpenKey(winreg.HKEY_CLASSES_ROOT, "Word.Application")
        winreg.CloseKey(key)
        return True
    except (EnvironmentError, ImportError):
        pass
    return False
660101
public function isBlacklisted(AddressInterface $ip = null)
    {
        if ($ip === null) {
            $ip = $this->getRequestIPAddress();
        }
        $rangeType = $this->getRangeType($ip);

        return $rangeType !== null && ($rangeType & static::IPRANGEFLAG_BLACKLIST) === static::IPRANGEFLAG_BLACKLIST;
    }
53475
protected function inBlacklist($filename, array $blacklist)
    {
        foreach ($blacklist as $pattern) {
            if (fnmatch($pattern, $filename, FNM_PATHNAME | FNM_CASEFOLD)) {
                return true;
            }
        }

        return false;
    }
158454
protected function stemWord($word)
    {
        if ($this->isPlural($word)) {
            return $this->stemPluralWord($word);
        } else {
            return $this->stemSingularWord($word);
        }
    }
374898
public function checkName () {
        $result = true;

        if ($this->name != preg_replace('/[^a-z0-9_ -]/i', '', $this->name)) {
            $result = false;
        }
        return $result;
    }
375925
public function blacklist($text)
    {
        // No blacklist regex then there isn't much to do
        if ($this->blackListRegex === null) {
            return false;
        }

        // Normalize string before passing
        $text = $this->prepare($text);

        // Look for matches
        return preg_match($this->blackListRegex, $text) > 0;
    }