diff --git a/website/docs/usage/v2-3.md b/website/docs/usage/v2-3.md index d59b50a6e..378b1ec34 100644 --- a/website/docs/usage/v2-3.md +++ b/website/docs/usage/v2-3.md @@ -161,10 +161,18 @@ debugging your tokenizer configuration. spaCy's custom warnings have been replaced with native Python [`warnings`](https://docs.python.org/3/library/warnings.html). Instead of -setting `SPACY_WARNING_IGNORE`, use the -[`warnings` filters](https://docs.python.org/3/library/warnings.html#the-warnings-filter) +setting `SPACY_WARNING_IGNORE`, use the [`warnings` +filters](https://docs.python.org/3/library/warnings.html#the-warnings-filter) to manage warnings. +```diff +import spacy ++ import warnings + +- spacy.errors.SPACY_WARNING_IGNORE.append('W007') ++ warnings.filterwarnings("ignore", message=r"\[W007\]", category=UserWarning) +``` + #### Normalization tables The normalization tables have moved from the language data in