Deletes a synonym mapping by its base word.

@param string $baseWord Synonym mapping base word
185381
public function deleteSynonymsAction($baseWord)
    {
        $coreAdmin = $this->selectedSolrCoreConnection->getAdminService();
        $deleteResponse = $coreAdmin->deleteSynonym($baseWord);
        $reloadResponse = $coreAdmin->reloadCore();

        if ($deleteResponse->getHttpStatus() == 200
            && $reloadResponse->getHttpStatus() == 200
        ) {
            $this->addFlashMessage(
                'Synonym removed.'
            );
        } else {
            $this->addFlashMessage(
                'Failed to remove synonym.',
                'An error occurred',
                FlashMessage::ERROR
            );
        }

        $this->redirect('index');
    }
528303
private function takeProperties(File $baseFile): void
    {
        $baseProps = get_object_vars($baseFile);

        array_walk($baseProps, function ($value, $key) {
            $this->$key = $value;
        });
    }
1354551
private function cleanTarget(): void
    {
        foreach ($this->targetDictionary->keys() as $key) {
            if (!$this->sourceDictionary->has($key) || $this->sourceDictionary->get($key)->isSourceEmpty()) {
                $this->logger->log($this->logLevel, 'Removing obsolete {key}.', ['key' => $key]);
                if ($this->dryRun) {
                    continue;
                }

                $this->targetDictionary->remove($key);
            }
        }
    }
1109960
protected function clearDeferredByPrefixes(array $prefixes): void
    {
        $deferred = AdapterUtil::getPropertyValue($this, 'deferred');

        foreach ($prefixes as $prefix) {
            foreach ($deferred as $key => $value) {
                if ('' === $prefix || 0 === strpos($key, $prefix)) {
                    unset($deferred[$key]);
                }
            }
        }

        AdapterUtil::setPropertyValue($this, 'deferred', $deferred);
    }
516377
public function setBasePath($basePath = '')
    {
        if (gettype($basePath) === 'string') {
            $this->basePath = $basePath;
        } else {
            $msg = "The basePath argument must be a valid string, '" . gettype($basePath) . "' given.";
            throw new InvalidArgumentException($msg);
        }
    }
106330
public void delete(Term term) {
        Log.debug(String.format("Deleting by term %s", term));
        try {
            indexWriter.deleteDocuments(term);
        } catch (IOException e) {
            Log.error(e, "Error while deleting by term %s", term);
            throw new RuntimeException(e);
        }
    }
899186
public function delete($filename)
    {

        $dirname  = pathinfo($filename, PATHINFO_DIRNAME);
        $basename = pathinfo($filename, PATHINFO_BASENAME);

        $file_name = substr($basename, 0, strrpos($basename, '.'));

        $files = $this->storage->files($dirname);

        foreach ($files as $value) {
            $value_basename = pathinfo($value, PATHINFO_BASENAME);
            $name           = substr($value_basename, 0, strrpos($value_basename, '-'));

            if ($name == $file_name) {
                $this->storage->delete($value);
            }
        }

    }
1136771
def deleteword(self, word, **kwargs):
        """"""
        if isstring(word):
            word = self.doc[u(word)]
        return self.correctwords([word], [], **kwargs)
708981
public function actionRemoveSynonyms($class, $headword, $word)
    {
        $extMgr = Yii::$app->rhoone->ext;
        /* @var $extMgr \rhoone\base\ExtensionManager */
        $model = $extMgr->getModel($class);
        $headwordModel = $model->getHeadwords()->andWhere(['word' => $headword])->one();
        /* @var $headwordModel \rhoone\models\Headword */
        if (!$headwordModel) {
            throw new Exception('The headword: `' . $headword . '` does not exist.');
        }
        try {
            if (!$headwordModel->removeSynonyms($word)) {
                throw new Exception("Failed to remove synonyms: `" . $word . "'");
            }
        } catch (\Exception $ex) {
            throw new Exception($ex->getMessage());
        }
        echo "The synonyms `$word` removed.";
        return 0;
    }
815979
public function delete($words)
    {
        $request = new DeleteDirtyWordRequest($words);
        $response = new BaseResponse();
        return $this->client->sendRequest($request, $response);
    }
704669
protected function deleteTree($directory, $removeBaseDir = false)
    {
        $files = array_diff(scandir($directory), array('.', '..'));
        foreach ($files as $file) {
            (is_dir("$directory/$file")) ? $this->deleteTree("$directory/$file", true) : @unlink("$directory/$file");
        }

        if ($removeBaseDir) {
            @rmdir($directory);
        }
    }
334456
public function deleteBy($criteria)
    {
        $criteria = Util::normalizeCriteria($criteria);

        $queryBuilder = $this->getQueryBuilder($criteria);
        $queryBuilder->delete($this->entityName, 'e');
        $queryBuilder->getQuery()->execute();
    }
1055469
public static function removeFile(string $file): void
    {
        if (\is_file($file)) {
            if (!@\unlink($file)) {
                throw new \RuntimeException(\sprintf('Unable to delete file "%s"%s', $file, self::getErrorInfo()));
            }
        }
        
        \clearstatcache(true, $file);
    }
629390
private static function clearName($string, $removeWords) {
		$string = str_replace ( ' ', '-', $string );
		$string = preg_replace ( '/[^A-Za-z0-9\-]/', '', $string );
		foreach ( $removeWords as $word ) {
			$string = str_replace ( $word, '', $string );
		}
		$string = substr ( $string, 0, 29 );
		return $string;
	}
688149
public function forget($key)
    {
        if (strpos($key, '.') !== false) {
            $this->forgetSubKey($key);
        } else {
            $this->forgetByKey($key);
        }

        $this->resetLang();
    }
497206
protected function initBaseDir($basePath)
    {
        if ($basePath) {
            $this->setBaseDir($basePath);
        } elseif (defined('BASE_PATH')) {
            $this->setBaseDir(BASE_PATH);
        } else {
            throw new BadMethodCallException("No BASE_PATH defined");
        }
    }
1179513
protected function removeBinding(BaseBuilder $query, $key)
    {
        $bindings = $query->getRawBindings()['where'];

        unset($bindings[ $key ]);

        $query->setBindings($bindings);
    }