mirror of
https://github.com/explosion/spaCy.git
synced 2024-12-26 01:46:28 +03:00
Update docs [ci skip]
This commit is contained in:
parent
568e12215d
commit
2fd7122074
|
@ -128,8 +128,8 @@ Get all patterns that have been added to the attribute ruler in the
|
|||
|
||||
## AttributeRuler.initialize {#initialize tag="method"}
|
||||
|
||||
Initialize the component with data. Typically called before training to load in
|
||||
rules from a file. This method is typically called by
|
||||
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
|
||||
|
|
|
@ -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
|
||||
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.
|
||||
Also see the usage guides on the
|
||||
[config lifecycle](/usage/training#config-lifecycle) and
|
||||
[custom initialization](/usage/training#initialization).
|
||||
|
||||
> #### Example
|
||||
>
|
||||
|
|
|
@ -76,7 +76,12 @@ be a token pattern (list) or a phrase pattern (string). For example:
|
|||
|
||||
## 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
|
||||
>
|
||||
|
@ -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"}
|
||||
|
||||
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
|
||||
containing a `patterns.jsonl` file and a `cfg` file with the component
|
||||
configuration.
|
||||
|
|
Loading…
Reference in New Issue
Block a user