diff --git a/spacy/pipeline/entityruler.py b/spacy/pipeline/entityruler.py index 8f280547e..bef97ec46 100644 --- a/spacy/pipeline/entityruler.py +++ b/spacy/pipeline/entityruler.py @@ -20,7 +20,7 @@ PatternType = Dict[str, Union[str, List[Dict[str, Any]]]] assigns=["doc.ents", "token.ent_type", "token.ent_iob"], default_config={ "phrase_matcher_attr": None, - "validation": False, + "validate": False, "overwrite_ents": False, "ent_id_sep": DEFAULT_ENT_ID_SEP, }, @@ -31,7 +31,7 @@ def make_entity_ruler( nlp: Language, name: str, phrase_matcher_attr: Optional[Union[int, str]], - validation: bool, + validate: bool, overwrite_ents: bool, ent_id_sep: str, ): @@ -39,7 +39,7 @@ def make_entity_ruler( nlp, name, phrase_matcher_attr=phrase_matcher_attr, - validate=validation, + validate=validate, overwrite_ents=overwrite_ents, ent_id_sep=ent_id_sep, ) diff --git a/website/docs/api/attributeruler.md b/website/docs/api/attributeruler.md index 31c9ed04f..7c4655bc5 100644 --- a/website/docs/api/attributeruler.md +++ b/website/docs/api/attributeruler.md @@ -25,8 +25,8 @@ how the component should be configured. You can override its settings via the > > ```python > config = { -> "validation": True, > "pattern_dicts": None, +> "validate": True, > } > nlp.add_pipe("attribute_ruler", config=config) > ``` @@ -34,7 +34,7 @@ how the component should be configured. You can override its settings via the | Setting | Type | Description | Default | | --------------- | ---------------- | --------------------------------------------------------------------------------------------------------------------------------------- | ------- | | `pattern_dicts` | `Iterable[dict]` | A list of pattern dicts with the keys as the arguments to [`AttributeRuler.add`](#add) (`patterns`/`attrs`/`index`) to add as patterns. | `None` | -| `validation` | bool | Whether patterns should be validated, passed to `Matcher` as `validate`. | `False` | +| `validate` | bool | Whether patterns should be validated (passed to the `Matcher`). | `False` | ```python https://github.com/explosion/spaCy/blob/develop/spacy/pipeline/attributeruler.py diff --git a/website/docs/api/entityruler.md b/website/docs/api/entityruler.md index 0b4369ec4..1b98a659d 100644 --- a/website/docs/api/entityruler.md +++ b/website/docs/api/entityruler.md @@ -27,7 +27,7 @@ how the component should be configured. You can override its settings via the > ```python > config = { > "phrase_matcher_attr": None, -> "validation": True, +> "validate": True, > "overwrite_ents": False, > "ent_id_sep": "||", > } @@ -37,7 +37,7 @@ how the component should be configured. You can override its settings via the | Setting | Type | Description | Default | | --------------------- | ---- | ------------------------------------------------------------------------------------------------------------------------------------------- | ------- | | `phrase_matcher_attr` | str | Optional attribute name match on for the internal [`PhraseMatcher`](/api/phrasematcher), e.g. `LOWER` to match on the lowercase token text. | `None` | -| `validation` | bool | Whether patterns should be validated, passed to Matcher and PhraseMatcher as `validate`. | `False` | +| `validate` | bool | Whether patterns should be validated (passed to the `Matcher` and `PhraseMatcher`). | `False` | | `overwrite_ents` | bool | If existing entities are present, e.g. entities added by the model, overwrite them by matches if necessary. | `False` | | `ent_id_sep` | str | Separator used internally for entity IDs. | `"||"` |