validation -> validate

This commit is contained in:
Ines Montani 2020-08-07 14:43:47 +02:00
parent 955d7b1b6b
commit a8404c3517
3 changed files with 7 additions and 7 deletions

View File

@ -20,7 +20,7 @@ PatternType = Dict[str, Union[str, List[Dict[str, Any]]]]
assigns=["doc.ents", "token.ent_type", "token.ent_iob"], assigns=["doc.ents", "token.ent_type", "token.ent_iob"],
default_config={ default_config={
"phrase_matcher_attr": None, "phrase_matcher_attr": None,
"validation": False, "validate": False,
"overwrite_ents": False, "overwrite_ents": False,
"ent_id_sep": DEFAULT_ENT_ID_SEP, "ent_id_sep": DEFAULT_ENT_ID_SEP,
}, },
@ -31,7 +31,7 @@ def make_entity_ruler(
nlp: Language, nlp: Language,
name: str, name: str,
phrase_matcher_attr: Optional[Union[int, str]], phrase_matcher_attr: Optional[Union[int, str]],
validation: bool, validate: bool,
overwrite_ents: bool, overwrite_ents: bool,
ent_id_sep: str, ent_id_sep: str,
): ):
@ -39,7 +39,7 @@ def make_entity_ruler(
nlp, nlp,
name, name,
phrase_matcher_attr=phrase_matcher_attr, phrase_matcher_attr=phrase_matcher_attr,
validate=validation, validate=validate,
overwrite_ents=overwrite_ents, overwrite_ents=overwrite_ents,
ent_id_sep=ent_id_sep, ent_id_sep=ent_id_sep,
) )

View File

@ -25,8 +25,8 @@ how the component should be configured. You can override its settings via the
> >
> ```python > ```python
> config = { > config = {
> "validation": True,
> "pattern_dicts": None, > "pattern_dicts": None,
> "validate": True,
> } > }
> nlp.add_pipe("attribute_ruler", config=config) > 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 | | 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` | | `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 ```python
https://github.com/explosion/spaCy/blob/develop/spacy/pipeline/attributeruler.py https://github.com/explosion/spaCy/blob/develop/spacy/pipeline/attributeruler.py

View File

@ -27,7 +27,7 @@ how the component should be configured. You can override its settings via the
> ```python > ```python
> config = { > config = {
> "phrase_matcher_attr": None, > "phrase_matcher_attr": None,
> "validation": True, > "validate": True,
> "overwrite_ents": False, > "overwrite_ents": False,
> "ent_id_sep": "||", > "ent_id_sep": "||",
> } > }
@ -37,7 +37,7 @@ how the component should be configured. You can override its settings via the
| Setting | Type | Description | Default | | 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` | | `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` | | `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. | `"||"` | | `ent_id_sep` | str | Separator used internally for entity IDs. | `"||"` |