Update docs [ci skip]

This commit is contained in:
Ines Montani 2020-10-06 10:31:48 +02:00
parent 568e12215d
commit 2fd7122074
3 changed files with 12 additions and 4 deletions

View File

@ -128,8 +128,8 @@ Get all patterns that have been added to the attribute ruler in the
## AttributeRuler.initialize {#initialize tag="method"} ## AttributeRuler.initialize {#initialize tag="method"}
Initialize the component with data. Typically called before training to load in Initialize the component with data and used before training to load in rules
rules from a file. This method is typically called by from a file. This method is typically called by
[`Language.initialize`](/api/language#initialize) and lets you customize [`Language.initialize`](/api/language#initialize) and lets you customize
arguments it receives via the arguments it receives via the
[`[initialize.components]`](/api/data-formats#config-initialize) block in the [`[initialize.components]`](/api/data-formats#config-initialize) block in the

View File

@ -224,6 +224,9 @@ It's used by [`Language.initialize`](/api/language#initialize) and typically
called right before training (but not at runtime). The section allows you to called right before training (but not at runtime). The section allows you to
specify local file paths or custom functions to load data resources from, specify local file paths or custom functions to load data resources from,
without requiring them at runtime when you load the trained pipeline back in. without requiring them at runtime when you load the trained pipeline back in.
Also see the usage guides on the
[config lifecycle](/usage/training#config-lifecycle) and
[custom initialization](/usage/training#initialization).
> #### Example > #### Example
> >

View File

@ -76,7 +76,12 @@ be a token pattern (list) or a phrase pattern (string). For example:
## EntityRuler.initialize {#initialize tag="method" new="3"} ## EntityRuler.initialize {#initialize tag="method" new="3"}
Initialize the component with patterns from a file. Initialize the component with data and used before training to load in rules
from a file. This method is typically called by
[`Language.initialize`](/api/language#initialize) and lets you customize
arguments it receives via the
[`[initialize.components]`](/api/data-formats#config-initialize) block in the
config.
> #### Example > #### Example
> >
@ -204,7 +209,7 @@ only the patterns are saved as JSONL. If a directory name is provided, a
## EntityRuler.from_disk {#from_disk tag="method"} ## EntityRuler.from_disk {#from_disk tag="method"}
Load the entity ruler from a file. Expects either a file containing Load the entity ruler from a path. Expects either a file containing
newline-delimited JSON (JSONL) with one entry per line, or a directory newline-delimited JSON (JSONL) with one entry per line, or a directory
containing a `patterns.jsonl` file and a `cfg` file with the component containing a `patterns.jsonl` file and a `cfg` file with the component
configuration. configuration.